aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2003-11-11 23:51:22 +0000
committerDavid Carlton <carlton@bactrian.org>2003-11-11 23:51:22 +0000
commit99a61fab5ac430923f7063f62da281fba23e5bd1 (patch)
treec7f201498ea4bcfe1a8b6acb5d542f6162006bb6
parentdd13cc9a87d19f095a199544e49c73fd98bbe708 (diff)
downloadgdb-99a61fab5ac430923f7063f62da281fba23e5bd1.zip
gdb-99a61fab5ac430923f7063f62da281fba23e5bd1.tar.gz
gdb-99a61fab5ac430923f7063f62da281fba23e5bd1.tar.bz2
2003-11-11 David Carlton <carlton@kealia.com>
* Merge with mainline; tag is carlton-dictionary-20031111-merge.
-rw-r--r--ChangeLog216
-rw-r--r--Makefile.in13
-rw-r--r--bfd/ChangeLog878
-rw-r--r--bfd/Makefile.am6
-rw-r--r--bfd/Makefile.in12
-rw-r--r--bfd/acinclude.m42
-rw-r--r--bfd/aclocal.m451
-rw-r--r--bfd/aout-adobe.c6
-rw-r--r--bfd/aout-target.h8
-rw-r--r--bfd/aout-tic30.c6
-rw-r--r--bfd/aoutf1.h4
-rw-r--r--bfd/aoutx.h5
-rw-r--r--bfd/archures.c11
-rw-r--r--bfd/bfd-in.h48
-rw-r--r--bfd/bfd-in2.h137
-rw-r--r--bfd/bfd.c10
-rw-r--r--bfd/bfdio.c2
-rw-r--r--bfd/bfdwin.c2
-rw-r--r--bfd/binary.c44
-rw-r--r--bfd/bout.c4
-rw-r--r--bfd/coff-apollo.c2
-rw-r--r--bfd/coff-h8300.c78
-rw-r--r--bfd/coff-rs6000.c4
-rw-r--r--bfd/coff-sh.c9
-rw-r--r--bfd/coff-sparc.c4
-rw-r--r--bfd/coff-tic54x.c6
-rw-r--r--bfd/coff-w65.c2
-rw-r--r--bfd/coff-we32k.c2
-rw-r--r--bfd/coff-z8k.c8
-rw-r--r--bfd/coff64-rs6000.c4
-rw-r--r--bfd/coffcode.h16
-rw-r--r--bfd/coffgen.c6
-rw-r--r--bfd/cofflink.c52
-rw-r--r--bfd/config.bfd29
-rwxr-xr-xbfd/configure640
-rw-r--r--bfd/configure.host33
-rw-r--r--bfd/configure.in27
-rw-r--r--bfd/cpu-frv.c7
-rw-r--r--bfd/cpu-h8300.c12
-rw-r--r--bfd/cpu-h8500.c11
-rw-r--r--bfd/cpu-hppa.c2
-rw-r--r--bfd/cpu-ia64-opc.c3
-rw-r--r--bfd/cpu-iq2000.c29
-rw-r--r--bfd/cpu-m10300.c2
-rw-r--r--bfd/cpu-m68k.c53
-rw-r--r--bfd/cpu-mips.c6
-rw-r--r--bfd/cpu-msp430.c2
-rw-r--r--bfd/cpu-ns32k.c8
-rw-r--r--bfd/cpu-rs6000.c4
-rw-r--r--bfd/cpu-sh.c75
-rw-r--r--bfd/cpu-z8k.c10
-rw-r--r--bfd/doc/ChangeLog9
-rw-r--r--bfd/doc/Makefile.in2
-rw-r--r--bfd/doc/bfd.texinfo2
-rw-r--r--bfd/doc/bfdint.texi2
-rw-r--r--bfd/dwarf2.c75
-rw-r--r--bfd/ecoff.c8
-rw-r--r--bfd/efi-app-ia32.c2
-rw-r--r--bfd/elf-bfd.h52
-rw-r--r--bfd/elf-eh-frame.c39
-rw-r--r--bfd/elf-hppa.h2
-rw-r--r--bfd/elf-m10200.c2
-rw-r--r--bfd/elf-m10300.c17
-rw-r--r--bfd/elf-strtab.c179
-rw-r--r--bfd/elf.c229
-rw-r--r--bfd/elf32-am33lin.c2
-rw-r--r--bfd/elf32-arm.h1089
-rw-r--r--bfd/elf32-avr.c2
-rw-r--r--bfd/elf32-cris.c16
-rw-r--r--bfd/elf32-d10v.c119
-rw-r--r--bfd/elf32-fr30.c2
-rw-r--r--bfd/elf32-frv.c8
-rw-r--r--bfd/elf32-h8300.c4
-rw-r--r--bfd/elf32-hppa.c112
-rw-r--r--bfd/elf32-i370.c15
-rw-r--r--bfd/elf32-i386.c17
-rw-r--r--bfd/elf32-i860.c2
-rw-r--r--bfd/elf32-m32r.c11
-rw-r--r--bfd/elf32-m68hc11.c85
-rw-r--r--bfd/elf32-m68hc12.c51
-rw-r--r--bfd/elf32-m68hc1x.c227
-rw-r--r--bfd/elf32-m68hc1x.h82
-rw-r--r--bfd/elf32-m68k.c15
-rw-r--r--bfd/elf32-mcore.c11
-rw-r--r--bfd/elf32-mips.c1
-rw-r--r--bfd/elf32-msp430.c2
-rw-r--r--bfd/elf32-openrisc.c2
-rw-r--r--bfd/elf32-ppc.c475
-rw-r--r--bfd/elf32-ppc.h2
-rw-r--r--bfd/elf32-s390.c19
-rw-r--r--bfd/elf32-sh.c411
-rw-r--r--bfd/elf32-sh64.c28
-rw-r--r--bfd/elf32-sparc.c31
-rw-r--r--bfd/elf32-v850.c57
-rw-r--r--bfd/elf32-vax.c15
-rw-r--r--bfd/elf32-xstormy16.c2
-rw-r--r--bfd/elf32-xtensa.c160
-rw-r--r--bfd/elf64-alpha.c122
-rw-r--r--bfd/elf64-hppa.c12
-rw-r--r--bfd/elf64-mips.c1
-rw-r--r--bfd/elf64-mmix.c559
-rw-r--r--bfd/elf64-ppc.c248
-rw-r--r--bfd/elf64-ppc.h2
-rw-r--r--bfd/elf64-s390.c19
-rw-r--r--bfd/elf64-sh64.c39
-rw-r--r--bfd/elf64-sparc.c15
-rw-r--r--bfd/elf64-x86-64.c28
-rw-r--r--bfd/elfcode.h2
-rw-r--r--bfd/elflink.c204
-rw-r--r--bfd/elflink.h112
-rw-r--r--bfd/elfn32-mips.c1
-rw-r--r--bfd/elfxx-ia64.c280
-rw-r--r--bfd/elfxx-mips.c136
-rw-r--r--bfd/elfxx-mips.h2
-rw-r--r--bfd/elfxx-target.h12
-rw-r--r--bfd/gen-aout.c2
-rw-r--r--bfd/hash.c2
-rw-r--r--bfd/hp300hpux.c14
-rw-r--r--bfd/i386msdos.c10
-rw-r--r--bfd/ieee.c18
-rw-r--r--bfd/ihex.c8
-rw-r--r--bfd/init.c2
-rw-r--r--bfd/libaout.h6
-rw-r--r--bfd/libbfd-in.h14
-rw-r--r--bfd/libbfd.c2
-rw-r--r--bfd/libbfd.h15
-rw-r--r--bfd/libcoff-in.h4
-rw-r--r--bfd/libcoff.h4
-rw-r--r--bfd/libecoff.h6
-rw-r--r--bfd/libnlm.h9
-rw-r--r--bfd/linker.c2
-rw-r--r--bfd/mach-o.c8
-rw-r--r--bfd/merge.c270
-rw-r--r--bfd/mipsbsd.c4
-rw-r--r--bfd/mmo.c8
-rw-r--r--bfd/nlm-target.h4
-rw-r--r--bfd/nlm.c2
-rw-r--r--bfd/nlm32-alpha.c7
-rw-r--r--bfd/nlm32-i386.c7
-rw-r--r--bfd/nlm32-ppc.c7
-rw-r--r--bfd/nlm32-sparc.c7
-rw-r--r--bfd/nlmcode.h10
-rw-r--r--bfd/oasys.c8
-rw-r--r--bfd/opncls.c6
-rw-r--r--bfd/pdp11.c4
-rw-r--r--bfd/peXXigen.c29
-rw-r--r--bfd/pef.c4
-rw-r--r--bfd/peicode.h16
-rw-r--r--bfd/ppcboot.c10
-rw-r--r--bfd/reloc.c44
-rw-r--r--bfd/section.c37
-rw-r--r--bfd/simple.c4
-rw-r--r--bfd/som.c4
-rw-r--r--bfd/som.h2
-rw-r--r--bfd/sparclynx.c2
-rw-r--r--bfd/srec.c10
-rw-r--r--bfd/stabs.c13
-rw-r--r--bfd/syms.c6
-rw-r--r--bfd/sysdep.h2
-rw-r--r--bfd/targets.c32
-rw-r--r--bfd/tekhex.c14
-rw-r--r--bfd/versados.c8
-rw-r--r--bfd/version.h2
-rw-r--r--bfd/vms-misc.c4
-rw-r--r--bfd/vms.c12
-rw-r--r--bfd/vms.h9
-rw-r--r--bfd/xsym.c2
-rw-r--r--bfd/xsym.h4
-rw-r--r--config-ml.in11
-rw-r--r--config/ChangeLog268
-rw-r--r--config/acx.m415
-rw-r--r--config/gettext.m42
-rwxr-xr-xconfigure140
-rw-r--r--configure.in61
-rw-r--r--gdb/ChangeLog2306
-rw-r--r--gdb/MAINTAINERS20
-rw-r--r--gdb/Makefile.in177
-rw-r--r--gdb/NEWS84
-rw-r--r--gdb/PROBLEMS20
-rw-r--r--gdb/README4
-rw-r--r--gdb/ada-lang.c1
-rw-r--r--gdb/aix-thread.c6
-rw-r--r--gdb/alpha-tdep.c5
-rw-r--r--gdb/alpha-tdep.h5
-rw-r--r--gdb/amd64fbsd-nat.c73
-rw-r--r--gdb/amd64fbsd-tdep.c33
-rw-r--r--gdb/arch-utils.c168
-rw-r--r--gdb/arch-utils.h26
-rw-r--r--gdb/arm-linux-tdep.c89
-rw-r--r--gdb/arm-tdep.c38
-rw-r--r--gdb/avr-tdep.c21
-rw-r--r--gdb/bcache.c95
-rw-r--r--gdb/bcache.h101
-rw-r--r--gdb/block.c4
-rw-r--r--gdb/blockframe.c27
-rw-r--r--gdb/breakpoint.c1261
-rw-r--r--gdb/breakpoint.h92
-rw-r--r--gdb/buildsym.c9
-rw-r--r--gdb/c-exp.y54
-rw-r--r--gdb/c-lang.c12
-rw-r--r--gdb/c-typeprint.c7
-rw-r--r--gdb/c-valprint.c5
-rw-r--r--gdb/cli-out.c2
-rw-r--r--gdb/cli/cli-cmds.c18
-rw-r--r--gdb/cli/cli-decode.c22
-rw-r--r--gdb/cli/cli-script.c21
-rw-r--r--gdb/coffread.c30
-rw-r--r--gdb/command.h2
-rw-r--r--gdb/complaints.c4
-rw-r--r--gdb/completer.c19
-rw-r--r--gdb/completer.h2
-rw-r--r--gdb/config/arm/linux.mt2
-rw-r--r--gdb/config/d10v/d10v.mt2
-rw-r--r--gdb/config/djgpp/fnchange.lst169
-rw-r--r--gdb/config/h8300/tm-h8300.h1
-rw-r--r--gdb/config/h8500/h8500.mt6
-rw-r--r--gdb/config/h8500/tm-h8500.h295
-rw-r--r--gdb/config/i386/fbsd.mh2
-rw-r--r--gdb/config/i386/fbsd.mt2
-rw-r--r--gdb/config/i386/fbsd64.mh2
-rw-r--r--gdb/config/i386/fbsd64.mt2
-rw-r--r--gdb/config/i386/linux.mt2
-rw-r--r--gdb/config/i386/nm-ptx4.h66
-rw-r--r--gdb/config/i386/nm-symmetry.h50
-rw-r--r--gdb/config/i386/ptx.mh7
-rw-r--r--gdb/config/i386/ptx.mt3
-rw-r--r--gdb/config/i386/ptx4.mh8
-rw-r--r--gdb/config/i386/ptx4.mt3
-rw-r--r--gdb/config/i386/symmetry.mh4
-rw-r--r--gdb/config/i386/symmetry.mt3
-rw-r--r--gdb/config/i386/tm-cygwin.h2
-rw-r--r--gdb/config/i386/tm-ptx.h194
-rw-r--r--gdb/config/i386/tm-ptx4.h26
-rw-r--r--gdb/config/i386/tm-symmetry.h291
-rw-r--r--gdb/config/i386/xm-ptx.h38
-rw-r--r--gdb/config/i386/xm-ptx4.h27
-rw-r--r--gdb/config/i386/xm-symmetry.h28
-rw-r--r--gdb/config/m32r/m32r.mt2
-rw-r--r--gdb/config/m68k/tm-delta68.h4
-rw-r--r--gdb/config/m68k/tm-sun3.h20
-rw-r--r--gdb/config/m68k/tm-vx68.h6
-rw-r--r--gdb/config/m88k/xm-delta88v4.h22
-rw-r--r--gdb/config/mips/irix6.mh4
-rw-r--r--gdb/config/mips/linux.mh1
-rw-r--r--gdb/config/mips/mipsm3.mh6
-rw-r--r--gdb/config/mips/mipsm3.mt4
-rw-r--r--gdb/config/mips/nm-irix6.h22
-rw-r--r--gdb/config/mips/nm-linux.h4
-rw-r--r--gdb/config/mips/tm-mips.h4
-rw-r--r--gdb/config/mips/tm-mipsm3.h67
-rw-r--r--gdb/config/mips/tm-vxmips.h6
-rw-r--r--gdb/config/mips/xm-irix6.h22
-rw-r--r--gdb/config/mips/xm-linux.h25
-rw-r--r--gdb/config/mips/xm-mipsm3.h29
-rw-r--r--gdb/config/mn10200/mn10200.mt6
-rw-r--r--gdb/config/mn10200/tm-mn10200.h214
-rw-r--r--gdb/config/nm-m3.h126
-rw-r--r--gdb/config/ns32k/tm-ns32k.h2
-rw-r--r--gdb/config/pa/hppabsd.mh4
-rw-r--r--gdb/config/pa/hppabsd.mt3
-rw-r--r--gdb/config/pa/hppaosf.mh5
-rw-r--r--gdb/config/pa/hppaosf.mt3
-rw-r--r--gdb/config/pa/hppapro.mt3
-rw-r--r--gdb/config/pa/nm-hppab.h123
-rw-r--r--gdb/config/pa/nm-hppah.h9
-rw-r--r--gdb/config/pa/nm-hppao.h43
-rw-r--r--gdb/config/pa/tm-hppa.h13
-rw-r--r--gdb/config/pa/tm-hppab.h47
-rw-r--r--gdb/config/pa/tm-hppao.h98
-rw-r--r--gdb/config/pa/tm-pro.h14
-rw-r--r--gdb/config/pa/xm-hppab.h24
-rw-r--r--gdb/config/pa/xm-pa.h5
-rw-r--r--gdb/config/powerpc/tm-linux.h10
-rw-r--r--gdb/config/powerpc/tm-ppc-eabi.h3
-rw-r--r--gdb/config/rs6000/tm-rs6000.h12
-rw-r--r--gdb/config/s390/nm-linux.h4
-rw-r--r--gdb/config/s390/s390.mh7
-rw-r--r--gdb/config/s390/xm-linux.h30
-rw-r--r--gdb/config/sh/embed.mt2
-rw-r--r--gdb/config/sh/linux.mt2
-rw-r--r--gdb/config/sh/tm-linux.h2
-rw-r--r--gdb/config/sh/tm-sh.h2
-rw-r--r--gdb/config/sh/wince.mt2
-rw-r--r--gdb/config/sparc/sparclet.mt3
-rw-r--r--gdb/config/sparc/sparclite.mt5
-rw-r--r--gdb/config/sparc/tm-sp64linux.h2
-rw-r--r--gdb/config/sparc/tm-sparc.h11
-rw-r--r--gdb/config/sparc/tm-sparclet.h158
-rw-r--r--gdb/config/sparc/tm-sparclite.h123
-rw-r--r--gdb/config/sparc/tm-sparclynx.h2
-rw-r--r--gdb/config/sparc/tm-vxsparc.h6
-rw-r--r--gdb/config/z8k/tm-z8k.h292
-rw-r--r--gdb/config/z8k/z8k.mt6
-rw-r--r--gdb/configure.host7
-rw-r--r--gdb/configure.tgt15
-rw-r--r--gdb/core-sol2.c4
-rw-r--r--gdb/corelow.c55
-rw-r--r--gdb/cris-tdep.c55
-rw-r--r--gdb/d10v-tdep.c273
-rw-r--r--gdb/dbxread.c145
-rw-r--r--gdb/defs.h54
-rw-r--r--gdb/disasm.c2
-rw-r--r--gdb/doc/ChangeLog121
-rw-r--r--gdb/doc/annotate.texinfo10
-rw-r--r--gdb/doc/gdb.texinfo266
-rw-r--r--gdb/doc/gdbint.texinfo159
-rw-r--r--gdb/doc/stabs.texinfo13
-rw-r--r--gdb/dpx2-nat.c2
-rw-r--r--gdb/dummy-frame.c2
-rw-r--r--gdb/dve3900-rom.c2
-rw-r--r--gdb/dwarf2-frame.c24
-rw-r--r--gdb/dwarf2expr.c12
-rw-r--r--gdb/dwarf2read.c41
-rw-r--r--gdb/dwarfread.c2
-rw-r--r--gdb/elfread.c51
-rw-r--r--gdb/environ.c4
-rw-r--r--gdb/eval.c4
-rw-r--r--gdb/event-top.c5
-rw-r--r--gdb/exec.c76
-rw-r--r--gdb/expprint.c88
-rw-r--r--gdb/expression.h30
-rw-r--r--gdb/f-exp.y26
-rw-r--r--gdb/f-lang.c15
-rw-r--r--gdb/f-typeprint.c5
-rw-r--r--gdb/f-valprint.c61
-rw-r--r--gdb/fbsd-proc.c64
-rw-r--r--gdb/findvar.c14
-rw-r--r--gdb/frame.c139
-rw-r--r--gdb/frame.h75
-rw-r--r--gdb/frv-tdep.c281
-rw-r--r--gdb/gcore.c106
-rw-r--r--gdb/gdbarch.c713
-rw-r--r--gdb/gdbarch.h212
-rwxr-xr-xgdb/gdbarch.sh419
-rw-r--r--gdb/gdbserver/ChangeLog17
-rw-r--r--gdb/gdbserver/linux-low.c60
-rw-r--r--gdb/gdbserver/server.c153
-rw-r--r--gdb/gdbserver/target.h31
-rw-r--r--gdb/gdbtypes.c191
-rw-r--r--gdb/gnu-nat.c2
-rw-r--r--gdb/go32-nat.c4
-rw-r--r--gdb/h8300-tdep.c76
-rw-r--r--gdb/h8500-tdep.c739
-rw-r--r--gdb/hppa-hpux-tdep.c5
-rw-r--r--gdb/hppa-tdep.c47
-rw-r--r--gdb/hppab-nat.c4
-rw-r--r--gdb/hppah-nat.c45
-rw-r--r--gdb/hppam3-nat.c4
-rw-r--r--gdb/hpux-thread.c15
-rw-r--r--gdb/i386-interix-nat.c2
-rw-r--r--gdb/i386-interix-tdep.c1
-rw-r--r--gdb/i386-linux-nat.c99
-rw-r--r--gdb/i386-linux-tdep.c151
-rw-r--r--gdb/i386-nto-tdep.c4
-rw-r--r--gdb/i386-tdep.c295
-rw-r--r--gdb/i386-tdep.h68
-rw-r--r--gdb/i386b-nat.c2
-rw-r--r--gdb/i386bsd-nat.c8
-rw-r--r--gdb/i386bsd-tdep.c107
-rw-r--r--gdb/i386gnu-nat.c8
-rw-r--r--gdb/i386nbsd-tdep.c6
-rw-r--r--gdb/i386obsd-tdep.c2
-rw-r--r--gdb/i386v4-nat.c2
-rw-r--r--gdb/i387-tdep.c274
-rw-r--r--gdb/i387-tdep.h42
-rw-r--r--gdb/ia64-aix-nat.c8
-rw-r--r--gdb/ia64-linux-nat.c4
-rw-r--r--gdb/ia64-linux-tdep.c36
-rw-r--r--gdb/ia64-tdep.c308
-rw-r--r--gdb/infcall.c42
-rw-r--r--gdb/infcmd.c83
-rw-r--r--gdb/inferior.h23
-rw-r--r--gdb/inflow.c4
-rw-r--r--gdb/infptrace.c6
-rw-r--r--gdb/infrun.c27
-rw-r--r--gdb/inftarg.c42
-rw-r--r--gdb/irix5-nat.c14
-rw-r--r--gdb/jv-exp.y20
-rw-r--r--gdb/jv-lang.c12
-rw-r--r--gdb/kod.c16
-rw-r--r--gdb/language.c36
-rw-r--r--gdb/language.h15
-rw-r--r--gdb/lin-lwp.c7
-rw-r--r--gdb/linux-proc.c24
-rw-r--r--gdb/lynx-nat.c28
-rw-r--r--gdb/m2-exp.y26
-rw-r--r--gdb/m2-lang.c3
-rw-r--r--gdb/m3-nat.c4566
-rw-r--r--gdb/m32r-tdep.c6
-rw-r--r--gdb/m68hc11-tdep.c11
-rw-r--r--gdb/m68k-tdep.c5
-rw-r--r--gdb/m68klinux-nat.c2
-rw-r--r--gdb/macrotab.c7
-rw-r--r--gdb/maint.c5
-rw-r--r--gdb/mcore-tdep.c18
-rw-r--r--gdb/mdebugread.c27
-rw-r--r--gdb/mi/ChangeLog21
-rw-r--r--gdb/mi/mi-cmd-var.c10
-rw-r--r--gdb/mi/mi-main.c14
-rw-r--r--gdb/minsyms.c66
-rw-r--r--gdb/mips-linux-tdep.c10
-rw-r--r--gdb/mips-nat.c2
-rw-r--r--gdb/mips-tdep.c184
-rw-r--r--gdb/mipsm3-nat.c386
-rw-r--r--gdb/mipsv4-nat.c2
-rw-r--r--gdb/mn10200-tdep.c899
-rw-r--r--gdb/mn10300-tdep.c71
-rw-r--r--gdb/monitor.c15
-rw-r--r--gdb/ns32k-tdep.c22
-rw-r--r--gdb/objc-exp.y22
-rw-r--r--gdb/objc-lang.c7
-rw-r--r--gdb/objfiles.c26
-rw-r--r--gdb/objfiles.h3
-rw-r--r--gdb/ocd.c2
-rw-r--r--gdb/osabi.c56
-rw-r--r--gdb/p-exp.y18
-rw-r--r--gdb/p-lang.c3
-rw-r--r--gdb/p-valprint.c6
-rw-r--r--gdb/pa64solib.c9
-rw-r--r--gdb/parse.c188
-rw-r--r--gdb/parser-defs.h51
-rw-r--r--gdb/ppc-linux-nat.c22
-rw-r--r--gdb/ppc-linux-tdep.c75
-rw-r--r--gdb/ppc-sysv-tdep.c802
-rw-r--r--gdb/ppc-tdep.h27
-rw-r--r--gdb/ppcnbsd-tdep.c27
-rw-r--r--gdb/printcmd.c9
-rw-r--r--gdb/procfs.c1
-rw-r--r--gdb/regcache.c60
-rw-r--r--gdb/regcache.h16
-rw-r--r--gdb/remote-e7000.c14
-rw-r--r--gdb/remote-hms.c4
-rw-r--r--gdb/remote-mips.c14
-rw-r--r--gdb/remote-rdi.c2
-rw-r--r--gdb/remote-sds.c3
-rw-r--r--gdb/remote-sim.c14
-rw-r--r--gdb/remote-st.c7
-rw-r--r--gdb/remote-vx.c1
-rw-r--r--gdb/remote-vx68.c8
-rw-r--r--gdb/remote-vxmips.c16
-rw-r--r--gdb/remote-vxsparc.c16
-rw-r--r--gdb/remote.c405
-rw-r--r--gdb/rom68k-rom.c2
-rw-r--r--gdb/rs6000-nat.c18
-rw-r--r--gdb/rs6000-tdep.c185
-rw-r--r--gdb/s390-tdep.c82
-rw-r--r--gdb/scm-lang.c12
-rw-r--r--gdb/ser-e7kpc.c2
-rw-r--r--gdb/sh-stub.c10
-rw-r--r--gdb/sh-tdep.c2278
-rw-r--r--gdb/sh-tdep.h2
-rw-r--r--gdb/sh3-rom.c10
-rw-r--r--gdb/sh64-tdep.c102
-rw-r--r--gdb/sol-thread.c2
-rw-r--r--gdb/solib-svr4.c51
-rw-r--r--gdb/solib.c4
-rw-r--r--gdb/somsolib.c9
-rw-r--r--gdb/source.c2
-rw-r--r--gdb/sparc-nat.c16
-rw-r--r--gdb/sparc-tdep.c309
-rw-r--r--gdb/sparc64nbsd-nat.c2
-rw-r--r--gdb/sparcl-stub.c946
-rw-r--r--gdb/sparcl-tdep.c869
-rw-r--r--gdb/sparclet-rom.c316
-rw-r--r--gdb/sparclet-stub.c1167
-rw-r--r--gdb/sparcnbsd-nat.c2
-rw-r--r--gdb/stabsread.c1088
-rw-r--r--gdb/stabsread.h10
-rw-r--r--gdb/stack.c184
-rw-r--r--gdb/symfile.c36
-rw-r--r--gdb/symm-nat.c902
-rw-r--r--gdb/symm-tdep.c102
-rw-r--r--gdb/symmisc.c6
-rw-r--r--gdb/symtab.c65
-rw-r--r--gdb/symtab.h29
-rw-r--r--gdb/target.c574
-rw-r--r--gdb/target.h192
-rw-r--r--gdb/testsuite/ChangeLog130
-rw-r--r--gdb/testsuite/config/hmsirom.exp2
-rw-r--r--gdb/testsuite/gdb.base/annota1.exp2
-rw-r--r--gdb/testsuite/gdb.base/call-rt-st.c160
-rw-r--r--gdb/testsuite/gdb.base/call-rt-st.exp24
-rw-r--r--gdb/testsuite/gdb.base/commands.exp12
-rw-r--r--gdb/testsuite/gdb.base/corefile.exp1
-rw-r--r--gdb/testsuite/gdb.base/ending-run.exp5
-rw-r--r--gdb/testsuite/gdb.base/fileio.exp11
-rw-r--r--gdb/testsuite/gdb.base/gcore.exp24
-rw-r--r--gdb/testsuite/gdb.base/selftest.exp5
-rw-r--r--gdb/testsuite/gdb.base/shreloc.exp5
-rw-r--r--gdb/testsuite/gdb.base/watchpoint.exp1
-rw-r--r--gdb/testsuite/gdb.cp/annota2.exp2
-rw-r--r--gdb/testsuite/gdb.cp/annota3.exp2
-rw-r--r--gdb/testsuite/gdb.cp/namespace.exp5
-rw-r--r--gdb/testsuite/gdb.disasm/mn10200.exp478
-rw-r--r--gdb/testsuite/gdb.disasm/sh3.s2
-rw-r--r--gdb/testsuite/gdb.mi/pthreads.c34
-rw-r--r--gdb/testsuite/gdb.threads/gcore-thread.exp22
-rw-r--r--gdb/testsuite/gdb.threads/killed.exp10
-rw-r--r--gdb/testsuite/gdb.threads/pthreads.c24
-rw-r--r--gdb/testsuite/lib/java.exp1
-rw-r--r--gdb/top.c30
-rw-r--r--gdb/tracepoint.c2
-rw-r--r--gdb/tui/ChangeLog5
-rw-r--r--gdb/tui/tui-out.c2
-rw-r--r--gdb/tui/tuiRegs.c6
-rw-r--r--gdb/typeprint.c2
-rw-r--r--gdb/utils.c19
-rw-r--r--gdb/v850-tdep.c18
-rw-r--r--gdb/v850ice.c6
-rw-r--r--gdb/valops.c12
-rw-r--r--gdb/valprint.c6
-rw-r--r--gdb/value.h7
-rw-r--r--gdb/values.c125
-rw-r--r--gdb/vax-tdep.c20
-rw-r--r--gdb/vax-tdep.h6
-rw-r--r--gdb/version.in2
-rw-r--r--gdb/win32-nat.c17
-rw-r--r--gdb/wince.c8
-rw-r--r--gdb/x86-64-linux-nat.c2
-rw-r--r--gdb/x86-64-linux-tdep.c6
-rw-r--r--gdb/x86-64-tdep.c78
-rw-r--r--gdb/x86-64-tdep.h9
-rw-r--r--gdb/xcoffread.c27
-rw-r--r--gdb/xstormy16-tdep.c30
-rw-r--r--gdb/z8k-tdep.c535
-rw-r--r--include/ChangeLog47
-rw-r--r--include/bfdlink.h37
-rw-r--r--include/elf/ChangeLog44
-rw-r--r--include/elf/frv.h1
-rw-r--r--include/elf/mips.h3
-rw-r--r--include/elf/mmix.h9
-rw-r--r--include/elf/ppc.h3
-rw-r--r--include/elf/sh.h62
-rw-r--r--include/elf/xtensa.h7
-rw-r--r--include/floatformat.h3
-rw-r--r--include/gdb/ChangeLog9
-rw-r--r--include/gdb/callback.h2
-rw-r--r--include/hp-symtab.h934
-rw-r--r--include/obstack.h40
-rw-r--r--include/opcode/ChangeLog16
-rw-r--r--include/opcode/m68k.h109
-rw-r--r--include/opcode/mips.h28
-rw-r--r--include/opcode/mmix.h3
-rw-r--r--libiberty/ChangeLog64
-rwxr-xr-xlibiberty/configure1091
-rw-r--r--libiberty/configure.in16
-rw-r--r--libiberty/cplus-dem.c8
-rw-r--r--libiberty/floatformat.c120
-rw-r--r--libiberty/hashtab.c4
-rw-r--r--libiberty/strerror.c3
-rw-r--r--libiberty/testsuite/demangle-expected8
-rw-r--r--libiberty/vasprintf.c17
-rwxr-xr-xltconfig2
-rw-r--r--opcodes/ChangeLog49
-rw-r--r--opcodes/alpha-opc.c5
-rw-r--r--opcodes/arm-dis.c16
-rw-r--r--opcodes/disassemble.c3
-rw-r--r--opcodes/frv-asm.c10
-rw-r--r--opcodes/frv-desc.c1601
-rw-r--r--opcodes/frv-desc.h501
-rw-r--r--opcodes/frv-opc.c538
-rw-r--r--opcodes/frv-opc.h371
-rw-r--r--opcodes/m68hc11-dis.c46
-rw-r--r--opcodes/m68k-dis.c62
-rw-r--r--opcodes/m68k-opc.c730
-rw-r--r--opcodes/mips-dis.c22
-rw-r--r--opcodes/mips-opc.c23
-rw-r--r--opcodes/xtensa-dis.c10
-rw-r--r--sim/ChangeLog17
-rw-r--r--sim/common/ChangeLog18
-rw-r--r--sim/common/callback.c27
-rw-r--r--sim/common/sim-base.h4
-rw-r--r--sim/common/sim-trace.c2
-rw-r--r--sim/configure.in6
-rw-r--r--sim/d10v/ChangeLog5
-rw-r--r--sim/d10v/simops.c2
-rw-r--r--sim/h8300/compile.c112
-rw-r--r--sim/mcore/ChangeLog5
-rw-r--r--sim/mcore/interp.c8
-rw-r--r--sim/ppc/ChangeLog8
-rw-r--r--sim/ppc/Makefile.in2
-rw-r--r--sim/ppc/emul_netbsd.c2
-rw-r--r--sim/sh/ChangeLog11
-rw-r--r--sim/sh/gencode.c38
-rw-r--r--sim/sh/interp.c60
-rw-r--r--sim/sh/syscall.h2
-rw-r--r--sim/testsuite/ChangeLog27
587 files changed, 21602 insertions, 29251 deletions
diff --git a/ChangeLog b/ChangeLog
index 6bd77ff..cdcc97a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,55 @@
+2003-10-20 Phil Edwards <phil@codesourcery.com>
+
+ * configure.in (*-*-vxworks): Add target-libiberty to noconfdirs.
+ * configure: Regenerate.
+
+2003-10-13 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl: Make GCC_FLAGS_TO_PASS a superset of
+ HOST_FLAGS_TO_PASS.
+ * Makefile.in: Regenerate.
+
+2003-10-05 Mohan Embar <gnustuff@thisiscool.com>
+
+ * configure.in: Allow explicit specification of CFLAGS_FOR_BUILD.
+ * configure: Rebuilt
+ * Makefile.tpl: Use CFLAGS_FOR_BUILD computed by configure
+ * Makefile.in: Rebuilt
+
+2003-10-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ltconfig (sys_lib_search_path_spec): Fix a typo for HPUX.
+
+2003-10-01 Phil Edwards <pme@gcc.gnu.org>
+
+ * config-ml.in: Use ac_configure_args directly instead of
+ ml_arguments. Only set ml_norecursion if --no[-]recursion is
+ actually seen.
+
+2003-10-01 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * config-ml.in: Propagate INSTALL variables.
+
+2003-09-21 Daniel Jacobowitz <drow@mvista.com>
+
+ * configure.in: Pass a computed --program-transform-name
+ to subconfigures.
+ * configure: Regenerated.
+
+2003-09-20 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * Makefile.tpl: Don't pass down obsolete ENQUIRE variable.
+ * Makefile.in: Regenerate.
+
+ * Makefile.tpl: Don't pass (unused) DLLTOOL or WINDRES to gcc.
+ * Makefile.in: Regenerate.
+
+2003-09-17 Daniel Jacobowitz <drow@mvista.com>
+
+ * configure.in (TOPLEVEL_CONFIGURE_ARGUMENTS, baseargs): Fix
+ quoting.
+ * configure: Regenerated.
+
2003-09-12 Michael Chastain <mec@shout.net>
Fix PR gdb/857.
@@ -37,10 +89,6 @@
* configure.in: Set RAW_CXX_FOR_TARGET if unset.
* configure: Regenerated.
-2003-08-27 Daniel Jacobowitz <drow@mvista.com>
-
- * config/no-executables.m4: New file.
-
2003-08-23 Phil Edwards <pme@gcc.gnu.org>
* configure.in: Use newline instead of semicolon when assuming
@@ -703,10 +751,6 @@
* Makefile.in: Regenerate.
* configure.in: Remove unnecessary leftovers.
-2002-12-22 Geoffrey Keating <geoffk@apple.com>
-
- * config/mt-aix43: Delete.
-
2002-12-21 Geoffrey Keating <geoffk@apple.com>
* configure.in (extra_ranlibflags_for_target): New variable.
@@ -2951,8 +2995,6 @@ Fri Apr 2 15:11:32 1999 H.J. Lu (hjl@gnu.org)
Thu Mar 18 00:17:50 1999 Mark Elbrecht <snowball3@usa.net>
- * config/mh-go32: Delete.
- * config/mh-djgpp: New. Renamed from mh-go32.
* configure.in (pc-msdosdjgpp): Set host_makefile_frag to
config/mh-djgpp.
@@ -3003,7 +3045,6 @@ Wed Mar 10 17:39:09 1999 Drew Moseley <dmoseley@cygnus.com>
1999-02-24 Stan Shebs <shebs@andros.cygnus.com>
* configure.in (*-*-windows*): Remove, no longer used.
- * config/mh-windows: Ditto.
1999-02-19 Ben Elliston <bje@cygnus.com>
@@ -3069,7 +3110,6 @@ Wed Mar 10 17:39:09 1999 Drew Moseley <dmoseley@cygnus.com>
* config.guess: Add support for i386-pc-interix.
* config.sub: Likewise.
* configure.in: Likewise.
- * config/mh-interix: New file.
1999-01-18 Christopher Faylor <cgf@cygnus.com>
@@ -3082,7 +3122,6 @@ Wed Mar 10 17:39:09 1999 Drew Moseley <dmoseley@cygnus.com>
* configure.in: makefile stub for cygwin target is probably
unnecessary. Remove it for now.
- * config/mt-cygwin: Remove.
1998-12-30 Christopher Faylor <cgf@cygnus.com>
@@ -3090,7 +3129,6 @@ Wed Mar 10 17:39:09 1999 Drew Moseley <dmoseley@cygnus.com>
target as well as the host.
* config.guess: Allow mixed case in cygwin uname output.
* Makefile.in: Add libtermcap target.
- * config/mt-cygwin: New file. libtermcap target info.
1998-12-23 Jeffrey A Law (law@cygnus.com)
@@ -3821,11 +3859,6 @@ Fri Feb 6 01:33:52 1998 Manfred Hollstein <manfred@s-direktnet.de>
* configure: Emit a definition for the new macro enable_shared
into each Makefile.
- * config/mh-sparcpic (PICFLAG): Define to properly according
- to current multilib configuration.
- * config/mt-sparcpic (PICFLAG_FOR_TARGET): Define to properly
- according to current multilib configuration.
-
Thu Feb 5 17:01:12 1998 Jason Molenda (crash@bugshack.cygnus.com)
* configure.in (host_tools, native_only): Add libtool.
@@ -3943,7 +3976,6 @@ Sun Jan 4 01:06:55 1998 Mumit Khan <khan@xraylith.wisc.edu>
* config.sub: Add mingw32 support.
* configure.in: Likewise.
- * config/mh-mingw32: New file.
Sat Jan 3 12:11:05 1998 Franz Sirl <franz.sirl-kernel@lauterbach.com>
@@ -4161,8 +4193,6 @@ Thu Sep 18 15:37:42 1997 Andrew Cagney <cagney@b1.cygnus.com>
1997-09-15 02:37 Ulrich Drepper <drepper@cygnus.com>
- * config/mt-linux: Define CXXFLAGS to make sure -fvtable-thunks is
- used.
* configure.in: Name Linux target fragment.
* configure: Rewrite so that project Makefile fragment is inserted
@@ -4172,10 +4202,6 @@ Tue Sep 16 09:55:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
* Makefile.in (install-itcl): Install tcl first.
-Sun Sep 14 20:53:42 1997 Geoffrey Noer <noer@cygnus.com>
-
- * config/mh-cygwin32: ok to build split texinfo files
-
Fri Sep 12 16:19:20 1997 Geoffrey Noer <noer@cygnus.com>
* configure.in: remove bison from noconfigdirs for Cygwin32 host
@@ -4908,7 +4934,6 @@ Tue Oct 29 16:41:31 1996 Doug Evans <dje@canuck.cygnus.com>
Mon Oct 28 17:32:46 1996 Stu Grossman (grossman@critters.cygnus.com)
* configure.in: Exclude mmalloc from i386-windows.
- * config/mh-windows: Add rules for building MSVC makefiles.
Thu Oct 24 09:22:46 1996 Stu Grossman (grossman@critters.cygnus.com)
@@ -4924,8 +4949,6 @@ Thu Oct 24 09:02:07 1996 Stu Grossman (grossman@critters.cygnus.com)
* Makefile.in (FLAGS_TO_PASS): Add $(HOST_FLAGS) to allow the
host to add it's own flags.
- * config/mh-windows (HOST_FLAGS): Set srcroot, which is needed
- for MSVC build procedure.
Tue Oct 22 15:20:26 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -4976,7 +4999,7 @@ Wed Oct 9 06:06:46 1996 Jeffrey A Law (law@cygnus.com)
Tue Oct 8 08:32:48 1996 Stu Grossman (grossman@critters.cygnus.com)
- * configure.in config/mh-windows: Add support for windows host
+ * configure.in: Add support for windows host
(that is a build done under the Microsoft build environment).
Tue Oct 8 10:39:08 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -5049,26 +5072,10 @@ Mon Sep 16 17:00:52 1996 Ian Lance Taylor <ian@cygnus.com>
* configure.in: Use a single line for host_tools and native_only.
-Tue Sep 16 09:55:07 1997 Andrew Cagney <cagney@b1.cygnus.com>
-
- * Makefile.in (install-itcl): Install tcl first.
-
-Sun Sep 14 20:53:42 1997 Geoffrey Noer <noer@cygnus.com>
-
- * config/mh-cygwin32: ok to build split texinfo files
-
-Fri Sep 12 16:19:20 1997 Geoffrey Noer <noer@cygnus.com>
-
- * configure.in: remove bison from noconfigdirs for Cygwin32 host
-
Mon Sep 9 12:21:30 1996 Doug Evans <dje@canuck.cygnus.com>
* config.sub, configure.in: Add entries for m32r.
-Mon Sep 8 20:46:20 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * config.guess: Merge with FSF.
-
Thu Sep 5 13:52:47 1996 Tom Tromey <tromey@creche.cygnus.com>
* Makefile.in (inet-install): Don't run install-gzip.
@@ -5126,11 +5133,6 @@ Mon Aug 12 13:15:13 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* Makefile.in (CONFIGURE_TARGET_MODULES): If target compiler does
not support --print-multi-lib, don't abort.
-Sun Aug 11 20:51:50 1996 Stu Grossman (grossman@critters.cygnus.com)
-
- * config/mh-cygwin32 (CFLAGS): Define _WIN32 to be compatible
- with normal Windows compilation environment.
-
Thu Aug 8 12:18:59 1996 Klaus Kaempf <kkaempf@progis.de>
* make-all.com: Run config-a-gas.
@@ -5771,12 +5773,6 @@ Mon Dec 4 12:38:15 1995 Ian Lance Taylor <ian@cygnus.com>
* configure: Ignore new autoconf configure options.
-Thu Nov 30 14:45:25 1995 J.T. Conklin <jtc@rtl.cygnus.com>
-
- * config/mt-v810 (CC_FOR_TARGET): Add -ansi flag. NEC compiler
- defaults to K&R mode, but doesn't have varargs.h, so we have to
- compile in ANSI mode.
-
Thu Nov 30 16:57:33 1995 Per Bothner <bothner@wombat.gnu.ai.mit.edu>
* config.guess: Recognize Pentium under SCO.
@@ -5785,8 +5781,6 @@ Thu Nov 30 16:57:33 1995 Per Bothner <bothner@wombat.gnu.ai.mit.edu>
Wed Nov 29 13:49:08 1995 J.T. Conklin <jtc@rtl.cygnus.com>
* configure.in (noconfigdirs): Disable target-libio on v810-*-*.
- * config/mt-v810 (CC_FOR_TARGET, AS_FOR_TARGET, AR_FOR_TARGET,
- RANLIB_FOR_TARGET): Set as appropriate for NEC v810 toolchain.
Wed Nov 29 12:12:01 1995 Ian Lance Taylor <ian@cygnus.com>
@@ -5855,10 +5849,6 @@ Wed Nov 15 11:45:23 1995 Ian Lance Taylor <ian@cygnus.com>
* configure: Handle LD and LD_FOR_TARGET when configuring a
Canadian Cross.
-Tue Nov 14 15:03:12 1995 Jason Molenda (crash@phydeaux.cygnus.com)
-
- * config/mh-i386win32: add LD_FOR_TARGET.
-
Tue Nov 14 14:56:11 1995 Jason Molenda (crash@phydeaux.cygnus.com)
* configure.in (target_libs): add target-winsup.
@@ -6197,10 +6187,6 @@ Mon Sep 18 23:08:26 1995 J.T. Conklin <jtc@rtl.cygnus.com>
* configure.in (noconfigdirs): Disable bfd, binutils, gas, gcc,
gdb, ld and opcodes on v810-*-*.
-Sat Sep 16 18:31:08 PDT 1995 Angela Marie Thomas <angela@cygnus.com>
-
- * config/mh-ncrsvr43: Removed AR_FLAGS
-
Tue Sep 12 18:03:31 1995 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (DO_X): Change do-realclean to do-maintainer-clean.
@@ -6380,8 +6366,6 @@ Mon Jun 5 18:26:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
(FLAGS_TO_PASS): Pass them.
(EXTRA_TARGET_FLAGS): Ditto.
- * config/m?-*pic: Define PICFLAG* instead of LIB*FLAGS*.
-
Wed May 31 22:27:42 1995 Jim Wilson <wilson@chestnut.cygnus.com>
* Makefile.in (all-libg++): Depend on all-libstdc++.
@@ -6545,17 +6529,12 @@ Thu Mar 30 13:51:43 1995 Ian Lance Taylor <ian@cygnus.com>
Tue Mar 28 14:47:34 1995 Jason Molenda (crash@phydeaux.cygnus.com)
- build-all.mk,config/mh-solaris: revert these two changes:
+ Revert this change:
Tue Mar 30 10:03:09 1993 Ian Lance Taylor (ian@cygnus.com)
* build-all.mk: Use CC=cc -Xs on Solaris.
- Mon Mar 29 19:59:26 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * config/mh-solaris: SunPRO C needs -Xs to be able to get a
- working xmakefile for Emacs.
-
Tue Mar 21 10:43:32 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
* glob/*: Removed. Schauer's 24 Feb 1994 readline change made us
@@ -6694,7 +6673,7 @@ Sat Nov 5 18:43:30 1994 Jason Merrill (jason@phydeaux.cygnus.com)
(BASE_FLAGS_TO_PASS): Pass them.
(EXTRA_TARGET_FLAGS): Ditto.
- * configure.in, config/m[th]-*pic: Support --enable-shared.
+ * configure.in: Support --enable-shared.
Sat Nov 5 15:44:00 1994 Per Bothner <bothner@kalessin.cygnus.com>
@@ -7152,7 +7131,6 @@ Fri May 6 14:19:25 1994 Steve Chamberlain (sac@cygnus.com)
(HOST_CC, HOST_PREFIX, HOST_PREFIX_1): Undefine, they should
be set by incoming names or templates.
(INSTALL_LAST): New rule.
- * config/mh-go32: New fragment.
Thu May 5 17:35:05 1994 Stan Shebs (shebs@andros.cygnus.com)
@@ -7160,8 +7138,6 @@ Thu May 5 17:35:05 1994 Stan Shebs (shebs@andros.cygnus.com)
Thu May 5 20:06:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
- * config/mh-lynxrs6k: Renamed from mh-lynxosrs6k, to make it
- unique in 8.3 naming schemes.
* configure.in (appdirs): New variable. Currently empty, but will
be used in gas distribution. If nonempty, lists a set of
directories at least one of which must get configured, or top
@@ -7393,10 +7369,6 @@ Wed Feb 2 14:53:05 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
* Makefile.in, test-build.mk: Remove MUNCH_NM; it was only needed
for GDB and GDB has been fixed to not need it.
-Mon Jan 31 18:40:55 1994 Stu Grossman (grossman at cygnus.com)
-
- * config/mh-lynxosrs6k: Account for lack of ranlib!
-
Sun Jan 30 17:58:06 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
* config.guess: Recognize vax hosts.
@@ -7482,7 +7454,6 @@ Thu Dec 2 14:35:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
libg++ or libio for any Alpha target.
* configure.in (mips*-sgi-irix5*): New target; use mh-irix5.
- * config/mh-irix5. New file for Irix 5.
Wed Dec 1 17:00:33 1993 Jason Merrill (jason@deneb.cygnus.com)
@@ -7651,10 +7622,6 @@ Fri Oct 8 14:15:39 1993 Ken Raeburn (raeburn@cygnus.com)
* config.sub: Accept linux*coff and linux*elf as operating
systems.
-Tue Oct 7 14:24:41 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ltmain.sh: Handle symlinks in generated script.
-
Thu Oct 7 12:57:19 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* config.sub: Recognize mips64, and mips3 as an alias for it.
@@ -7679,27 +7646,11 @@ Mon Oct 4 16:15:09 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
--with options (but still pass them down on the command line,
if they were explicitly specified).
-Wed Oct 1 13:11:27 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * configure: Handle autoconf style directory options: --bindir,
- --datadir, --includedir, --infodir, --libdir, --libexecdir,
- --mandir, --oldincludedir, --sbindir, --sharedstatedir,
- --sysconfdir.
- * Makefile.in (sbindir, libexecdir, sysconfdir): New variables.
- (sharedstatedir, localstatedir, oldincludedir): New variables.
- (BASE_FLAGS_TO_PASS): Pass down bindir, datadir, includedir,
- infodir, libdir, libexecdir, localstatedir, mandir, oldincludedir,
- sbindir, sharedstatedir, and sysconfdir.
-
Fri Sep 24 19:11:13 1993 david d `zoo' zuhn (zoo@rtl.cygnus.com)
* configure: substitute SHELL value in Makefile.in with
${CONFIG_SHELL}
-Wed Sep 24 15:18:32 1997 Ian Lance Taylor <ian@cygnus.com>
-
- * ltmain.sh: Tweak shell pattern to avoid bug in NetBSD /bin/sh.
-
Thu Sep 23 18:05:13 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* configure.in: Build gas, ld, and binutils for *-*-sysv4* and
@@ -8193,8 +8144,6 @@ Sat Apr 17 17:19:50 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* configure.in: rename m88k-motorola-m88kbcs to m88k-motorola-sysv
- * config/mh-delta88: remove extraneous GCC references
-
Tue Apr 13 16:52:16 1993 Brendan Kehoe (brendan@lisa.cygnus.com)
* Makefile.in (PRMS): Set back to all-prms.
@@ -8270,8 +8219,7 @@ Wed Mar 31 21:20:58 1993 K. Richard Pixley (rich@rtl.cygnus.com)
Wed Mar 31 12:31:56 1993 Ian Lance Taylor (ian@cygnus.com)
- * build-all.mk, config/mh-irix4: Bump -XNh value to 1500 to match
- gcc requirements.
+ * build-all.mk: Bump -XNh value to 1500 to match gcc requirements.
* Makefile.in: Complete overhaul to merge many almost identical
targets.
@@ -8289,13 +8237,6 @@ Tue Mar 30 10:03:09 1993 Ian Lance Taylor (ian@cygnus.com)
* build-all.mk: Use CC=cc -Xs on Solaris.
-Mon Mar 29 19:59:26 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * config/mh-sun3: cc needs -J to compile cp-parse.c correctly
-
- * config/mh-solaris: SunPRO C needs -Xs to be able to get a
- working xmakefile for Emacs.
-
Thu Mar 25 15:14:30 1993 Fred Fish (fnf@cygnus.com)
* Makefile.in: Incorporate changes suggested by wilson@cygnus.com
@@ -8389,7 +8330,6 @@ Tue Mar 2 21:15:58 1993 Fred Fish (fnf@cygnus.com)
(Ultrix 2.2 support from Michael Rendell <michael@mercury.cs.mun.ca>)
* configure.in (vax-*-ultrix2*): Add Ultrix 2.2 triplet.
* config.guess: Change 'VAX*:ULTRIX:*:*' to 'VAX*:ULTRIX*:*:*'.
- * config/mh-vaxult2: New file.
Tue Mar 2 18:11:03 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
@@ -8559,8 +8499,6 @@ Sat Jan 23 20:32:01 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* Makefile.in: define and pass down X11_LIB
- * config/mh-sco: define X11_LIB to the mess that SCO ODT requires
-
Sat Jan 23 13:49:40 1993 Per Bothner (bothner@cygnus.com)
* guess-systype: Renamed to ...
@@ -8623,8 +8561,6 @@ Sun Jan 3 15:15:09 1993 Steve Chamberlain (sac@thepub.cygnus.com)
Tue Dec 29 15:06:00 1992 Ian Lance Taylor (ian@cygnus.com)
- * config/mh-sco: Don't override BISON definition.
-
* build-all.mk: If canonhost is i386-unknown-sco3.2v4, change it
to i386-sco3.2v4. Set TARGETS and CFLAGS for i386-sco3.2v4.
(all-cygnus, native, build-cygnus): Make
@@ -8689,10 +8625,6 @@ Fri Dec 11 20:18:02 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* Makefile.in: m4 depends on libiberty
-Mon Dec 7 06:43:27 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * config/mh-sco: don't default $(CC) to gcc
-
Thu Dec 3 21:52:11 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* configure.in: add m4, textutils, fileutils, sed, shellutils,
@@ -8705,14 +8637,6 @@ Mon Nov 30 14:54:34 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* configure.in: use mh-sun for all *-sun-* hosts
- * config/mh-solaris: rework standard X location to use
- $OPENWINHOME, if defined.
-
- * config/mh-sun: handle X11 include locations
-
- * config/mh-decstation: define NeedFunctionPrototypes to 0, to
- work around dain-bramaged DECwindows include files
-
Fri Nov 27 18:35:54 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* Makefile.in: define flags for X11 include files and library file
@@ -8720,9 +8644,6 @@ Fri Nov 27 18:35:54 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* build-all.mk: added a 'native' target, to 3stage the native toolchain
- * config/{mh-hpux,mh-solaris}: define the "standard" locations for
- the vendor supplied X11 headers and libraries
-
Sun Nov 22 18:59:13 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* configure.in: start building libg++ for HP-UX targets
@@ -8979,11 +8900,6 @@ Tue Aug 4 01:12:43 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* configure.texi, standards.texi: fix INFO-DIR-ENTRY
-Mon Aug 3 15:41:28 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
-
- * config/mh-solaris: removed the -xs from CFLAGS (let the people
- with Sun's C compiler deal with it themselved)
-
Mon Aug 3 00:34:17 1992 Fred Fish (fnf@cygnus.com)
* config.sub (ncr3000): Change i386 to i486.
@@ -9028,11 +8944,6 @@ Thu Jul 16 16:05:28 1992 K. Richard Pixley (rich@rtl.cygnus.com)
* .cvsignore: ignore some stuff that comes from test-build.mk.
-Wed Jul 8 00:01:30 1992 Stu Grossman (grossman at cygnus.com)
-
- * config/mh-solaris: Use -xs when compiling so that Sun-C puts
- a symbol-table into the executable.
-
Tue Jul 7 00:24:52 1992 Fred Fish (fnf@cygnus.com)
* config.sub: Add es1800 (m68k-ericsson-es1800).
@@ -9056,11 +8967,6 @@ Fri Jun 19 15:19:40 1992 Stu Grossman (grossman at cygnus.com)
* config.sub: HPPA merge.
-Mon Jun 15 12:31:52 1992 Fred Fish (fnf@cygnus.com)
-
- * config/mh-ncr3000 (INSTALL): Don't use /usr/ucb/install,
- it is broken on ncr 3000's.
-
Sun Jun 14 10:29:19 1992 John Gilmore (gnu at cygnus.com)
* Makefile.in: Replace all-bison with all-byacc in all
@@ -9070,10 +8976,6 @@ Fri Jun 12 22:21:57 1992 John Gilmore (gnu at cygnus.com)
* config.sub: Add sun4sol2 => sparc-sun-solaris2.
-Tue Jun 9 17:18:11 1992 Fred Fish (fnf at cygnus.com)
-
- * config/{mh-ncr3000, mh-sysv4}: Add INSTALL.
-
Thu Jun 4 12:07:32 1992 Mark Eichin (eichin@cygnus.com)
* Makefile.in: make gprof rules similar to byacc rules (instead of
@@ -9171,8 +9073,6 @@ Wed Apr 22 18:06:55 1992 K. Richard Pixley (rich@rtl.cygnus.com)
Wed Apr 22 14:38:34 1992 Fred Fish (fnf@cygnus.com)
- * config/mh-delta88, config/mh-ncr3000: Replace MINUS_G with
- CFLAGS per new configuration strategy.
* configure: Test for existance of files before trying to mv
them, to avoid numerous non-existance messages.
@@ -9334,7 +9234,7 @@ Thu Mar 5 21:45:07 1992 K. Richard Pixley (rich@sendai)
Thu Mar 5 12:05:58 1992 Stu Grossman (grossman at cygnus.com)
- * config.sub configure.in config/mh-irix4 gdb/configure.in
+ * config.sub configure.in gdb/configure.in
gdb/mips-tdep.c gdb/mipsread.c gdb/procfs.c gdb/signame.h
gdb/tm-irix3.h gdb/tm-mips.h gdb/xm-irix4.h gdb/config/mt-irix3
gdb/config/mh-irix4 texinfo/configure.in: Port to SGI Irix-4.x.
@@ -9395,7 +9295,7 @@ Fri Jan 31 02:27:32 1992 John Gilmore (gnu at cygnus.com)
Thu Jan 30 16:17:30 1992 Stu Grossman (grossman at cygnus.com)
- * bfd/configure.in, config/mh-sco, gdb/config/mh-i386sco,
+ * bfd/configure.in, gdb/config/mh-i386sco,
gdb/config/mt-i386v32, gdb/configure.in, readline/configure.in:
Fix SCO configuration stuff.
diff --git a/Makefile.in b/Makefile.in
index 6bce12a..fc0fcc9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -142,7 +142,7 @@ PWD_COMMAND = $${PWDCMD-pwd}
# compilers to use to create programs which must be run in the build
# environment.
CC_FOR_BUILD = @CC_FOR_BUILD@
-CFLAGS_FOR_BUILD = $(CFLAGS)
+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
CXX_FOR_BUILD = $(CXX)
@@ -511,16 +511,8 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
# The BUILD_* variables are a special case, which are used for the gcc
# cross-building scheme.
EXTRA_GCC_FLAGS = \
- 'AR=$(AR)' \
- 'AS=$(AS)' \
- 'CC=$(CC)' \
- 'CXX=$(CXX)' \
- 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
'BUILD_PREFIX=$(BUILD_PREFIX)' \
'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
- 'NM=$(NM)' \
- 'RANLIB=$(RANLIB)' \
- 'WINDRES=$$(WINDRES_FOR_TARGET)' \
"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
@@ -529,11 +521,10 @@ EXTRA_GCC_FLAGS = \
"`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
- "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
"`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
-GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(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 \
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index a2f8f86..2fd5efe 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,873 @@
+2003-11-11 Nick Clifton <nickc@redhat.com>
+
+ * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
+ info->executable not info->shared to decide if a .interp section
+ should be present.
+ * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
+ * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
+ * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
+ * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
+ * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
+ * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
+ * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
+ * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
+ * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
+ * elflink.h (size_dynamic_sections): Likewise.
+
+2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
+
+ * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
+ (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
+ found initialise the tls data directory entry.
+
+2003-11-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (ppc_elf_install_value): Delete.
+ (shared_stub_entry, stub_entry): Make them arrays of ints.
+ Remove initial branch.
+ (ppc_elf_relax_section): Write one branch around all trampolines
+ instead. Correct bogus R_PPC_PLTREL24 handling. Correct
+ branch range check. Only use shared_stub_entry when shared.
+ Test that branches can reach stubs. Write trampolines out at
+ end so that just one realloc is used. Handle little-endian
+ mode. Move relevant code from ppc_elf_install_value to here.
+ (ppc_elf_relocate_section): Move code handling RELAX32 from
+ ppc_elf_install_value to here.
+
+2003-11-06 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
+ (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
+ cases.
+ (shared_stub_entry): Correct opcode.
+ (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
+ (ppc_elf_relocate_section): Handle them.
+
+2003-11-05 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
+ updated section in case of merged section.
+ * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
+ * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
+ * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
+ * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
+ * elf32-arm.h (elf32_arm_relocate_section): Likewise.
+ * elf32-avr.c (elf32_avr_relocate_section): Likewise.
+ * elf32-cris.c (cris_elf_relocate_section): Likewise.
+ * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
+ * elf32-frv.c (elf32_frv_relocate_section): Likewise.
+ * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+ * elf32-i370.c (i370_elf_relocate_section): Likewise.
+ * elf32-i860.c (elf32_i860_relocate_section): Likewise.
+ * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
+ * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
+ * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-s390.c (elf_s390_relocate_section): Likewise.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf32-v850.c (v850_elf_relocate_section) Likewise.
+ * elf32-vax.c (elf_vax_relocate_section): Likewise.
+ * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
+ * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+ * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
+
+ * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
+ section for reloc output.
+ * elf32-i370.c (i370_elf_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf32-vax.c (elf_vax_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
+ for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
+ return value.
+ * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
+ sec->id.
+
+2003-11-05 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
+ (elf32_d10v_relocate_section): Use them to handle -r reloc
+ adjustments, and in place of _bfd_elf_rela_local_sym.
+
+ * cpu-iq2000.c (arch_info_struct): Warning fix.
+
+2003-11-05 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
+ (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
+ weakdefs.
+ (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
+ (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
+ NON_GOT_REF.
+ (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
+ SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
+ non-default visibility.
+ (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
+ SYMBOL_CALLS_LOCAL.
+
+2003-11-04 Alan Modra <amodra@bigpond.net.au>
+
+ * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
+ * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
+ * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
+ * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
+ * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
+ * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
+ * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
+
+ * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
+ "dereferencing type-punned pointer" warnings.
+
+ * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
+ * aoutx.h (NAME(aout,set_section_contents)): Ditto.
+ * bfd-in2.h: Regenerate.
+ * binary.c (binary_set_section_contents): Ditto.
+ * bout.c (b_out_set_section_contents): Ditto.
+ * coff-tic54x.c (tic54x_set_section_contents): Ditto.
+ * coffcode.h (coff_set_section_contents): Ditto.
+ * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
+ * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
+ * elf.c (_bfd_elf_set_section_contents): Ditto.
+ * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
+ * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
+ * i386msdos.c (msdos_set_section_contents): Ditto.
+ * ieee.c (ieee_set_section_contents): Ditto.
+ * ihex.c (ihex_set_section_contents): Ditto.
+ * libaout.h (NAME(aout,set_section_contents)): Ditto.
+ * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
+ (_bfd_generic_set_section_contents): Ditto.
+ * libbfd.h: Regenerate.
+ * libbfd.c (_bfd_generic_set_section_contents): Ditto.
+ * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
+ * libnlm.h (nlmNAME(set_section_contents)): Ditto.
+ (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
+ * mmo.c (mmo_set_section_contents): Ditto.
+ * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
+ * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
+ * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
+ * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
+ * nlmcode.h (nlm_set_section_contents): Ditto.
+ * oasys.c (oasys_set_section_contents): Ditto.
+ * pdp11.c (NAME(aout,set_section_contents)): Ditto.
+ * ppcboot.c (ppcboot_set_section_contents): Ditto.
+ * srec.c (srec_set_section_contents): Ditto.
+ * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
+ * tekhex.c (tekhex_set_section_contents): Ditto.
+ (move_section_contents): Ditto.
+ * versados.c (versados_set_section_contents): Ditto.
+ * vms-misc.c (_bfd_save_vms_section): Ditto.
+ * vms.c (vms_set_section_contents): Ditto.
+ * vms.h (_bfd_save_vms_section): Ditto.
+
+2003-11-04 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
+ rather than htab.
+ (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
+ relbrlt size.
+ (ppc64_elf_build_stubs): Allocate space for relbrlt.
+
+2003-11-04 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd-in.h (_bfd_elf_tls_setup): Declare.
+ * bfd-in2.h: Regenerate.
+ * elf-bfd.h (struct elf_link_tls_segment): Delete.
+ (struct elf_link_hash_table): Add tls_sec and tls_size.
+ * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
+ * elflink.c (_bfd_elf_tls_setup): New function.
+ * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
+ (elf_bfd_final_link): Don't set first_tls_sec here. Update code
+ saving tls segment info, round segment size up.
+ (elf_link_output_extsym): Adjust code using tls segment info.
+ (elf_link_input_bfd): Likewise.
+ * elf32-i386.c (dtpoff_base, tpoff): Likewise.
+ * elf32-s390.c (dtpoff_base, tpoff): Likewise.
+ * elf32-sh.c (dtpoff_base, tpoff): Likewise.
+ * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
+ * elf64-s390.c (dtpoff_base, tpoff): Likewise.
+ * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
+ (elfNN_ia64_dtprel_base): Likewise.
+ * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
+ (alpha_get_tprel_base): Likewise.
+ (struct alpha_relax_info): Remove tls_segment.
+ (elf64_alpha_relax_got_load): Adjust invocation of
+ alpha_get_dtprel_base and alpha_get_tprel_base.
+ (elf64_alpha_relax_tls_get_addr): Likewise.
+ (elf64_alpha_relax_section): Likewise.
+ (elf64_alpha_relocate_section): Likewise.
+ (elf64_alpha_relax_find_tls_segment): Delete.
+ * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
+ (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
+ (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
+ * elf32-ppc.h (ppc_elf_tls_setup): Update.
+ * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
+ (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
+ (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
+ (ppc64_elf_relocate_section): Likewise.
+ * elf64-ppc.h (ppc64_elf_tls_setup): Update.
+
+2003-11-03 Daniel Jacobowitz <drow@mvista.com>
+
+ * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
+ * elf-m10300.c (elf_backend_plt_header_size): Don't define.
+ * elf32-arm.h (elf_backend_plt_header_size): Don't define.
+ * elf32-cris.c (elf_backend_plt_header_size): Don't define.
+ * elf32-i386.c (elf_backend_plt_header_size): Don't define.
+ * elf32-mips.c (elf_backend_plt_header_size): Don't define.
+ * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
+ * elf32-s390.c (elf_backend_plt_header_size): Don't define.
+ * elf32-sh.c (elf_backend_plt_header_size): Don't define.
+ * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
+ * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
+ * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
+ * elf64-mips.c (elf_backend_plt_header_size): Don't define.
+ * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
+ * elf64-s390.c (elf_backend_plt_header_size): Don't define.
+ * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
+ * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
+ * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
+ * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
+ * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
+ * elfxx-target.h (elf_backend_plt_header_size): Don't define
+ or include in target initializer.
+
+2003-11-03 Andrew Cagney <cagney@redhat.com>
+
+ * section.c (bfd_set_section_contents): Make the "location" buffer
+ constant.
+ * bfd-in2.h: Re-generate.
+
+2003-10-30 Andrew Cagney <cagney@redhat.com>
+
+ * syms.c: Replace "struct symbol_cache_entry" with "struct
+ bfd_symbol".
+ * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
+ * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
+ * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
+ * bfd-in2.h: Re-generate.
+
+2003-10-30 Jakub Jelinek <jakub@redhat.com>
+
+ * elfxx-ia64.c: Include objalloc.h, hashtab.h.
+ (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
+ fields.
+ (struct elfNN_ia64_local_hash_table): Remove.
+ (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
+ to htab_t. Add loc_hash_memory field.
+ (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
+ Removed.
+ (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
+ functions.
+ (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
+ loc_hash_table. Initialize loc_hash_memory.
+ (elfNN_ia64_hash_table_free): New function.
+ (elfNN_ia64_local_hash_lookup): Remove.
+ (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
+ callback.
+ (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
+ (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
+ (bfd_elfNN_bfd_link_hash_table_free): Define.
+
+2003-10-30 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
+ symbol string in place.
+
+2003-10-30 Jim Blandy <jimb@redhat.com>
+
+ * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
+ object's mach field: all PowerPC machines are supersets of the
+ original rs6000, but not later rs6000 machines.
+
+2003-10-30 Alan Modra <amodra@bigpond.net.au>
+
+ * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
+ Add "val" and "sval" fields.
+ (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
+ (read_attribute_value): Expand and adjust DW_* occurrences.
+ (scan_unit_for_functions, parse_comp_unit): Likewise.
+
+2003-10-30 Phil Edwards <phil@codesourcery.com>
+
+ * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
+ other common ELF triples.
+ (i[3-7]86-*-vxworks): Change to ELF format.
+ (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
+ (sh-*-vxworks): New stanza.
+
+2003-10-30 Lars Knoll <lars@trolltech.com>
+ Michael Matz <matz@suse.de>
+ Jakub Jelinek <jakub@redhat.com>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * merge.c (struct sec_merge_sec_info): Update comment.
+ (struct sec_merge_hash_entry): Remove entsize.
+ (sec_merge_hash_lookup): Only adjust alignment when creating.
+ (sec_merge_emit): Remove register keyword.
+ (cmplengthentry, last4_eq, last_eq): Delete.
+ (strrevcmp, strrevcmp_align, is_suffix): New.
+ (merge_strings): Use them to implement fast suffix merging.
+ * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
+ Make "len" signed.
+ (_bfd_elf_strtab_add): Lose on >2G strings.
+ (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
+ (cmplengthentry, last4_eq): Delete.
+ (strrevcmp, is_suffix): New.
+ (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
+
+2003-10-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
+ SEC_ALLOC.
+
+2003-10-29 Philip Blundell <philb@gnu.org>
+
+ * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
+ code sequence.
+ (PLT_HEADER_SIZE): New.
+ (struct elf32_arm_pcrel_relocs_copied): Rename to ...
+ (struct elf32_arm_relocs_copied): ... this. Count both
+ pcrel and non-pcrel relocs. All uses updated.
+ (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
+ sections and symbol/section mapping cache.
+ (create_got_section): New.
+ (elf32_arm_create_dynamic_sections): New.
+ (elf_backend_create_dynamic_sections): Use it.
+ (elf32_arm_final_link_relocate): Support garbage collection of relocs.
+ (elf32_arm_check_relocs): Likewise.
+ (elf32_arm_adjust_dynamic_symbol): Likewise.
+ (elf32_arm_copy_indirect_symbol): New.
+ (elf32_arm_link_hash_table_create): Initialise new fields.
+ (elf32_arm_gc_sweep_hook): Implement.
+ (elf32_arm_discard_copies): Delete.
+ (elf32_arm_finish_dynamic_symbol): Use new PLT code.
+ (elf32_arm_finish_dynamic_sections): Likewise.
+ (elf_backend_can_refcount): Define.
+ (elf_backend_copy_indirect_symbol): Likewise.
+ (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
+
+2003-10-29 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (elf_backend_grok_prstatus): Define.
+ (elf_backend_grok_psinfo): Define.
+ (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
+
+ * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
+ sections with the same name.
+ (elfcore_grok_lwpstatus): Likewise.
+ (elfcore_grok_win32pstatus): Likewise.
+ (elfcore_grok_note): Likewise.
+ (elfcore_grok_nto_status): Likewise.
+ (elfcore_grok_nto_gregs): Likewise.
+
+2003-10-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
+ objects.
+
+2003-10-14 Richard Sandiford <rsandifo@redhat.com>
+
+ * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
+
+2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
+ hash table for real symbols.
+
+2003-10-23 Michael Snyder <msnyder@redhat.com>
+
+ * section.c (asection): Fix typo in comment.
+
+2003-10-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
+ reloc symbol index to it. Don't allow gd syms in shared libs
+ to be optimized.
+ (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
+ (ppc64_elf_size_stubs): Likewise.
+ (ppc64_elf_relocate_section): Check that tls relocs are only used
+ with tls syms, and similarly for non-tls. Correct symbol used
+ when optimizing toc tls code.
+
+2003-10-22 Nick Clifton <nickc@redhat.com>
+
+ * peicode.h (coff_swap_scnhdr_in): Only remove padding when
+ processing an executable.
+
+2003-10-22 Jakub Jelinek <jakub@redhat.com>
+
+ * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
+ field changes.
+ (_bfd_elf_link_assign_sym_version): Likewise.
+ * elflink.h (size_dynamic_sections): Likewise.
+
+2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
+ Michael Snyder <msnyder@redhat.com>
+
+ * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
+ bfd_mach_sh4a_nofpu): New machine types.
+ * bfd-in2.h: Rebuilt.
+ * cpu-sh.c (compatible): Remove unused function.
+ (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
+ (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
+
+2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
+
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
+ describing mismatched formats involving the Maverick FP type.
+
+2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
+
+ * binary.c (binary_object_p): Pass machine flag along with
+ architecture.
+
+2003-10-21 Thorsten Brehm <brehm@gmx.net>
+
+ * archures.c (bfd_default_scan): Add support for mcf528x.
+ * ieee.c (ieee_write_processor): Likewise.
+
+2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
+ Bernardo Innocenti <bernie@develer.com>
+
+ * archures.c: Add MCF528x (MCFv4) support.
+ * bfd/cpu-m68k.c (arch_info_struct): Likewise.
+ * bfd-in2.h: Regenerate.
+
+2003-10-20 Andrew Cagney <cagney@redhat.com>
+
+ * targets.c: Replace "struct sec" with "struct bfd_section"
+ * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
+ * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
+ * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
+ * aout-tic30.c, aout-target.h:
+ * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
+
+2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
+
+ Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
+ * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
+ (struct _mmix_elf_section_data): New member pjs.
+ (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
+ functions.
+ (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
+ (mmix_reloc_map): Ditto.
+ (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
+ (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
+ (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
+ unused.
+ (mmix_elf_check_relocs): Move early return to after
+ mmix_elf_check_common_relocs call.
+ (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
+ (_bfd_mmix_before_linker_allocation): Rename from
+ _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
+ Arrange to set the initial relaxable size of sections.
+ (_bfd_mmix_after_linker_allocation): Rename from
+ _bfd_mmix_finalize_linker_allocated_gregs.
+ (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
+ (bfd_elf64_get_section_contents): Define.
+ * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
+ * libbfd.h, bfd-in2.h: Regenerate.
+
+ * reloc.c (bfd_generic_relax_section): Default-set
+ section->_cooked_size here.
+ (bfd_generic_get_relocated_section_contents): Don't set it here.
+ Explain why.
+
+2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
+ output section has been discarded.
+
+2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
+
+ * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
+ (h8300_reloc16_extra_cases): Likewise.
+ (h8300_bfd_link_add_symbols): Likewise.
+
+2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
+
+ * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
+ (h8300sn_info_struct): Likewise.
+ (h8300hn_info_struct): Likewise.
+
+2003-10-16 Pavel Roskin <proski@gnu.org>
+
+ * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
+ for sections which lack size info.
+
+2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
+ mingw32.
+
+2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
+ undefined patterns with '*'.
+
+2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
+ use the last CIE from a different section.
+ (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
+ size of the output section.
+
+2003-10-07 Roland McGrath <roland@redhat.com>
+
+ * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
+ new section from p_align header field.
+
+2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-xtensa.c (xtensa_read_table_entries): The external size
+ of entry is 8 bytes.
+
+2003-10-15 Andrew Cagney <cagney@redhat.com>
+
+ * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
+ with NAME##_canonicalize_symtab.
+ * libcoff-in.h (coff_canonicalize_symtab): Update.
+ * xsym.h (bfd_sym_canonicalize_symtab): Update.
+ * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
+ * coffgen.c (coff_canonicalize_symtab): Update.
+ * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
+ * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
+ * ieee.c (ieee_vec): Update comment.
+ * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
+ * mmo.c (mmo_canonicalize_symtab): Update.
+ * nlm-target.h (nlm_canonicalize_symtab): Update.
+ * nlmcode.h (nlm_canonicalize_symtab): Update.
+ * i386msdos.c (msdos_canonicalize_symtab): Update.
+ * hp300hpux.c (MY (canonicalize_symtab)): Update.
+ * oasys.c (oasys_canonicalize_symtab): Update.
+ * som.c (som_canonicalize_symtab): Update.
+ * pef.c (bfd_pef_canonicalize_symtab): Update.
+ * nlmcode.h (nlm_canonicalize_symtab): Update.
+ * xsym.c (bfd_sym_canonicalize_symtab): Update.
+ * vms.c (vms_canonicalize_symtab): Update.
+ * versados.c (versados_canonicalize_symtab): Update.
+ * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
+ * ieee.c (ieee_canonicalize_symtab): Update.
+ * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
+ * reloc.c: Update comment.
+ * libaout.h (NAME(aout,canonicalize_symtab)): Update.
+ * coff64-rs6000.c (aix5coff64_vec): Update.
+ * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
+ * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
+ * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
+ * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
+ * hp300hpux.c (MY_canonicalize_symtab): Update.
+ * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
+ * aout-tic30.c (MY_canonicalize_symtab): Update.
+ * aout-target.h (MY_canonicalize_symtab): Update.
+ * ppcboot.c (ppcboot_canonicalize_symtab): Update.
+ * elf.c (_bfd_elf_canonicalize_symtab): Update.
+ * elfcode.h (elf_canonicalize_symtab): Update.
+ * ihex.c (ihex_canonicalize_symtab): Update.
+ * tekhex.c (tekhex_canonicalize_symtab): Update.
+ * binary.c (binary_canonicalize_symtab): Update.
+ * srec.c (srec_canonicalize_symtab): Update.
+
+2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
+
+ * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
+
+2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
+ relocations.
+ (sh_elf_check_relocs): Likewise.
+
+ * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
+ (sh64_elf_merge_symbol_attribute): New.
+ * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
+ (sh64_elf64_merge_symbol_attribute): New.
+
+2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf-bfd.h (struct elf_backend_data): New function pointer member
+ elf_backend_merge_symbol_attribute.
+ * elflink.h (elf_link_add_object_symbols): Adjust call to
+ elf_backend_merge_symbol_attribute if the backend defined it.
+ * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
+ (elfNN_bed): Add that to the initializer.
+
+2003-10-14 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (get_is_linkonce_section): Delete.
+ (xtensa_is_property_section, xtensa_is_littable_section): Use
+ XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
+ linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
+ (xtensa_get_property_section_name): Check section name instead of
+ calling get_is_linkonce_section. Remove unused bfd parameter. Use
+ XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
+ linkonce section names by appending ".xt.insn" or ".xt.lit".
+ (xtensa_read_table_entries): Remove bfd argument in call to
+ xtensa_get_property_section_name. Free section name when done.
+ (elf_xtensa_combine_prop_entries): Free leaking table.
+
+2003-10-13 Richard Sandiford <rsandifo@redht.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
+ DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
+ (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
+ handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
+ that were needed.
+ (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
+ (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
+
+2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
+ (bfd_elf64_ia64_after_parse): Likewise.
+ * bfd-in2.h: Regenerated.
+
+ * elfxx-ia64.c (oor_ip): New.
+ (oor_branch_size): Likewise.
+ (bfd_elfNN_ia64_after_parse): Likewise.
+ (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
+ equals sizeof (oor_ip).
+
+2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
+ renumbering of some relocation numbers.
+
+2003-10-11 Alan Modra <amodra@bigpond.net.au>
+
+ * coff-sh.c: Move definition of MAP and guard more code with
+ COFF_IMAGE_WITH_PE.
+
+ * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
+ * bfd-in2.h: Regenerate.
+
+2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Likewise.
+
+2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * cofflink.c: Include "safe-ctype.h".
+ (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
+
+2003-10-08 Dave Brolley <brolley@redhat.com>
+ On behalf of Michael Snyder <msnyder@redhat.com>
+
+ * archures.c: Add FRV fr550 machine.
+ * cpu-frv.c: Ditto.
+ * elf32-frv.c: Ditto.
+ * bfd-in2.h: Regenerate.
+
+2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
+ for non-SGI N64 ABI. Improve code consitency.
+
+2003-10-07 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
+ rightshift to 2.
+
+2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * libbfd-in.h (_bfd_link_section_stabs): Add string offset
+ parameter.
+ * cofflink.c (coff_link_add_symbols): Deal with split stab
+ sections.
+ * elflink.h (elf_link_add_object_symbols): Deal with split stab
+ sections.
+ * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
+ * libbfd.h: Regenerated.
+
+ * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
+ overflow, set reloc start position to after the count
+ reloc. Subtract one from num relocs. Give error on 0xffff relocs
+ and no overflow.
+ * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
+ overflow.
+ * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
+ 0xffff.
+
+2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
+ last CIE/FDE if needed.
+
+2003-10-06 Nick Clifton <nickc@redhat.com>
+
+ * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
+ BFD64 is enabled.
+
+2003-10-06 Matt Thomas <matt@3am-software.com>
+
+ * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
+
+2003-10-06 Robert Millan <robertmh@gnu.org>
+
+ * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
+ * config.bfd: Likewise.
+ * configure: Regenerate.
+
+2003-10-04 Christian Groessler <chris@groessler.org>
+
+ * coff-z8k.c (extra_case): Fix displacement length check for R_JR
+ and R_CALLR.
+
+2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
+
+ * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
+ * elf32-m68hc11.c: Likewise.
+ * elf32-m68hc12.c: Likewise.
+ * elf32-m68hc1x.h: Likewise.
+
+2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
+
+ * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
+ of flags between HC12 and HCS12.
+
+2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
+
+ * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
+ which become empty after merging.
+
+2003-09-30 Jakub Jelinek <jakub@redhat.com>
+
+ * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
+ R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
+
+2003-09-30 Chris Demetriou <cgd@broadcom.com>
+
+ * archures.c (bfd_mach_mipsisa64r2): New define.
+ * bfd-in2.h: Regenerate.
+ * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
+ * cpu-mips.c (I_mipsisa64r2): New enum value.
+ (arch_info_struct): Add entry for I_mipsisa64r2.
+ * elfxx-mips.c (_bfd_elf_mips_mach)
+ (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
+ (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
+ (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
+
+2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
+ Handle SHN_IA_64_ANSI_COMMON.
+ (elf_backend_section_from_bfd_section): Defined.
+
+2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.c (elf_link_read_relocs_from_section): Add an argument
+ of a pointer to section. Check bad symbol index.
+ (_bfd_elf_link_read_relocs): Modify calls to
+ elf_link_read_relocs_from_section.
+
+2003-09-23 DJ Delorie <dj@redhat.com>
+
+ * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
+ R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
+ R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
+ R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
+ R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
+ R_SH_PSHA, R_SH_PSHL added.
+ (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
+ (sh_elf_relocate_section): Support new relocs.
+
+2003-09-23 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
+ dynamic relocation offsets.
+
+2003-09-23 Alan Modra <amodra@bigpond.net.au>
+
+ * simple.c (bfd_simple_get_relocated_section_contents): Free the
+ hash table using _bfd_generic_link_hash_table_free.
+
+2003-09-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
+ type of prefix_length and suffix_length to int. Rename "attributes"
+ to "attr". Comment.
+ (_bfd_elf_get_sec_type_attr): Update prototype.
+ * elf.c (get_special_section): Rewrite.
+ (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
+ attr and type pointers.
+ (_bfd_elf_new_section_hook): Adjust for above.
+ (special_sections): Merge suffix with prefix. Set
+ prefix_length for all entries. Set suffix_length appropriately.
+ * elf32-m32r.c (m32r_elf_special_sections): Likewise.
+ * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
+ * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
+ * elf32-mcore.c (mcore_elf_special_sections): Likewise.
+ * elf32-sh64.c (sh64_elf_special_sections): Likewise.
+ * elf32-v850.c (v850_elf_special_sections): Likewise.
+ * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
+ * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
+ * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
+ * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
+ * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
+ * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
+
+2003-09-21 Daniel Jacobowitz <drow@mvista.com>
+
+ * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
+ ->got if the section already exists.
+
+2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
+
+ * dwarf2.c (decode_line_info): Cope with an initially empty
+ filename table.
+
+2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * acinclude.m4: Include ../config/accross.m4.
+ * aclocal.m4: Regenerated.
+
+ * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
+ or long long.
+ (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
+ (host64): Remove if HOST_64BIT_TYPE is set to long.
+
+ * configure.in (HOST_64BIT_TYPE): Set according to the size of
+ long and long long.
+ (HOST_U_64BIT_TYPE): Likewise.
+ (host64): Likewise.
+ * configure: Regenerated.
+
+2003-09-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
+ since some ABIs round up the size of the struct.
+
+2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.c (_bfd_elf_merge_symbol): Allow type change if
+ the old symbol is undefined and the new symbol is defined.
+
+2003-09-18 Andreas Schwab <schwab@suse.de>
+
+ * simple.c (bfd_simple_get_relocated_section_contents): Use
+ _bfd_generic_link_hash_table_create instead of
+ bfd_link_hash_table_create.
+
2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
@@ -58,10 +928,10 @@
(v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
(v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
linked with v850e binaries. Mark the output as v850e.
-
+
2003-09-03 Nick Clifton <nickc@redhat.com>
- * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
+ * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
symbols that are used in relocs.
2003-08-30 Robert Millan <robertmh@gnu.org>
@@ -116,7 +986,7 @@
2003-08-24 Jason Eckhardt <jle@rice.edu>
- * coff-i860.c (CALC_ADDEND): Define to be a no-op.
+ * coff-i860.c (CALC_ADDEND): Define to be a no-op.
2003-08-24 Jason Eckhardt <jle@rice.edu>
@@ -125,7 +995,7 @@
2003-08-23 Jason Eckhardt <jle@rice.edu>
- * coff-i860.c (coff_i860_reloc_nyi): New function.
+ * coff-i860.c (coff_i860_reloc_nyi): New function.
(howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
LOWn, SPLITn, and BRADDR.
(RTYPE2HOWTO): Check that the r_type is within the howto_table
diff --git a/bfd/Makefile.am b/bfd/Makefile.am
index d27c873..216b399 100644
--- a/bfd/Makefile.am
+++ b/bfd/Makefile.am
@@ -1097,7 +1097,7 @@ coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h coffcode.h coffswap.h
cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h libcoff.h
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/safe-ctype.h
dwarf1.lo: dwarf1.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf.h
@@ -1310,7 +1310,7 @@ elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/filenames.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 \
- elflink.h
+ elflink.h $(INCDIR)/safe-ctype.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
@@ -1592,7 +1592,7 @@ elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.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 \
- elflink.h
+ elflink.h $(INCDIR)/safe-ctype.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 5ca774a..f85a6fe 100644
--- a/bfd/Makefile.in
+++ b/bfd/Makefile.in
@@ -812,7 +812,7 @@ configure.in version.h
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
+TAR = gtar
GZIP_ENV = --best
SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
OBJECTS = $(libbfd_a_OBJECTS) $(libbfd_la_OBJECTS)
@@ -941,7 +941,7 @@ libbfd.la: $(libbfd_la_OBJECTS) $(libbfd_la_DEPENDENCIES)
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
@@ -961,7 +961,7 @@ check-recursive installcheck-recursive info-recursive dvi-recursive:
mostlyclean-recursive clean-recursive distclean-recursive \
maintainer-clean-recursive:
- @set fnord $(MAKEFLAGS); amf=$$2; \
+ @set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
@@ -1632,7 +1632,7 @@ coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h coffcode.h coffswap.h
cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h libcoff.h
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/safe-ctype.h
dwarf1.lo: dwarf1.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf.h
@@ -1845,7 +1845,7 @@ elf32-xtensa.lo: elf32-xtensa.c $(INCDIR)/filenames.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 \
- elflink.h
+ elflink.h $(INCDIR)/safe-ctype.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
@@ -2127,7 +2127,7 @@ elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.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 \
- elflink.h
+ elflink.h $(INCDIR)/safe-ctype.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 bf328db..b1bd1be 100644
--- a/bfd/acinclude.m4
+++ b/bfd/acinclude.m4
@@ -1,3 +1,5 @@
+sinclude(../config/accross.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])
diff --git a/bfd/aclocal.m4 b/bfd/aclocal.m4
index 3673e07..9d27670 100644
--- a/bfd/aclocal.m4
+++ b/bfd/aclocal.m4
@@ -1,4 +1,4 @@
-dnl aclocal.m4 generated automatically by aclocal 1.4-p5
+dnl aclocal.m4 generated automatically by aclocal 1.4-p6
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
@@ -10,6 +10,8 @@ dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
+sinclude(../config/accross.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])
@@ -173,7 +175,16 @@ else
$1_FALSE=
fi])
-#serial 1
+# 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
+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.
+
+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
+
# This test replaces the one in autoconf.
# Currently this macro should have the same name as the autoconf macro
# because gettext's gettext.m4 (distributed in the automake package)
@@ -201,7 +212,8 @@ dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_REQUIRE([AC_PROG_INSTALL])
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
@@ -217,13 +229,42 @@ AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir)
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir)
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
+# 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, 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
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+ [AM_AUTOMAKE_VERSION([1.4-p6])])
+
#
# Check to make sure that the build environment is sane.
#
diff --git a/bfd/aout-adobe.c b/bfd/aout-adobe.c
index b064650..052e938 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
+ 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support. Based on bout.c.
@@ -47,7 +47,7 @@ static bfd_boolean aout_adobe_mkobject
static bfd_boolean aout_adobe_write_object_contents
PARAMS ((bfd *));
static bfd_boolean aout_adobe_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
static bfd_boolean aout_adobe_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static int aout_adobe_sizeof_headers
@@ -415,7 +415,7 @@ static bfd_boolean
aout_adobe_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
diff --git a/bfd/aout-target.h b/bfd/aout-target.h
index cc4a4f5..d8cad54 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
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -443,7 +443,7 @@ MY_bfd_final_link (abfd, info)
#endif
#ifndef MY_bfd_debug_info_accumulate
#define MY_bfd_debug_info_accumulate \
- (void (*) PARAMS ((bfd*, struct sec *))) bfd_void
+ (void (*) PARAMS ((bfd*, struct bfd_section *))) bfd_void
#endif
#ifndef MY_core_file_failing_command
@@ -470,8 +470,8 @@ MY_bfd_final_link (abfd, info)
#ifndef MY_get_symtab_upper_bound
#define MY_get_symtab_upper_bound NAME(aout,get_symtab_upper_bound)
#endif
-#ifndef MY_get_symtab
-#define MY_get_symtab NAME(aout,get_symtab)
+#ifndef MY_canonicalize_symtab
+#define MY_canonicalize_symtab NAME(aout,canonicalize_symtab)
#endif
#ifndef MY_get_reloc_upper_bound
#define MY_get_reloc_upper_bound NAME(aout,get_reloc_upper_bound)
diff --git a/bfd/aout-tic30.c b/bfd/aout-tic30.c
index 6e65fcf..1f37b99 100644
--- a/bfd/aout-tic30.c
+++ b/bfd/aout-tic30.c
@@ -899,7 +899,7 @@ tic30_aout_set_arch_mach (abfd, arch, machine)
#endif
#ifndef MY_bfd_debug_info_accumulate
#define MY_bfd_debug_info_accumulate \
- (void (*) PARAMS ((bfd*, struct sec *))) bfd_void
+ (void (*) PARAMS ((bfd*, struct bfd_section *))) bfd_void
#endif
#ifndef MY_core_file_failing_command
@@ -926,8 +926,8 @@ tic30_aout_set_arch_mach (abfd, arch, machine)
#ifndef MY_get_symtab_upper_bound
#define MY_get_symtab_upper_bound NAME(aout,get_symtab_upper_bound)
#endif
-#ifndef MY_get_symtab
-#define MY_get_symtab NAME(aout,get_symtab)
+#ifndef MY_canonicalize_symtab
+#define MY_canonicalize_symtab NAME(aout,canonicalize_symtab)
#endif
#ifndef MY_get_reloc_upper_bound
#define MY_get_reloc_upper_bound NAME(aout,get_reloc_upper_bound)
diff --git a/bfd/aoutf1.h b/bfd/aoutf1.h
index 4d66d87..352dadf 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
+ 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -834,7 +834,7 @@ static const struct aout_backend_data sunos4_aout_backend =
#define MY_bfd_debug_info_start bfd_void
#define MY_bfd_debug_info_end bfd_void
#define MY_bfd_debug_info_accumulate \
- (void (*) PARAMS ((bfd *, struct sec *))) bfd_void
+ (void (*) PARAMS ((bfd *, struct bfd_section *))) bfd_void
#define MY_core_file_p sunos4_core_file_p
#define MY_write_object_contents NAME(aout,sunos4_write_object_contents)
#define MY_backend_data &sunos4_aout_backend
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 674fc76..6c20bd0 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -801,6 +801,7 @@ NAME(aout,machine_type) (arch, machine, unknown)
case bfd_mach_mipsisa32r2:
case bfd_mach_mips5:
case bfd_mach_mipsisa64:
+ case bfd_mach_mipsisa64r2:
case bfd_mach_mips_sb1:
/* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc. */
arch_flags = M_MIPS2;
@@ -1264,7 +1265,7 @@ bfd_boolean
NAME(aout,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;
{
@@ -2025,7 +2026,7 @@ error_return:
}
long
-NAME(aout,get_symtab) (abfd, location)
+NAME(aout,canonicalize_symtab) (abfd, location)
bfd *abfd;
asymbol **location;
{
diff --git a/bfd/archures.c b/bfd/archures.c
index 9033f28..064fa55 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -84,6 +84,7 @@ DESCRIPTION
.#define bfd_mach_mcf5206e 10
.#define bfd_mach_mcf5307 11
.#define bfd_mach_mcf5407 12
+.#define bfd_mach_mcf528x 13
. bfd_arch_vax, {* DEC Vax *}
. bfd_arch_i960, {* Intel 960 *}
. {* The order of the following is important.
@@ -148,6 +149,7 @@ DESCRIPTION
.#define bfd_mach_mipsisa32 32
.#define bfd_mach_mipsisa32r2 33
.#define bfd_mach_mipsisa64 64
+.#define bfd_mach_mipsisa64r2 65
. bfd_arch_i386, {* Intel 386 *}
.#define bfd_mach_i386_i386 1
.#define bfd_mach_i386_i8086 2
@@ -227,6 +229,10 @@ DESCRIPTION
.#define bfd_mach_sh3_dsp 0x3d
.#define bfd_mach_sh3e 0x3e
.#define bfd_mach_sh4 0x40
+.#define bfd_mach_sh4_nofpu 0x41
+.#define bfd_mach_sh4a 0x4a
+.#define bfd_mach_sh4a_nofpu 0x4b
+.#define bfd_mach_sh4al_dsp 0x4d
.#define bfd_mach_sh5 0x50
. bfd_arch_alpha, {* Dec Alpha *}
.#define bfd_mach_alpha_ev4 0x10
@@ -280,6 +286,7 @@ DESCRIPTION
.#define bfd_mach_fr400 400
.#define bfd_mach_frvtomcat 499 {* fr500 prototype *}
.#define bfd_mach_fr500 500
+.#define bfd_mach_fr550 550
. bfd_arch_mcore,
. bfd_arch_ia64, {* HP/Intel ia64 *}
.#define bfd_mach_ia64_elf64 64
@@ -957,6 +964,10 @@ bfd_default_scan (const bfd_arch_info_type *info, const char *string)
arch = bfd_arch_m68k;
number = bfd_mach_mcf5407;
break;
+ case 5282:
+ arch = bfd_arch_m68k;
+ number = bfd_mach_mcf528x;
+ break;
case 32000:
arch = bfd_arch_we32k;
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 49ebee7..1a67d08 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -303,7 +303,7 @@ typedef struct lineno_cache_entry
unsigned int line_number; /* Linenumber from start of function. */
union
{
- struct symbol_cache_entry *sym; /* Function name. */
+ struct bfd_symbol *sym; /* Function name. */
bfd_vma offset; /* Offset into section. */
} u;
}
@@ -314,7 +314,7 @@ alent;
#define align_power(addr, align) \
(((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align)))
-typedef struct sec *sec_ptr;
+typedef struct bfd_section *sec_ptr;
#define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0)
#define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0)
@@ -520,7 +520,7 @@ extern bfd_boolean bfd_cache_close
extern bfd_boolean bfd_record_phdr
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
- bfd_boolean, bfd_boolean, unsigned int, struct sec **);
+ bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
/* Byte swapping routines. */
@@ -554,7 +554,7 @@ void bfd_put_bits (bfd_vma, bfd_byte *, int, bfd_boolean);
struct ecoff_debug_info;
struct ecoff_debug_swap;
struct ecoff_extr;
-struct symbol_cache_entry;
+struct bfd_symbol;
struct bfd_link_info;
struct bfd_link_hash_entry;
struct bfd_elf_version_tree;
@@ -584,8 +584,8 @@ extern bfd_boolean bfd_ecoff_debug_accumulate_other
extern bfd_boolean bfd_ecoff_debug_externals
(bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap, bfd_boolean relocatable,
- bfd_boolean (*get_extr) (struct symbol_cache_entry *, struct ecoff_extr *),
- void (*set_index) (struct symbol_cache_entry *, bfd_size_type));
+ bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *),
+ void (*set_index) (struct bfd_symbol *, bfd_size_type));
extern bfd_boolean bfd_ecoff_debug_one_external
(bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap, const char *name,
@@ -601,7 +601,7 @@ extern bfd_boolean bfd_ecoff_write_accumulated_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 sec *, struct sec *, char **);
+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* Externally visible ELF routines. */
@@ -620,10 +620,10 @@ extern bfd_boolean bfd_elf_get_bfd_needed_list
(bfd *, struct bfd_link_needed_list **);
extern bfd_boolean bfd_elf32_size_dynamic_sections
(bfd *, const char *, const char *, const char *, const char * const *,
- struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *);
+ struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *);
extern bfd_boolean bfd_elf64_size_dynamic_sections
(bfd *, const char *, const char *, const char *, const char * const *,
- struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *);
+ struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *);
extern void bfd_elf_set_dt_needed_name
(bfd *, const char *);
extern void bfd_elf_set_dt_needed_soname
@@ -677,10 +677,13 @@ extern int bfd_get_arch_size
extern int bfd_get_sign_extend_vma
(bfd *);
+extern struct bfd_section *_bfd_elf_tls_setup
+ (bfd *, struct bfd_link_info *);
+
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **);
+ (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 sec *, struct sec *, char **);
+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* SunOS shared library support routines for the linker. */
@@ -689,7 +692,7 @@ extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
extern bfd_boolean bfd_sunos_record_link_assignment
(bfd *, struct bfd_link_info *, const char *);
extern bfd_boolean bfd_sunos_size_dynamic_sections
- (bfd *, struct bfd_link_info *, struct sec **, struct sec **, struct sec **);
+ (bfd *, struct bfd_link_info *, struct bfd_section **, struct bfd_section **, struct bfd_section **);
/* Linux shared library support routines for the linker. */
@@ -743,7 +746,7 @@ extern bfd_boolean bfd_xcoff_record_link_assignment
extern bfd_boolean bfd_xcoff_size_dynamic_sections
(bfd *, struct bfd_link_info *, const char *, const char *,
unsigned long, unsigned long, unsigned long, bfd_boolean,
- int, bfd_boolean, bfd_boolean, struct sec **, bfd_boolean);
+ int, bfd_boolean, bfd_boolean, struct bfd_section **, bfd_boolean);
extern bfd_boolean bfd_xcoff_link_generate_rtinit
(bfd *, const char *, const char *, bfd_boolean);
@@ -759,16 +762,16 @@ union internal_auxent;
#endif
extern bfd_boolean bfd_coff_get_syment
- (bfd *, struct symbol_cache_entry *, struct internal_syment *);
+ (bfd *, struct bfd_symbol *, struct internal_syment *);
extern bfd_boolean bfd_coff_get_auxent
- (bfd *, struct symbol_cache_entry *, int, union internal_auxent *);
+ (bfd *, struct bfd_symbol *, int, union internal_auxent *);
extern bfd_boolean bfd_coff_set_symbol_class
- (bfd *, struct symbol_cache_entry *, unsigned int);
+ (bfd *, struct bfd_symbol *, unsigned int);
extern bfd_boolean bfd_m68k_coff_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **);
+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* ARM Interworking support. Called from linker. */
extern bfd_boolean bfd_arm_allocate_interworking_sections
@@ -815,12 +818,19 @@ extern unsigned int bfd_arm_get_mach_from_notes
/* TI COFF load page support. */
extern void bfd_ticoff_set_section_load_page
- (struct sec *, int);
+ (struct bfd_section *, int);
extern int bfd_ticoff_get_section_load_page
- (struct sec *);
+ (struct bfd_section *);
/* H8/300 functions. */
extern bfd_vma bfd_h8300_pad_address
(bfd *, bfd_vma);
+/* IA64 Itanium code generation. Called from linker. */
+extern void bfd_elf32_ia64_after_parse
+ (int);
+
+extern void bfd_elf64_ia64_after_parse
+ (int);
+
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index a7cca3e..5c17a7a 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -310,7 +310,7 @@ typedef struct lineno_cache_entry
unsigned int line_number; /* Linenumber from start of function. */
union
{
- struct symbol_cache_entry *sym; /* Function name. */
+ struct bfd_symbol *sym; /* Function name. */
bfd_vma offset; /* Offset into section. */
} u;
}
@@ -321,7 +321,7 @@ alent;
#define align_power(addr, align) \
(((addr) + ((bfd_vma) 1 << (align)) - 1) & ((bfd_vma) -1 << (align)))
-typedef struct sec *sec_ptr;
+typedef struct bfd_section *sec_ptr;
#define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0)
#define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0)
@@ -527,7 +527,7 @@ extern bfd_boolean bfd_cache_close
extern bfd_boolean bfd_record_phdr
(bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma,
- bfd_boolean, bfd_boolean, unsigned int, struct sec **);
+ bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **);
/* Byte swapping routines. */
@@ -561,7 +561,7 @@ void bfd_put_bits (bfd_vma, bfd_byte *, int, bfd_boolean);
struct ecoff_debug_info;
struct ecoff_debug_swap;
struct ecoff_extr;
-struct symbol_cache_entry;
+struct bfd_symbol;
struct bfd_link_info;
struct bfd_link_hash_entry;
struct bfd_elf_version_tree;
@@ -591,8 +591,8 @@ extern bfd_boolean bfd_ecoff_debug_accumulate_other
extern bfd_boolean bfd_ecoff_debug_externals
(bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap, bfd_boolean relocatable,
- bfd_boolean (*get_extr) (struct symbol_cache_entry *, struct ecoff_extr *),
- void (*set_index) (struct symbol_cache_entry *, bfd_size_type));
+ bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *),
+ void (*set_index) (struct bfd_symbol *, bfd_size_type));
extern bfd_boolean bfd_ecoff_debug_one_external
(bfd *abfd, struct ecoff_debug_info *debug,
const struct ecoff_debug_swap *swap, const char *name,
@@ -608,7 +608,7 @@ extern bfd_boolean bfd_ecoff_write_accumulated_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 sec *, struct sec *, char **);
+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* Externally visible ELF routines. */
@@ -627,10 +627,10 @@ extern bfd_boolean bfd_elf_get_bfd_needed_list
(bfd *, struct bfd_link_needed_list **);
extern bfd_boolean bfd_elf32_size_dynamic_sections
(bfd *, const char *, const char *, const char *, const char * const *,
- struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *);
+ struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *);
extern bfd_boolean bfd_elf64_size_dynamic_sections
(bfd *, const char *, const char *, const char *, const char * const *,
- struct bfd_link_info *, struct sec **, struct bfd_elf_version_tree *);
+ struct bfd_link_info *, struct bfd_section **, struct bfd_elf_version_tree *);
extern void bfd_elf_set_dt_needed_name
(bfd *, const char *);
extern void bfd_elf_set_dt_needed_soname
@@ -684,10 +684,13 @@ extern int bfd_get_arch_size
extern int bfd_get_sign_extend_vma
(bfd *);
+extern struct bfd_section *_bfd_elf_tls_setup
+ (bfd *, struct bfd_link_info *);
+
extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **);
+ (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 sec *, struct sec *, char **);
+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* SunOS shared library support routines for the linker. */
@@ -696,7 +699,7 @@ extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
extern bfd_boolean bfd_sunos_record_link_assignment
(bfd *, struct bfd_link_info *, const char *);
extern bfd_boolean bfd_sunos_size_dynamic_sections
- (bfd *, struct bfd_link_info *, struct sec **, struct sec **, struct sec **);
+ (bfd *, struct bfd_link_info *, struct bfd_section **, struct bfd_section **, struct bfd_section **);
/* Linux shared library support routines for the linker. */
@@ -750,7 +753,7 @@ extern bfd_boolean bfd_xcoff_record_link_assignment
extern bfd_boolean bfd_xcoff_size_dynamic_sections
(bfd *, struct bfd_link_info *, const char *, const char *,
unsigned long, unsigned long, unsigned long, bfd_boolean,
- int, bfd_boolean, bfd_boolean, struct sec **, bfd_boolean);
+ int, bfd_boolean, bfd_boolean, struct bfd_section **, bfd_boolean);
extern bfd_boolean bfd_xcoff_link_generate_rtinit
(bfd *, const char *, const char *, bfd_boolean);
@@ -766,16 +769,16 @@ union internal_auxent;
#endif
extern bfd_boolean bfd_coff_get_syment
- (bfd *, struct symbol_cache_entry *, struct internal_syment *);
+ (bfd *, struct bfd_symbol *, struct internal_syment *);
extern bfd_boolean bfd_coff_get_auxent
- (bfd *, struct symbol_cache_entry *, int, union internal_auxent *);
+ (bfd *, struct bfd_symbol *, int, union internal_auxent *);
extern bfd_boolean bfd_coff_set_symbol_class
- (bfd *, struct symbol_cache_entry *, unsigned int);
+ (bfd *, struct bfd_symbol *, unsigned int);
extern bfd_boolean bfd_m68k_coff_create_embedded_relocs
- (bfd *, struct bfd_link_info *, struct sec *, struct sec *, char **);
+ (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
/* ARM Interworking support. Called from linker. */
extern bfd_boolean bfd_arm_allocate_interworking_sections
@@ -822,15 +825,22 @@ extern unsigned int bfd_arm_get_mach_from_notes
/* TI COFF load page support. */
extern void bfd_ticoff_set_section_load_page
- (struct sec *, int);
+ (struct bfd_section *, int);
extern int bfd_ticoff_get_section_load_page
- (struct sec *);
+ (struct bfd_section *);
/* H8/300 functions. */
extern bfd_vma bfd_h8300_pad_address
(bfd *, bfd_vma);
+/* IA64 Itanium code generation. Called from linker. */
+extern void bfd_elf32_ia64_after_parse
+ (int);
+
+extern void bfd_elf64_ia64_after_parse
+ (int);
+
/* Extracted from init.c. */
void bfd_init (void);
@@ -858,11 +868,11 @@ unsigned long bfd_calc_gnu_debuglink_crc32
char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
-struct sec *bfd_create_gnu_debuglink_section
+struct bfd_section *bfd_create_gnu_debuglink_section
(bfd *abfd, const char *filename);
bfd_boolean bfd_fill_in_gnu_debuglink_section
- (bfd *abfd, struct sec *sect, const char *filename);
+ (bfd *abfd, struct bfd_section *sect, const char *filename);
/* Extracted from libbfd.c. */
@@ -1029,7 +1039,7 @@ struct bfd_comdat_info
long symbol;
};
-typedef struct sec
+typedef struct bfd_section
{
/* The name of the section; the name isn't a copy, the pointer is
the same as that passed to bfd_make_section. */
@@ -1042,7 +1052,7 @@ typedef struct sec
int index;
/* The next section in the list belonging to the BFD, or NULL. */
- struct sec *next;
+ struct bfd_section *next;
/* The field flags contains attributes of the section. Some
flags are read in from the object file, and some are
@@ -1265,7 +1275,7 @@ typedef struct sec
/* Nonzero if this section has a gp reloc. */
unsigned int has_gp_reloc:1;
- /* Usused bits. */
+ /* Unused bits. */
unsigned int flag13:1;
unsigned int flag14:1;
unsigned int flag15:1;
@@ -1308,7 +1318,7 @@ typedef struct sec
bfd_vma output_offset;
/* The output section through which to map on output. */
- struct sec *output_section;
+ struct bfd_section *output_section;
/* The alignment requirement of the section, as an exponent of 2 -
e.g., 3 aligns to 2^3 (or 8). */
@@ -1358,7 +1368,7 @@ typedef struct sec
/* Points to the kept section if this section is a link-once section,
and is discarded. */
- struct sec *kept_section;
+ struct bfd_section *kept_section;
/* When a section is being output, this value changes as more
linenumbers are written out. */
@@ -1377,8 +1387,8 @@ typedef struct sec
bfd *owner;
/* A symbol which points at this section only. */
- struct symbol_cache_entry *symbol;
- struct symbol_cache_entry **symbol_ptr_ptr;
+ struct bfd_symbol *symbol;
+ struct bfd_symbol **symbol_ptr_ptr;
struct bfd_link_order *link_order_head;
struct bfd_link_order *link_order_tail;
@@ -1416,13 +1426,12 @@ extern asection bfd_ind_section;
|| ((SEC) == bfd_com_section_ptr) \
|| ((SEC) == bfd_ind_section_ptr))
-extern const struct symbol_cache_entry * const bfd_abs_symbol;
-extern const struct symbol_cache_entry * const bfd_com_symbol;
-extern const struct symbol_cache_entry * const bfd_und_symbol;
-extern const struct symbol_cache_entry * const bfd_ind_symbol;
+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)->reloc_done ? (abort (), (bfd_size_type) 1) \
- : (section)->_raw_size)
+ ((section)->_raw_size)
#define bfd_get_section_size_after_reloc(section) \
((section)->reloc_done ? (section)->_cooked_size \
: (abort (), (bfd_size_type) 1))
@@ -1477,8 +1486,8 @@ bfd_boolean bfd_set_section_size
(bfd *abfd, asection *sec, bfd_size_type val);
bfd_boolean bfd_set_section_contents
- (bfd *abfd, asection *section, void *data, file_ptr offset,
- bfd_size_type count);
+ (bfd *abfd, asection *section, const void *data,
+ file_ptr offset, bfd_size_type count);
bfd_boolean bfd_get_section_contents
(bfd *abfd, asection *section, void *location, file_ptr offset,
@@ -1513,6 +1522,7 @@ enum bfd_architecture
#define bfd_mach_mcf5206e 10
#define bfd_mach_mcf5307 11
#define bfd_mach_mcf5407 12
+#define bfd_mach_mcf528x 13
bfd_arch_vax, /* DEC Vax */
bfd_arch_i960, /* Intel 960 */
/* The order of the following is important.
@@ -1577,6 +1587,7 @@ enum bfd_architecture
#define bfd_mach_mipsisa32 32
#define bfd_mach_mipsisa32r2 33
#define bfd_mach_mipsisa64 64
+#define bfd_mach_mipsisa64r2 65
bfd_arch_i386, /* Intel 386 */
#define bfd_mach_i386_i386 1
#define bfd_mach_i386_i8086 2
@@ -1656,6 +1667,10 @@ enum bfd_architecture
#define bfd_mach_sh3_dsp 0x3d
#define bfd_mach_sh3e 0x3e
#define bfd_mach_sh4 0x40
+#define bfd_mach_sh4_nofpu 0x41
+#define bfd_mach_sh4a 0x4a
+#define bfd_mach_sh4a_nofpu 0x4b
+#define bfd_mach_sh4al_dsp 0x4d
#define bfd_mach_sh5 0x50
bfd_arch_alpha, /* Dec Alpha */
#define bfd_mach_alpha_ev4 0x10
@@ -1709,6 +1724,7 @@ enum bfd_architecture
#define bfd_mach_fr400 400
#define bfd_mach_frvtomcat 499 /* fr500 prototype */
#define bfd_mach_fr500 500
+#define bfd_mach_fr550 550
bfd_arch_mcore,
bfd_arch_ia64, /* HP/Intel ia64 */
#define bfd_mach_ia64_elf64 64
@@ -1845,7 +1861,7 @@ typedef enum bfd_reloc_status
typedef struct reloc_cache_entry
{
/* A pointer into the canonical table of pointers. */
- struct symbol_cache_entry **sym_ptr_ptr;
+ struct bfd_symbol **sym_ptr_ptr;
/* offset in section. */
bfd_size_type address;
@@ -1919,7 +1935,7 @@ struct reloc_howto_struct
strange relocation methods to be accomodated (e.g., i960 callj
instructions). */
bfd_reloc_status_type (*special_function)
- (bfd *, arelent *, struct symbol_cache_entry *, void *, asection *,
+ (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
bfd *, char **);
/* The textual name of the relocation type. */
@@ -2947,6 +2963,7 @@ short offset into 11 bits. */
BFD_RELOC_MMIX_PUSHJ_1,
BFD_RELOC_MMIX_PUSHJ_2,
BFD_RELOC_MMIX_PUSHJ_3,
+ BFD_RELOC_MMIX_PUSHJ_STUBBABLE,
/* These are relocations for the JMP instruction. */
BFD_RELOC_MMIX_JMP,
@@ -3472,7 +3489,7 @@ const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
/* Extracted from syms.c. */
-typedef struct symbol_cache_entry
+typedef struct bfd_symbol
{
/* A pointer to the BFD which owns the symbol. This information
is necessary so that a back end can work out what additional
@@ -3584,7 +3601,7 @@ typedef struct symbol_cache_entry
/* A pointer to the section to which this symbol is
relative. This will always be non NULL, there are special
sections for undefined and absolute symbols. */
- struct sec *section;
+ struct bfd_section *section;
/* Back end special data. */
union
@@ -3715,10 +3732,10 @@ struct bfd
struct bfd_hash_table section_htab;
/* Pointer to linked list of sections. */
- struct sec *sections;
+ struct bfd_section *sections;
/* The place where we add to the section list. */
- struct sec **section_tail;
+ struct bfd_section **section_tail;
/* The number of sections. */
unsigned int section_count;
@@ -3731,7 +3748,7 @@ struct bfd
unsigned int symcount;
/* Symbol table for output BFD (with symcount entries). */
- struct symbol_cache_entry **outsymbols;
+ struct bfd_symbol **outsymbols;
/* Used for slurped dynamic symbol tables. */
unsigned int dynsymcount;
@@ -3964,8 +3981,8 @@ struct bfd_preserve
void *tdata;
flagword flags;
const struct bfd_arch_info *arch_info;
- struct sec *sections;
- struct sec **section_tail;
+ struct bfd_section *sections;
+ struct bfd_section **section_tail;
unsigned int section_count;
struct bfd_hash_table section_htab;
};
@@ -4205,7 +4222,7 @@ typedef struct bfd_target
/* Entry points used for symbols. */
#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
NAME##_get_symtab_upper_bound, \
- NAME##_get_symtab, \
+ NAME##_canonicalize_symtab, \
NAME##_make_empty_symbol, \
NAME##_print_symbol, \
NAME##_get_symbol_info, \
@@ -4218,20 +4235,20 @@ typedef struct bfd_target
long (*_bfd_get_symtab_upper_bound) (bfd *);
long (*_bfd_canonicalize_symtab)
- (bfd *, struct symbol_cache_entry **);
- struct symbol_cache_entry *
+ (bfd *, struct bfd_symbol **);
+ struct bfd_symbol *
(*_bfd_make_empty_symbol) (bfd *);
void (*_bfd_print_symbol)
- (bfd *, void *, struct symbol_cache_entry *, bfd_print_symbol_type);
+ (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type);
#define bfd_print_symbol(b,p,s,e) BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
void (*_bfd_get_symbol_info)
- (bfd *, struct symbol_cache_entry *, symbol_info *);
+ (bfd *, struct bfd_symbol *, symbol_info *);
#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
- alent * (*_get_lineno) (bfd *, struct symbol_cache_entry *);
+ alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
bfd_boolean (*_bfd_find_nearest_line)
- (bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
+ (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
const char **, const char **, unsigned int *);
/* Back-door to allow format-aware applications to create debug symbols
while using BFD for everything else. Currently used by the assembler
@@ -4255,7 +4272,7 @@ typedef struct bfd_target
long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
long (*_bfd_canonicalize_reloc)
- (bfd *, sec_ptr, arelent **, struct symbol_cache_entry **);
+ (bfd *, sec_ptr, arelent **, struct bfd_symbol **);
/* See documentation on reloc types. */
reloc_howto_type *
(*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
@@ -4268,7 +4285,7 @@ typedef struct bfd_target
bfd_boolean (*_bfd_set_arch_mach)
(bfd *, enum bfd_architecture, unsigned long);
bfd_boolean (*_bfd_set_section_contents)
- (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
+ (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
/* Routines used by the linker. */
#define BFD_JUMP_TABLE_LINK(NAME) \
@@ -4288,10 +4305,10 @@ typedef struct bfd_target
int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
bfd_byte * (*_bfd_get_relocated_section_contents)
(bfd *, struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *, bfd_boolean, struct symbol_cache_entry **);
+ bfd_byte *, bfd_boolean, struct bfd_symbol **);
bfd_boolean (*_bfd_relax_section)
- (bfd *, struct sec *, struct bfd_link_info *, bfd_boolean *);
+ (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *);
/* Create a hash table for the linker. Different backends store
different information in this table. */
@@ -4312,7 +4329,7 @@ typedef struct bfd_target
bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
/* Should this section be split up into smaller pieces during linking. */
- bfd_boolean (*_bfd_link_split_section) (bfd *, struct sec *);
+ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
/* Remove sections that are not referenced from the output. */
bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
@@ -4321,7 +4338,7 @@ typedef struct bfd_target
bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
/* Discard members of a group. */
- bfd_boolean (*_bfd_discard_group) (bfd *, struct sec *);
+ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
/* Routines to handle dynamic symbols and relocs. */
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
@@ -4334,12 +4351,12 @@ typedef struct bfd_target
long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
/* Read in the dynamic symbols. */
long (*_bfd_canonicalize_dynamic_symtab)
- (bfd *, struct symbol_cache_entry **);
+ (bfd *, 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. */
long (*_bfd_canonicalize_dynamic_reloc)
- (bfd *, arelent **, struct symbol_cache_entry **);
+ (bfd *, arelent **, struct bfd_symbol **);
/* Opposite endian version of this target. */
const struct bfd_target * alternative_target;
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 2957747..ab2db6a 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -113,10 +113,10 @@ CODE_FRAGMENT
. struct bfd_hash_table section_htab;
.
. {* Pointer to linked list of sections. *}
-. struct sec *sections;
+. struct bfd_section *sections;
.
. {* The place where we add to the section list. *}
-. struct sec **section_tail;
+. struct bfd_section **section_tail;
.
. {* The number of sections. *}
. unsigned int section_count;
@@ -129,7 +129,7 @@ CODE_FRAGMENT
. unsigned int symcount;
.
. {* Symbol table for output BFD (with symcount entries). *}
-. struct symbol_cache_entry **outsymbols;
+. struct bfd_symbol **outsymbols;
.
. {* Used for slurped dynamic symbol tables. *}
. unsigned int dynsymcount;
@@ -1276,8 +1276,8 @@ CODE_FRAGMENT
. void *tdata;
. flagword flags;
. const struct bfd_arch_info *arch_info;
-. struct sec *sections;
-. struct sec **section_tail;
+. struct bfd_section *sections;
+. struct bfd_section **section_tail;
. unsigned int section_count;
. struct bfd_hash_table section_htab;
.};
diff --git a/bfd/bfdio.c b/bfd/bfdio.c
index 377622f..f99fddd 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -1,6 +1,6 @@
/* Low-level I/O routines for BFDs.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/bfd/bfdwin.c b/bfd/bfdwin.c
index 00d1a14..fb7c967 100644
--- a/bfd/bfdwin.c
+++ b/bfd/bfdwin.c
@@ -1,5 +1,5 @@
/* Support for memory-mapped windows into a BFD.
- Copyright 1995, 1996, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/bfd/binary.c b/bfd/binary.c
index a27eb95..65f46af 100644
--- a/bfd/binary.c
+++ b/bfd/binary.c
@@ -1,23 +1,23 @@
/* BFD back-end for binary objects.
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
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.
+ 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. */
/* This is a BFD backend which may be used to write binary objects.
It may only be used for output, not input. The intention is that
@@ -47,15 +47,16 @@ static bfd_boolean binary_get_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static long binary_get_symtab_upper_bound PARAMS ((bfd *));
static char *mangle_name PARAMS ((bfd *, char *));
-static long binary_get_symtab PARAMS ((bfd *, asymbol **));
+static long binary_canonicalize_symtab PARAMS ((bfd *, asymbol **));
static void binary_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static bfd_boolean binary_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
static int binary_sizeof_headers PARAMS ((bfd *, bfd_boolean));
-/* Set by external programs - specifies the BFD architecture
- to use when creating binary BFDs. */
-enum bfd_architecture bfd_external_binary_architecture = bfd_arch_unknown;
+/* Set by external programs - specifies the BFD architecture and
+ machine number to be uses when creating binary BFDs. */
+enum bfd_architecture bfd_external_binary_architecture = bfd_arch_unknown;
+unsigned long bfd_external_machine = 0;
/* Create a binary object. Invoked via bfd_set_format. */
@@ -107,7 +108,8 @@ binary_object_p (abfd)
{
if ((bfd_get_arch_info (abfd)->arch == bfd_arch_unknown)
&& (bfd_external_binary_architecture != bfd_arch_unknown))
- bfd_set_arch_info (abfd, bfd_lookup_arch (bfd_external_binary_architecture, 0));
+ bfd_set_arch_info (abfd, bfd_lookup_arch
+ (bfd_external_binary_architecture, bfd_external_machine));
}
return abfd->xvec;
@@ -174,7 +176,7 @@ mangle_name (abfd, suffix)
/* Return the symbol table. */
static long
-binary_get_symtab (abfd, alocation)
+binary_canonicalize_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
@@ -254,7 +256,7 @@ static bfd_boolean
binary_set_section_contents (abfd, sec, data, offset, size)
bfd *abfd;
asection *sec;
- PTR data;
+ const PTR data;
file_ptr offset;
bfd_size_type size;
{
diff --git a/bfd/bout.c b/bfd/bout.c
index 43537eb..a39a9a3 100644
--- a/bfd/bout.c
+++ b/bfd/bout.c
@@ -61,7 +61,7 @@ static int b_out_sizeof_headers
static bfd_boolean b_out_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static bfd_boolean b_out_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
static long b_out_get_reloc_upper_bound
PARAMS ((bfd *, sec_ptr));
static long b_out_canonicalize_reloc
@@ -983,7 +983,7 @@ static bfd_boolean
b_out_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
diff --git a/bfd/coff-apollo.c b/bfd/coff-apollo.c
index cf58453..a2dd210 100644
--- a/bfd/coff-apollo.c
+++ b/bfd/coff-apollo.c
@@ -1,5 +1,5 @@
/* BFD back-end for Apollo 68000 COFF binaries.
- Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001, 2002
+ Copyright 1990, 1991, 1992, 1993, 1994, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
By Troy Rollo (troy@cbme.unsw.edu.au)
Based on m68k standard COFF version Written by Cygnus Support.
diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c
index bfe31c6..5cb327a 100644
--- a/bfd/coff-h8300.c
+++ b/bfd/coff-h8300.c
@@ -154,13 +154,20 @@ funcvec_hash_newfunc (struct bfd_hash_entry *entry,
/* Bump the offset at which we store entries in the function
vector. We'd like to bump up the size of the vectors section,
but it's not easily available here. */
- if (bfd_get_mach (table->abfd) == bfd_mach_h8300)
- table->offset += 2;
- else if (bfd_get_mach (table->abfd) == bfd_mach_h8300h
- || bfd_get_mach (table->abfd) == bfd_mach_h8300s)
- table->offset += 4;
- else
- return NULL;
+ switch (bfd_get_mach (table->abfd))
+ {
+ case bfd_mach_h8300:
+ case bfd_mach_h8300hn:
+ case bfd_mach_h8300sn:
+ table->offset += 2;
+ break;
+ case bfd_mach_h8300h:
+ case bfd_mach_h8300s:
+ table->offset += 4;
+ break;
+ default:
+ return NULL;
+ }
/* Everything went OK. */
return (struct bfd_hash_entry *) ret;
@@ -1096,6 +1103,7 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
if (symbol->flags & BSF_LOCAL)
{
char *new_name = bfd_malloc ((bfd_size_type) strlen (name) + 9);
+
if (new_name == NULL)
abort ();
@@ -1124,21 +1132,28 @@ h8300_reloc16_extra_cases (bfd *abfd, struct bfd_link_info *link_info,
src_address++;
/* Now create an entry in the function vector itself. */
- if (bfd_get_mach (input_section->owner) == bfd_mach_h8300)
- bfd_put_16 (abfd,
- bfd_coff_reloc16_get_value (reloc,
- link_info,
- input_section),
- vectors_sec->contents + h->offset);
- else if (bfd_get_mach (input_section->owner) == bfd_mach_h8300h
- || bfd_get_mach (input_section->owner) == bfd_mach_h8300s)
- bfd_put_32 (abfd,
- bfd_coff_reloc16_get_value (reloc,
- link_info,
- input_section),
- vectors_sec->contents + h->offset);
- else
- abort ();
+ switch (bfd_get_mach (input_section->owner))
+ {
+ case bfd_mach_h8300:
+ case bfd_mach_h8300hn:
+ case bfd_mach_h8300sn:
+ bfd_put_16 (abfd,
+ bfd_coff_reloc16_get_value (reloc,
+ link_info,
+ input_section),
+ vectors_sec->contents + h->offset);
+ break;
+ case bfd_mach_h8300h:
+ case bfd_mach_h8300s:
+ bfd_put_32 (abfd,
+ bfd_coff_reloc16_get_value (reloc,
+ link_info,
+ input_section),
+ vectors_sec->contents + h->offset);
+ break;
+ default:
+ abort ();
+ }
/* Gross. We've already written the contents of the vector section
before we get here... So we write it again with the new data. */
@@ -1304,11 +1319,20 @@ h8300_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
/* Bump the size of the vectors section. Each vector
takes 2 bytes on the h8300 and 4 bytes on the h8300h. */
- if (bfd_get_mach (abfd) == bfd_mach_h8300)
- htab->vectors_sec->_raw_size += 2;
- else if (bfd_get_mach (abfd) == bfd_mach_h8300h
- || bfd_get_mach (abfd) == bfd_mach_h8300s)
- htab->vectors_sec->_raw_size += 4;
+ switch (bfd_get_mach (abfd))
+ {
+ case bfd_mach_h8300:
+ case bfd_mach_h8300hn:
+ case bfd_mach_h8300sn:
+ htab->vectors_sec->_raw_size += 2;
+ break;
+ case bfd_mach_h8300h:
+ case bfd_mach_h8300s:
+ htab->vectors_sec->_raw_size += 4;
+ break;
+ default:
+ abort ();
+ }
}
}
}
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index 8ba305c..0b73bd5 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -4165,7 +4165,7 @@ const bfd_target rs6000coff_vec =
/* Symbols */
coff_get_symtab_upper_bound,
- coff_get_symtab,
+ coff_canonicalize_symtab,
coff_make_empty_symbol,
coff_print_symbol,
coff_get_symbol_info,
@@ -4407,7 +4407,7 @@ const bfd_target pmac_xcoff_vec =
/* Symbols */
coff_get_symtab_upper_bound,
- coff_get_symtab,
+ coff_canonicalize_symtab,
coff_make_empty_symbol,
coff_print_symbol,
coff_get_symbol_info,
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index 6b1468e..d78cc16 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -1647,6 +1647,8 @@ struct sh_opcode
#define SETSAS (0x40000)
#define SETSAS_REG(x) USESAS_REG (x)
+#define MAP(a) a, sizeof a / sizeof a[0]
+
#ifndef COFF_IMAGE_WITH_PE
static bfd_boolean sh_insn_uses_reg
PARAMS ((unsigned int, const struct sh_opcode *, unsigned int));
@@ -1666,10 +1668,8 @@ static bfd_boolean sh_insns_conflict
static bfd_boolean sh_load_use
PARAMS ((unsigned int, const struct sh_opcode *, unsigned int,
const struct sh_opcode *));
-#endif
-/* The opcode maps. */
-#define MAP(a) a, sizeof a / sizeof a[0]
+/* The opcode maps. */
static const struct sh_opcode sh_opcode00[] =
{
@@ -2089,7 +2089,6 @@ static const struct sh_minor_opcode sh_opcodef[] =
{ MAP (sh_opcodef1), 0xf0ff }
};
-#ifndef COFF_IMAGE_WITH_PE
static struct sh_major_opcode sh_opcodes[] =
{
{ MAP (sh_opcode0) },
@@ -2109,7 +2108,6 @@ static struct sh_major_opcode sh_opcodes[] =
{ MAP (sh_opcodee) },
{ MAP (sh_opcodef) }
};
-#endif
/* The double data transfer / parallel processing insns are not
described here. This will cause sh_align_load_span to leave them alone. */
@@ -2131,7 +2129,6 @@ static const struct sh_minor_opcode sh_dsp_opcodef[] =
{ MAP (sh_dsp_opcodef0), 0xfc0d }
};
-#ifndef COFF_IMAGE_WITH_PE
/* Given an instruction, return a pointer to the corresponding
sh_opcode structure. Return NULL if the instruction is not
recognized. */
diff --git a/bfd/coff-sparc.c b/bfd/coff-sparc.c
index acfa6d4..372b1a7 100644
--- a/bfd/coff-sparc.c
+++ b/bfd/coff-sparc.c
@@ -1,6 +1,6 @@
/* BFD back-end for Sparc COFF files.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
+ 2002, 2003 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/bfd/coff-tic54x.c b/bfd/coff-tic54x.c
index fdf1b5a..5d8ccc2 100644
--- a/bfd/coff-tic54x.c
+++ b/bfd/coff-tic54x.c
@@ -1,5 +1,5 @@
/* BFD back-end for TMS320C54X coff binaries.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Timothy Wall (twall@cygnus.com)
This file is part of BFD, the Binary File Descriptor library.
@@ -35,7 +35,7 @@ static void tic54x_reloc_processing
static bfd_reloc_status_type tic54x_relocation
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static bfd_boolean tic54x_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 reloc_howto_type *coff_tic54x_rtype_to_howto
PARAMS ((bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *));
static bfd_vma tic54x_getl32
@@ -345,7 +345,7 @@ static bfd_boolean
tic54x_set_section_contents (abfd, section, location, offset, bytes_to_do)
bfd *abfd;
sec_ptr section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type bytes_to_do;
{
diff --git a/bfd/coff-w65.c b/bfd/coff-w65.c
index cc31a23..63634b7 100644
--- a/bfd/coff-w65.c
+++ b/bfd/coff-w65.c
@@ -1,5 +1,5 @@
/* BFD back-end for WDC 65816 COFF binaries.
- Copyright 1995, 1996, 1997, 1999, 2000, 2001, 2002
+ Copyright 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Steve Chamberlain, <sac@cygnus.com>.
diff --git a/bfd/coff-we32k.c b/bfd/coff-we32k.c
index b71df53..72fa86c 100644
--- a/bfd/coff-we32k.c
+++ b/bfd/coff-we32k.c
@@ -1,5 +1,5 @@
/* BFD back-end for we32k COFF files.
- Copyright 1992, 1993, 1994, 1999, 2000, 2002
+ Copyright 1992, 1993, 1994, 1999, 2000, 2002, 2003
Free Software Foundation, Inc.
Contributed by Brendan Kehoe (brendan@cs.widener.edu).
diff --git a/bfd/coff-z8k.c b/bfd/coff-z8k.c
index 3337376..15c7f9d 100644
--- a/bfd/coff-z8k.c
+++ b/bfd/coff-z8k.c
@@ -1,5 +1,5 @@
/* BFD back-end for Zilog Z800n COFF binaries.
- Copyright 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002
+ Copyright 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Contributed by Cygnus Support.
Written by Steve Chamberlain, <sac@cygnus.com>.
@@ -268,7 +268,7 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
abort ();
gap /= 2;
- if (gap > 0 || gap < -128)
+ if (gap > 0 || gap < -127)
{
if (! ((*link_info->callbacks->reloc_overflow)
(link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
@@ -295,8 +295,7 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
if (gap & 1)
abort ();
- gap /= 2;
- if (gap > 8191 || gap < -8192)
+ if (gap > 4096 || gap < -4095)
{
if (! ((*link_info->callbacks->reloc_overflow)
(link_info, bfd_asymbol_name (*reloc->sym_ptr_ptr),
@@ -304,6 +303,7 @@ extra_case (in_abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)
input_section, reloc->address)))
abort ();
}
+ gap /= 2;
bfd_put_16 (in_abfd,
(bfd_get_16 ( in_abfd, data + *dst_ptr) & 0xf000) | (-gap & 0x0fff),
data + *dst_ptr);
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index c6b1803..895f96b 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -2706,7 +2706,7 @@ const bfd_target rs6000coff64_vec =
/* Symbols */
coff_get_symtab_upper_bound,
- coff_get_symtab,
+ coff_canonicalize_symtab,
coff_make_empty_symbol,
coff_print_symbol,
coff_get_symbol_info,
@@ -2949,7 +2949,7 @@ const bfd_target aix5coff64_vec =
/* Symbols */
coff_get_symtab_upper_bound,
- coff_get_symtab,
+ coff_canonicalize_symtab,
coff_make_empty_symbol,
coff_print_symbol,
coff_get_symbol_info,
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 3b39f09..924bb34 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -333,7 +333,7 @@ static bfd_boolean coff_compute_section_file_positions
static bfd_boolean coff_write_object_contents
PARAMS ((bfd *)) ATTRIBUTE_UNUSED;
static bfd_boolean coff_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
static PTR buy_and_read
PARAMS ((bfd *, file_ptr, bfd_size_type));
static bfd_boolean coff_slurp_line_table
@@ -1694,15 +1694,21 @@ coff_set_alignment_hook (abfd, section, scnhdr)
struct external_reloc dst;
struct internal_reloc n;
file_ptr oldpos = bfd_tell (abfd);
+ bfd_size_type relsz = bfd_coff_relsz (abfd);
+
bfd_seek (abfd, (file_ptr) hdr->s_relptr, 0);
- if (bfd_bread ((PTR) &dst, (bfd_size_type) bfd_coff_relsz (abfd), abfd)
- != bfd_coff_relsz (abfd))
+ if (bfd_bread ((PTR) &dst, relsz, abfd) != relsz)
return;
coff_swap_reloc_in (abfd, &dst, &n);
bfd_seek (abfd, oldpos, 0);
- section->reloc_count = hdr->s_nreloc = n.r_vaddr;
+ section->reloc_count = hdr->s_nreloc = n.r_vaddr - 1;
+ section->rel_filepos += relsz;
}
+ else if (hdr->s_nreloc == 0xffff)
+ (*_bfd_error_handler)
+ ("%s: warning: claims to have 0xffff relocs, without overflow",
+ bfd_get_filename (abfd));
}
#undef ALIGN_SET
#undef ELIFALIGN_SET
@@ -4265,7 +4271,7 @@ static bfd_boolean
coff_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;
{
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index fcb00fc..a712b4b 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
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -329,7 +329,7 @@ coff_section_from_bfd_index (abfd, index)
bfd *abfd;
int index;
{
- struct sec *answer = abfd->sections;
+ struct bfd_section *answer = abfd->sections;
if (index == N_ABS)
return bfd_abs_section_ptr;
@@ -365,7 +365,7 @@ coff_get_symtab_upper_bound (abfd)
/* Canonicalize a COFF symbol table. */
long
-coff_get_symtab (abfd, alocation)
+coff_canonicalize_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index c1eee1b..91a3822 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -27,6 +27,7 @@
#include "libbfd.h"
#include "coff/internal.h"
#include "libcoff.h"
+#include "safe-ctype.h"
static bfd_boolean coff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info);
static bfd_boolean coff_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, bfd_boolean *pneeded);
@@ -570,19 +571,24 @@ coff_link_add_symbols (bfd *abfd,
&& info->hash->creator->flavour == bfd_get_flavour (abfd)
&& (info->strip != strip_all && info->strip != strip_debugger))
{
- asection *stab, *stabstr;
+ asection *stabstr;
- stab = bfd_get_section_by_name (abfd, ".stab");
- if (stab != NULL)
- {
- stabstr = bfd_get_section_by_name (abfd, ".stabstr");
+ stabstr = bfd_get_section_by_name (abfd, ".stabstr");
- if (stabstr != NULL)
+ if (stabstr != NULL)
+ {
+ bfd_size_type string_offset = 0;
+ asection *stab;
+
+ for (stab = abfd->sections; stab; stab = stab->next)
+ if (strncmp (".stab", stab->name, 5) == 0
+ && (!stab->name[5]
+ || (stab->name[5] == '.' && ISDIGIT (stab->name[6]))))
{
struct coff_link_hash_table *table;
- struct coff_section_tdata *secdata;
-
- secdata = coff_section_data (abfd, stab);
+ struct coff_section_tdata *secdata
+ = coff_section_data (abfd, stab);
+
if (secdata == NULL)
{
amt = sizeof (struct coff_section_tdata);
@@ -596,7 +602,8 @@ coff_link_add_symbols (bfd *abfd,
if (! _bfd_link_section_stabs (abfd, &table->stab_info,
stab, stabstr,
- &secdata->stab_info))
+ &secdata->stab_info,
+ &string_offset))
goto error_return;
}
}
@@ -1028,10 +1035,27 @@ _bfd_coff_final_link (bfd *abfd,
bfd_coff_swap_reloc_out (abfd, irel, erel);
}
- if (bfd_seek (abfd, o->rel_filepos, SEEK_SET) != 0
- || (bfd_bwrite (external_relocs,
- (bfd_size_type) relsz * o->reloc_count, abfd)
- != (bfd_size_type) relsz * o->reloc_count))
+ if (bfd_seek (abfd, o->rel_filepos, SEEK_SET) != 0)
+ goto error_return;
+ if (obj_pe (abfd) && o->reloc_count >= 0xffff)
+ {
+ /* In PE COFF, write the count of relocs as the first
+ reloc. The header overflow bit will be set
+ elsewhere. */
+ struct internal_reloc incount;
+ bfd_byte *excount = (bfd_byte *)bfd_malloc (relsz);
+
+ memset (&incount, 0, sizeof (incount));
+ incount.r_vaddr = o->reloc_count + 1;
+ bfd_coff_swap_reloc_out (abfd, (PTR) &incount, (PTR) excount);
+ if (bfd_bwrite (excount, relsz, abfd) != relsz)
+ /* We'll leak, but it's an error anyway. */
+ goto error_return;
+ free (excount);
+ }
+ if (bfd_bwrite (external_relocs,
+ (bfd_size_type) relsz * o->reloc_count, abfd)
+ != (bfd_size_type) relsz * o->reloc_count)
goto error_return;
}
diff --git a/bfd/config.bfd b/bfd/config.bfd
index b047c64..9f51538 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -199,12 +199,6 @@ case "${targ}" in
targ_defvec=aout_arm_big_vec
targ_selvecs=aout_arm_little_vec
;;
- arm-*-vxworks*)
- targ_defvec=armcoff_little_vec
- targ_selvecs=armcoff_big_vec
- targ_underscore=yes
- targ_cflags=-DARM_COFF_BUGFIX
- ;;
arm-*-coff)
targ_defvec=armcoff_little_vec
targ_selvecs=armcoff_big_vec
@@ -222,7 +216,8 @@ case "${targ}" in
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux* | arm-*-kfreebsd*-gnu)
+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \
+ arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks)
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
@@ -366,11 +361,11 @@ case "${targ}" in
;;
#endif
- hppa*-*-linux-gnu*)
+ hppa*-*-linux-gnu* | hppa*-*-netbsd*)
targ_defvec=bfd_elf32_hppa_linux_vec
targ_selvecs=bfd_elf32_hppa_vec
;;
- hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-netbsd* | hppa*-*-sysv4* | hppa*-*-rtems* | hppa*-*-openbsd*)
+ hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-sysv4* | hppa*-*-rtems* | hppa*-*-openbsd*)
targ_defvec=bfd_elf32_hppa_vec
targ_selvecs=bfd_elf32_hppa_linux_vec
;;
@@ -461,7 +456,7 @@ case "${targ}" in
targ_cflags=-DOLD_FREEBSD_ABI_LABEL ;;
esac
;;
- i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu*)
+ i[3-7]86-*-netbsdelf* | i[3-7]86-*-netbsd*-gnu* | i[3-7]86-*-knetbsd*-gnu)
targ_defvec=bfd_elf32_i386_vec
targ_selvecs=i386netbsd_vec
;;
@@ -554,8 +549,8 @@ case "${targ}" in
i[3-7]86-*-aout* | i[3-7]86*-*-vsta*)
targ_defvec=i386aout_vec
;;
- i[3-7]86-*-vxworks*)
- targ_defvec=i386aout_vec
+ i[3-7]86-*-vxworks)
+ targ_defvec=bfd_elf32_i386_vec
targ_underscore=yes
;;
i[3-7]86-*-chaos)
@@ -797,7 +792,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
- mips*-*-elf* | mips*-*-rtems* | mips*-*-vxworks*)
+ mips*-*-elf* | mips*-*-rtems* | mips*-*-vxworks | mips*-*-windiss)
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
@@ -1084,6 +1079,14 @@ case "${targ}" in
targ_selvecs="shlpe_vec shlpei_vec"
targ_underscore=yes
;;
+ sh-*-vxworks)
+ targ_defvec=bfd_elf32_sh_vec
+ targ_selvecs="bfd_elf32_shl_vec"
+ # FIXME None of the following are actually used on this target, but
+ # they're necessary for coff-sh.c (which is unconditionally used) to be
+ # compiled correctly.
+ targ_selvecs="$targ_selvecs shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
+ ;;
sh-*-* | sh-*-rtems*)
targ_defvec=shcoff_vec
targ_selvecs="shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
diff --git a/bfd/configure b/bfd/configure
index 0d62a86..34d9bc5 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -778,6 +778,7 @@ fi
+am__api_version="1.4"
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -790,7 +791,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:794: checking for a BSD compatible install" >&5
+echo "configure:795: 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
@@ -843,7 +844,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:847: checking whether build environment is sane" >&5
+echo "configure:848: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -900,7 +901,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:904: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:905: 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
@@ -945,21 +946,21 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:950: checking for working aclocal" >&5
+echo $ac_n "checking for working aclocal-${am__api_version}""... $ac_c" 1>&6
+echo "configure:951: checking for working aclocal-${am__api_version}" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
- ACLOCAL=aclocal
+if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
+ ACLOCAL=aclocal-${am__api_version}
echo "$ac_t""found" 1>&6
else
- ACLOCAL="$missing_dir/missing aclocal"
+ ACLOCAL="$missing_dir/missing aclocal-${am__api_version}"
echo "$ac_t""missing" 1>&6
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:963: checking for working autoconf" >&5
+echo "configure:964: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -971,21 +972,21 @@ else
echo "$ac_t""missing" 1>&6
fi
-echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:976: checking for working automake" >&5
+echo $ac_n "checking for working automake-${am__api_version}""... $ac_c" 1>&6
+echo "configure:977: checking for working automake-${am__api_version}" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
-if (automake --version) < /dev/null > /dev/null 2>&1; then
- AUTOMAKE=automake
+if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then
+ AUTOMAKE=automake-${am__api_version}
echo "$ac_t""found" 1>&6
else
- AUTOMAKE="$missing_dir/missing automake"
+ AUTOMAKE="$missing_dir/missing automake-${am__api_version}"
echo "$ac_t""missing" 1>&6
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:989: checking for working autoheader" >&5
+echo "configure:990: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -998,7 +999,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1002: checking for working makeinfo" >&5
+echo "configure:1003: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@@ -1033,7 +1034,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1037: checking for $ac_word" >&5
+echo "configure:1038: 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
@@ -1065,7 +1066,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1069: checking for $ac_word" >&5
+echo "configure:1070: 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
@@ -1097,7 +1098,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1101: checking for $ac_word" >&5
+echo "configure:1102: 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
@@ -1203,7 +1204,7 @@ 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:1207: checking for $ac_word" >&5
+echo "configure:1208: 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
@@ -1233,7 +1234,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:1237: checking for $ac_word" >&5
+echo "configure:1238: 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
@@ -1284,7 +1285,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:1288: checking for $ac_word" >&5
+echo "configure:1289: 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
@@ -1316,7 +1317,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1320: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1321: 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.
@@ -1327,12 +1328,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1331 "configure"
+#line 1332 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1337: \"$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
@@ -1358,12 +1359,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:1362: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1363: 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:1367: checking whether we are using GNU C" >&5
+echo "configure:1368: 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
@@ -1372,7 +1373,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1376: \"$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:1377: \"$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
@@ -1391,7 +1392,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:1395: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1396: 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
@@ -1434,7 +1435,7 @@ ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
-echo "configure:1438: checking for ld used by GCC" >&5
+echo "configure:1439: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1464,10 +1465,10 @@ echo "configure:1438: 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:1468: checking for GNU ld" >&5
+echo "configure:1469: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1471: checking for non-GNU ld" >&5
+echo "configure:1472: checking for non-GNU ld" >&5
fi
if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -1502,7 +1503,7 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1506: checking if the linker ($LD) is GNU ld" >&5
+echo "configure:1507: checking if the linker ($LD) is GNU ld" >&5
if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1519,7 +1520,7 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1523: checking for $LD option to reload object files" >&5
+echo "configure:1524: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1531,7 +1532,7 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1535: checking for BSD-compatible nm" >&5
+echo "configure:1536: checking for BSD-compatible nm" >&5
if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1569,7 +1570,7 @@ NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1573: checking whether ln -s works" >&5
+echo "configure:1574: 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
@@ -1590,7 +1591,7 @@ else
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1594: checking how to recognise dependant libraries" >&5
+echo "configure:1595: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1763,13 +1764,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1767: checking for object suffix" >&5
+echo "configure:1768: 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:1773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -1789,7 +1790,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1793: checking for executable suffix" >&5
+echo "configure:1794: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1799,7 +1800,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -1826,7 +1827,7 @@ case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1830: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1831: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1888,7 +1889,7 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1892: checking for file" >&5
+echo "configure:1893: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1959,7 +1960,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1963: checking for $ac_word" >&5
+echo "configure:1964: 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
@@ -1991,7 +1992,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1995: checking for $ac_word" >&5
+echo "configure:1996: 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
@@ -2026,7 +2027,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2030: checking for $ac_word" >&5
+echo "configure:2031: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2058,7 +2059,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2062: checking for $ac_word" >&5
+echo "configure:2063: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2125,8 +2126,8 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2129 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ echo '#line 2130 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
@@ -2159,7 +2160,7 @@ case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
- if { (eval echo configure:2163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ if { (eval echo configure:2164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
case "`/usr/bin/file conftest.o`" in
*ELF-32*)
HPUX_IA64_MODE="32"
@@ -2177,7 +2178,7 @@ ia64-*-hpux*)
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2181: checking whether the C compiler needs -belf" >&5
+echo "configure:2182: checking whether the C compiler needs -belf" >&5
if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2190,14 +2191,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2194 "configure"
+#line 2195 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
lt_cv_cc_needs_belf=yes
else
@@ -2387,7 +2388,7 @@ if test -z "$target" ; then
fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:2391: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:2392: 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"
@@ -2410,7 +2411,7 @@ fi
echo $ac_n "checking whether to install libbfd""... $ac_c" 1>&6
-echo "configure:2414: checking whether to install libbfd" >&5
+echo "configure:2415: checking whether to install libbfd" >&5
# Check whether --enable-install-libbfd or --disable-install-libbfd was given.
if test "${enable_install_libbfd+set}" = set; then
enableval="$enable_install_libbfd"
@@ -2447,7 +2448,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2451: checking for executable suffix" >&5
+echo "configure:2452: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2457,7 +2458,7 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:2461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:2462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
@@ -2487,7 +2488,7 @@ bfd_default_target_size=32
# 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:2491: checking for $ac_word" >&5
+echo "configure:2492: 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
@@ -2517,7 +2518,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:2521: checking for $ac_word" >&5
+echo "configure:2522: 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
@@ -2568,7 +2569,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:2572: checking for $ac_word" >&5
+echo "configure:2573: 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
@@ -2600,7 +2601,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2604: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2605: 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.
@@ -2611,12 +2612,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2615 "configure"
+#line 2616 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2620: \"$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
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
@@ -2642,12 +2643,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:2646: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2647: 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:2651: checking whether we are using GNU C" >&5
+echo "configure:2652: 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
@@ -2656,7 +2657,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2660: \"$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:2661: \"$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
@@ -2675,7 +2676,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:2679: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2680: 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
@@ -2709,7 +2710,7 @@ fi
ALL_LINGUAS="fr tr ja es sv da zh_CN"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2713: checking how to run the C preprocessor" >&5
+echo "configure:2714: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2724,13 +2725,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2728 "configure"
+#line 2729 "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:2734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2735: \"$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
:
@@ -2741,13 +2742,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2745 "configure"
+#line 2746 "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:2751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2752: \"$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
:
@@ -2758,13 +2759,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2762 "configure"
+#line 2763 "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:2768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2769: \"$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
:
@@ -2791,7 +2792,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2795: checking for $ac_word" >&5
+echo "configure:2796: 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
@@ -2819,12 +2820,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2823: checking for ANSI C header files" >&5
+echo "configure:2824: 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 2828 "configure"
+#line 2829 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2832,7 +2833,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2837: \"$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*
@@ -2849,7 +2850,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 2853 "configure"
+#line 2854 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2867,7 +2868,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 2871 "configure"
+#line 2872 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2888,7 +2889,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2892 "configure"
+#line 2893 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2899,7 +2900,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2923,12 +2924,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2927: checking for working const" >&5
+echo "configure:2928: 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 2932 "configure"
+#line 2933 "configure"
#include "confdefs.h"
int main() {
@@ -2977,7 +2978,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2998,21 +2999,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3002: checking for inline" >&5
+echo "configure:3003: 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 3009 "configure"
+#line 3010 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:3016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -3038,12 +3039,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3042: checking for off_t" >&5
+echo "configure:3043: 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 3047 "configure"
+#line 3048 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3071,12 +3072,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3075: checking for size_t" >&5
+echo "configure:3076: 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 3080 "configure"
+#line 3081 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3106,19 +3107,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:3110: checking for working alloca.h" >&5
+echo "configure:3111: 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 3115 "configure"
+#line 3116 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3123: \"$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
@@ -3139,12 +3140,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3143: checking for alloca" >&5
+echo "configure:3144: 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 3148 "configure"
+#line 3149 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3172,7 +3173,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3177: \"$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
@@ -3204,12 +3205,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3208: checking whether alloca needs Cray hooks" >&5
+echo "configure:3209: 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 3213 "configure"
+#line 3214 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3234,12 +3235,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:3238: checking for $ac_func" >&5
+echo "configure:3239: 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 3243 "configure"
+#line 3244 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3262,7 +3263,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3267: \"$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
@@ -3289,7 +3290,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3293: checking stack direction for C alloca" >&5
+echo "configure:3294: 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
@@ -3297,7 +3298,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3301 "configure"
+#line 3302 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3316,7 +3317,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3321: \"$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
@@ -3341,17 +3342,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:3345: checking for $ac_hdr" >&5
+echo "configure:3346: 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 3350 "configure"
+#line 3351 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3356: \"$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*
@@ -3380,12 +3381,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3384: checking for $ac_func" >&5
+echo "configure:3385: 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 3389 "configure"
+#line 3390 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3408,7 +3409,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3413: \"$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
@@ -3433,7 +3434,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3437: checking for working mmap" >&5
+echo "configure:3438: 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
@@ -3441,7 +3442,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3445 "configure"
+#line 3446 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3581,7 +3582,7 @@ main()
}
EOF
-if { (eval echo configure:3585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3586: \"$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
@@ -3609,17 +3610,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:3613: checking for $ac_hdr" >&5
+echo "configure:3614: 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 3618 "configure"
+#line 3619 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3624: \"$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*
@@ -3649,12 +3650,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3653: checking for $ac_func" >&5
+echo "configure:3654: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3658 "configure"
+#line 3659 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3677,7 +3678,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3682: \"$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
@@ -3706,12 +3707,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3710: checking for $ac_func" >&5
+echo "configure:3711: 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 3715 "configure"
+#line 3716 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3734,7 +3735,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3739: \"$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
@@ -3768,19 +3769,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3772: checking for LC_MESSAGES" >&5
+echo "configure:3773: 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 3777 "configure"
+#line 3778 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3785: \"$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
@@ -3801,7 +3802,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3805: checking whether NLS is requested" >&5
+echo "configure:3806: 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"
@@ -3821,7 +3822,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3825: checking whether included gettext is requested" >&5
+echo "configure:3826: 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"
@@ -3840,17 +3841,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3844: checking for libintl.h" >&5
+echo "configure:3845: 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 3849 "configure"
+#line 3850 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3855: \"$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*
@@ -3867,19 +3868,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:3871: checking for gettext in libc" >&5
+echo "configure:3872: 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 3876 "configure"
+#line 3877 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3884: \"$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
@@ -3895,7 +3896,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:3899: checking for bindtextdomain in -lintl" >&5
+echo "configure:3900: 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
@@ -3903,7 +3904,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3907 "configure"
+#line 3908 "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
@@ -3914,7 +3915,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3919: \"$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
@@ -3930,19 +3931,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:3934: checking for gettext in libintl" >&5
+echo "configure:3935: 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 3939 "configure"
+#line 3940 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3947: \"$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
@@ -3970,7 +3971,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:3974: checking for $ac_word" >&5
+echo "configure:3975: 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
@@ -4004,12 +4005,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4008: checking for $ac_func" >&5
+echo "configure:4009: 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 4013 "configure"
+#line 4014 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4032,7 +4033,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4037: \"$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
@@ -4059,7 +4060,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:4063: checking for $ac_word" >&5
+echo "configure:4064: 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
@@ -4095,7 +4096,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:4099: checking for $ac_word" >&5
+echo "configure:4100: 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
@@ -4127,7 +4128,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 4131 "configure"
+#line 4132 "configure"
#include "confdefs.h"
int main() {
@@ -4135,7 +4136,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:4139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -4167,7 +4168,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:4171: checking for $ac_word" >&5
+echo "configure:4172: 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
@@ -4201,7 +4202,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:4205: checking for $ac_word" >&5
+echo "configure:4206: 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
@@ -4237,7 +4238,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:4241: checking for $ac_word" >&5
+echo "configure:4242: 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
@@ -4327,7 +4328,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4331: checking for catalogs to be installed" >&5
+echo "configure:4332: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4355,17 +4356,17 @@ echo "configure:4331: 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:4359: checking for linux/version.h" >&5
+echo "configure:4360: 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 4364 "configure"
+#line 4365 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4370: \"$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*
@@ -4443,7 +4444,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:4447: checking for a BSD compatible install" >&5
+echo "configure:4448: 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
@@ -4501,28 +4502,21 @@ BFD_HOST_LONG_LONG=0
BFD_HOST_64_BIT_DEFINED=0
BFD_HOST_64_BIT=
BFD_HOST_U_64_BIT=
-if test "x${HOST_64BIT_TYPE}" = "xlong"; then
- BFD_HOST_64BIT_LONG=1
-elif test "x${HOST_64BIT_TYPE}" != "x"; then
- BFD_HOST_64_BIT_DEFINED=1
- BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
- BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
-fi
echo $ac_n "checking for long long""... $ac_c" 1>&6
-echo "configure:4514: checking for long long" >&5
+echo "configure:4508: 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
else
cat > conftest.$ac_ext <<EOF
-#line 4519 "configure"
+#line 4513 "configure"
#include "confdefs.h"
int main() {
unsigned long long ll = 18446744073709551615ULL;
; return 0; }
EOF
-if { (eval echo configure:4526: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_has_long_long=yes
else
@@ -4537,6 +4531,100 @@ fi
echo "$ac_t""$bfd_cv_has_long_long" 1>&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:4536: 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
+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 4542 "configure"
+#include "confdefs.h"
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (long long) == $ac_size):;
+; return 0; }
+EOF
+if { (eval echo configure:4552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_sizeof_long_long=$ac_size
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ 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; }
+fi
+echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+EOF
+
+
+fi
+
+echo $ac_n "checking size of long""... $ac_c" 1>&6
+echo "configure:4577: checking size of long" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&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 4583 "configure"
+#include "confdefs.h"
+#include "confdefs.h"
+#include <sys/types.h>
+
+
+int main() {
+switch (0) case 0: case (sizeof (long) == $ac_size):;
+; return 0; }
+EOF
+if { (eval echo configure:4593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_sizeof_long=$ac_size
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+ 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; }
+fi
+echo "$ac_t""$ac_cv_sizeof_long" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+EOF
+
+
+if test "x${ac_cv_sizeof_long}" = "x8"; then
+ host64=true
+ HOST_64BIT_TYPE="long"
+elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
+ HOST_64BIT_TYPE="long long"
+ HOST_U_64BIT_TYPE="unsigned long long"
+fi
+
+if test "x${HOST_64BIT_TYPE}" = "xlong"; then
+ BFD_HOST_64BIT_LONG=1
+elif test "x${HOST_64BIT_TYPE}" != "x"; then
+ BFD_HOST_64_BIT_DEFINED=1
+ BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
+ BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
fi
@@ -4559,7 +4647,7 @@ if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4563: checking for build system executable suffix" >&5
+echo "configure:4651: checking for build system executable suffix" >&5
if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4587,17 +4675,17 @@ for ac_hdr 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:4591: checking for $ac_hdr" >&5
+echo "configure:4679: 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 4596 "configure"
+#line 4684 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4689: \"$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*
@@ -4627,17 +4715,17 @@ for ac_hdr 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:4631: checking for $ac_hdr" >&5
+echo "configure:4719: 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 4636 "configure"
+#line 4724 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4729: \"$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*
@@ -4664,12 +4752,12 @@ fi
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4668: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:4756: 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 4673 "configure"
+#line 4761 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -4678,7 +4766,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:4682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -4703,12 +4791,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:4707: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4795: 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 4712 "configure"
+#line 4800 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4716,7 +4804,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4741,7 +4829,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:4745: checking for opendir in -ldir" >&5
+echo "configure:4833: 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
@@ -4749,7 +4837,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4753 "configure"
+#line 4841 "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
@@ -4760,7 +4848,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4852: \"$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
@@ -4782,7 +4870,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4786: checking for opendir in -lx" >&5
+echo "configure:4874: 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
@@ -4790,7 +4878,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4794 "configure"
+#line 4882 "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
@@ -4801,7 +4889,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4893: \"$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
@@ -4826,12 +4914,12 @@ 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:4830: checking for $ac_func" >&5
+echo "configure:4918: 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 4835 "configure"
+#line 4923 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4854,7 +4942,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4946: \"$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
@@ -4881,12 +4969,12 @@ done
for ac_func in strtoull
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4885: checking for $ac_func" >&5
+echo "configure:4973: 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 4890 "configure"
+#line 4978 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4909,7 +4997,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5001: \"$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
@@ -4944,12 +5032,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4948: checking whether strstr must be declared" >&5
+echo "configure:5036: 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 4953 "configure"
+#line 5041 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4970,7 +5058,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4991,12 +5079,12 @@ EOF
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:4995: checking whether malloc must be declared" >&5
+echo "configure:5083: 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 5000 "configure"
+#line 5088 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5017,7 +5105,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:5021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -5038,12 +5126,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:5042: checking whether realloc must be declared" >&5
+echo "configure:5130: 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 5047 "configure"
+#line 5135 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5064,7 +5152,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:5068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -5085,12 +5173,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:5089: checking whether free must be declared" >&5
+echo "configure:5177: 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 5094 "configure"
+#line 5182 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5111,7 +5199,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:5115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -5132,12 +5220,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:5136: checking whether getenv must be declared" >&5
+echo "configure:5224: 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
else
cat > conftest.$ac_ext <<EOF
-#line 5141 "configure"
+#line 5229 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5158,7 +5246,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:5162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -5230,7 +5318,7 @@ if test "${target}" = "${host}"; then
COREFILE=''
TRAD_HEADER='"hosts/i386bsd.h"'
;;
- i[3-7]86-*-netbsd* | i[3-7]86-*-openbsd*)
+ i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
COREFILE=netbsd-core.lo
;;
i[3-7]86-esix-sysv3*)
@@ -5346,16 +5434,16 @@ if test "${target}" = "${host}"; then
# 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:5350: checking for c_impl in struct core_dumpx" >&5
+echo "configure:5438: checking for c_impl in struct core_dumpx" >&5
cat > conftest.$ac_ext <<EOF
-#line 5352 "configure"
+#line 5440 "configure"
#include "confdefs.h"
#include <core.h>
int main() {
struct core_dumpx c; c.c_impl = 0;
; return 0; }
EOF
-if { (eval echo configure:5359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_ST_C_IMPL 1
@@ -5426,17 +5514,17 @@ rm -f conftest*
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5430: checking for $ac_hdr" >&5
+echo "configure:5518: 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 5435 "configure"
+#line 5523 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5528: \"$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*
@@ -5464,12 +5552,12 @@ done
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5468: checking for prstatus_t in sys/procfs.h" >&5
+echo "configure:5556: 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 5473 "configure"
+#line 5561 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5478,7 +5566,7 @@ int main() {
prstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus_t=yes
else
@@ -5500,12 +5588,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5504: checking for prstatus32_t in sys/procfs.h" >&5
+echo "configure:5592: checking for prstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5509 "configure"
+#line 5597 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5514,7 +5602,7 @@ int main() {
prstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus32_t=yes
else
@@ -5536,12 +5624,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5540: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+echo "configure:5628: checking for prstatus_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5545 "configure"
+#line 5633 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5550,7 +5638,7 @@ int main() {
prstatus_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who=yes
else
@@ -5572,12 +5660,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5576: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+echo "configure:5664: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5581 "configure"
+#line 5669 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5586,7 +5674,7 @@ int main() {
prstatus32_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
else
@@ -5608,12 +5696,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5612: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5700: 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 5617 "configure"
+#line 5705 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5622,7 +5710,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -5644,12 +5732,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5648: checking for pxstatus_t in sys/procfs.h" >&5
+echo "configure:5736: checking for pxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5653 "configure"
+#line 5741 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5658,7 +5746,7 @@ int main() {
pxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pxstatus_t=yes
else
@@ -5680,12 +5768,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5684: checking for pstatus32_t in sys/procfs.h" >&5
+echo "configure:5772: checking for pstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5689 "configure"
+#line 5777 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5694,7 +5782,7 @@ int main() {
pstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus32_t=yes
else
@@ -5716,12 +5804,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5720: checking for prpsinfo_t in sys/procfs.h" >&5
+echo "configure:5808: checking for prpsinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5725 "configure"
+#line 5813 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5730,7 +5818,7 @@ int main() {
prpsinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
else
@@ -5752,12 +5840,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5756: checking for prpsinfo32_t in sys/procfs.h" >&5
+echo "configure:5844: checking for prpsinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5761 "configure"
+#line 5849 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5766,7 +5854,7 @@ int main() {
prpsinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
else
@@ -5788,12 +5876,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5792: checking for psinfo_t in sys/procfs.h" >&5
+echo "configure:5880: checking for psinfo_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5797 "configure"
+#line 5885 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5802,7 +5890,7 @@ int main() {
psinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo_t=yes
else
@@ -5824,12 +5912,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5828: checking for psinfo32_t in sys/procfs.h" >&5
+echo "configure:5916: checking for psinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5833 "configure"
+#line 5921 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5838,7 +5926,7 @@ int main() {
psinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo32_t=yes
else
@@ -5860,12 +5948,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5864: checking for lwpstatus_t in sys/procfs.h" >&5
+echo "configure:5952: checking for lwpstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5869 "configure"
+#line 5957 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5874,7 +5962,7 @@ int main() {
lwpstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
else
@@ -5896,12 +5984,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5900: checking for lwpxstatus_t in sys/procfs.h" >&5
+echo "configure:5988: checking for lwpxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5905 "configure"
+#line 5993 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5910,7 +5998,7 @@ int main() {
lwpxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
else
@@ -5932,12 +6020,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5936: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+echo "configure:6024: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5941 "configure"
+#line 6029 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5946,7 +6034,7 @@ int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_context
; return 0; }
EOF
-if { (eval echo configure:5950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context=yes
else
@@ -5968,12 +6056,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5972: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+echo "configure:6060: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5977 "configure"
+#line 6065 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5982,7 +6070,7 @@ int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
; return 0; }
EOF
-if { (eval echo configure:5986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg=yes
else
@@ -6004,12 +6092,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:6008: checking for win32_pstatus_t in sys/procfs.h" >&5
+echo "configure:6096: checking for win32_pstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_win32_pstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6013 "configure"
+#line 6101 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -6018,7 +6106,7 @@ int main() {
win32_pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:6022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
else
@@ -6487,10 +6575,10 @@ case ${host64}-${target64}-${want64} in
if test -n "$GCC" ; then
bad_64bit_gcc=no;
echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
-echo "configure:6491: checking for gcc version with buggy 64-bit support" >&5
+echo "configure:6579: checking for gcc version with buggy 64-bit support" >&5
# Add more tests for gcc versions with non-working 64-bit support here.
cat > conftest.$ac_ext <<EOF
-#line 6494 "configure"
+#line 6582 "configure"
#include "confdefs.h"
:__GNUC__:__GNUC_MINOR__:__i386__:
EOF
@@ -6536,17 +6624,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:6540: checking for $ac_hdr" >&5
+echo "configure:6628: 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 6545 "configure"
+#line 6633 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6638: \"$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*
@@ -6575,12 +6663,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6579: checking for $ac_func" >&5
+echo "configure:6667: 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 6584 "configure"
+#line 6672 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6603,7 +6691,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6695: \"$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
@@ -6628,7 +6716,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6632: checking for working mmap" >&5
+echo "configure:6720: 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
@@ -6636,7 +6724,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6640 "configure"
+#line 6728 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6776,7 +6864,7 @@ main()
}
EOF
-if { (eval echo configure:6780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6868: \"$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
@@ -6801,12 +6889,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6805: checking for $ac_func" >&5
+echo "configure:6893: 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 6810 "configure"
+#line 6898 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6829,7 +6917,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
diff --git a/bfd/configure.host b/bfd/configure.host
index c9aa356..69eb17a 100644
--- a/bfd/configure.host
+++ b/bfd/configure.host
@@ -19,22 +19,17 @@ HOST_U_64BIT_TYPE=
case "${host}" in
-alpha*-*-*) host64=true; HOST_64BIT_TYPE=long ;;
-
-hppa*64*-*-hpux*) HDEFINES=-DHOST_HPPAHPUX;
- host64=true; HOST_64BIT_TYPE=long ;;
hppa*-*-hpux*) HDEFINES=-DHOST_HPPAHPUX ;;
hppa*-*-hiux*) HDEFINES=-DHOST_HPPAHPUX ;;
-hppa*64*-*-linux*) host64=true; HOST_64BIT_TYPE=long ;;
hppa*-*-mpeix*) HDEFINES=-DHOST_HPPAMPEIX ;;
hppa*-*-bsd*) HDEFINES=-DHOST_HPPABSD ;;
hppa*-*-osf*) HDEFINES=-DHOST_HPPAOSF ;;
-ia64-*-linux*) host64=true; HOST_64BIT_TYPE=long ;;
-ia64-*-hpux*) host64=true
- HOST_64BIT_TYPE="long long";
- HOST_U_64BIT_TYPE="unsigned long long";
- ;;
+ia64-*-*) host64=true;;
+
+# Workaround for limitations on win9x where file contents are
+# not zero'd out if you seek past the end and then write.
+i[3-7]86-*-mingw32*) HDEFINES=-D__USE_MINGW_FSEEK;;
i[3-7]86-sequent-bsd*) HDEFINES=-Dshared=genshared ;;
i[3-7]86-sequent-sysv4*) ;;
@@ -45,28 +40,14 @@ mips*-*-openbsd*) ;;
mips*-dec-*) HDEFINES="-G 4" ;;
mips*-sgi-irix3*) HDEFINES="-G 4" ;;
mips*-sgi-irix4*) HDEFINES="-G 4" ;;
-mips*-sgi-irix6*) host64=true
- HOST_64BIT_TYPE="long long";
- HOST_U_64BIT_TYPE="unsigned long long";
- ;;
-mips64*-*-linux*) host64=true
- HOST_64BIT_TYPE="long long";
- HOST_U_64BIT_TYPE="unsigned long long";
- ;;
+mips*-sgi-irix6*) host64=true;;
+mips64*-*-linux*) host64=true;;
mips*-*-sysv4*) ;;
mips*-*-sysv*) HDEFINES="-G 4" ;;
mips*-*-riscos*) HDEFINES="-G 4" ;;
m68*-hp-hpux*) HDEFINES=-DHOST_HP300HPUX ;;
-*-*-aix*) HOST_64BIT_TYPE="long long"
- HOST_U_64BIT_TYPE="unsigned long long"
- ;;
-
-*-*-solaris*) HOST_64BIT_TYPE="long long"
- HOST_U_64BIT_TYPE="unsigned long long"
- ;;
-
*-*-windows*)
HOST_64BIT_TYPE=__int64
HOST_U_64BIT_TYPE="unsigned __int64"
diff --git a/bfd/configure.in b/bfd/configure.in
index b3a6e68..35ba4e2 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -117,13 +117,6 @@ BFD_HOST_LONG_LONG=0
BFD_HOST_64_BIT_DEFINED=0
BFD_HOST_64_BIT=
BFD_HOST_U_64_BIT=
-if test "x${HOST_64BIT_TYPE}" = "xlong"; then
- BFD_HOST_64BIT_LONG=1
-elif test "x${HOST_64BIT_TYPE}" != "x"; then
- BFD_HOST_64_BIT_DEFINED=1
- BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
- BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
-fi
AC_MSG_CHECKING([for long long])
AC_CACHE_VAL(bfd_cv_has_long_long,
@@ -133,6 +126,24 @@ 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
+ AC_COMPILE_CHECK_SIZEOF(long long)
+fi
+
+AC_COMPILE_CHECK_SIZEOF(long)
+if test "x${ac_cv_sizeof_long}" = "x8"; then
+ host64=true
+ HOST_64BIT_TYPE="long"
+elif test "x${ac_cv_sizeof_long_long}" = "x8"; then
+ HOST_64BIT_TYPE="long long"
+ HOST_U_64BIT_TYPE="unsigned long long"
+fi
+
+if test "x${HOST_64BIT_TYPE}" = "xlong"; then
+ BFD_HOST_64BIT_LONG=1
+elif test "x${HOST_64BIT_TYPE}" != "x"; then
+ BFD_HOST_64_BIT_DEFINED=1
+ BFD_HOST_64_BIT=${HOST_64BIT_TYPE}
+ BFD_HOST_U_64_BIT=${HOST_U_64BIT_TYPE}
fi
AC_SUBST(BFD_HOST_64BIT_LONG)
@@ -220,7 +231,7 @@ changequote([,])dnl
TRAD_HEADER='"hosts/i386bsd.h"'
;;
changequote(,)dnl
- i[3-7]86-*-netbsd* | i[3-7]86-*-openbsd*)
+ i[3-7]86-*-netbsd* | i[3-7]86-*-knetbsd*-gnu | i[3-7]86-*-openbsd*)
changequote([,])dnl
COREFILE=netbsd-core.lo
;;
diff --git a/bfd/cpu-frv.c b/bfd/cpu-frv.c
index 8589144..f911881 100644
--- a/bfd/cpu-frv.c
+++ b/bfd/cpu-frv.c
@@ -1,5 +1,5 @@
/* BFD support for the FRV processor.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -46,8 +46,11 @@ static const bfd_arch_info_type arch_info_400
static const bfd_arch_info_type arch_info_500
= FRV_ARCH (bfd_mach_fr500, "fr500", FALSE, &arch_info_400);
+static const bfd_arch_info_type arch_info_550
+ = FRV_ARCH (bfd_mach_fr550, "fr550", FALSE, &arch_info_500);
+
static const bfd_arch_info_type arch_info_simple
- = FRV_ARCH (bfd_mach_frvsimple, "simple", FALSE, &arch_info_500);
+ = FRV_ARCH (bfd_mach_frvsimple, "simple", FALSE, &arch_info_550);
static const bfd_arch_info_type arch_info_tomcat
= FRV_ARCH (bfd_mach_frvtomcat, "tomcat", FALSE, &arch_info_simple);
diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c
index 1a4f4d7..5907de0 100644
--- a/bfd/cpu-h8300.c
+++ b/bfd/cpu-h8300.c
@@ -23,11 +23,6 @@
#include "sysdep.h"
#include "libbfd.h"
-static bfd_boolean h8300_scan
- (const struct bfd_arch_info *, const char *);
-static const bfd_arch_info_type * compatible
- (const bfd_arch_info_type *, const bfd_arch_info_type *);
-
static bfd_boolean
h8300_scan (const struct bfd_arch_info *info, const char *string)
{
@@ -111,7 +106,7 @@ compatible (const bfd_arch_info_type *in, const bfd_arch_info_type *out)
static const bfd_arch_info_type h8300sxn_info_struct =
{
32, /* 32 bits in a word */
- 32, /* 32 bits in an address */
+ 16, /* 16 bits in an address */
8, /* 8 bits in a byte */
bfd_arch_h8300,
bfd_mach_h8300sxn,
@@ -143,7 +138,7 @@ static const bfd_arch_info_type h8300sx_info_struct =
static const bfd_arch_info_type h8300sn_info_struct =
{
32, /* 32 bits in a word. */
- 32, /* 32 bits in an address. */
+ 16, /* 16 bits in an address. */
8, /* 8 bits in a byte. */
bfd_arch_h8300,
bfd_mach_h8300sn,
@@ -156,11 +151,10 @@ static const bfd_arch_info_type h8300sn_info_struct =
&h8300sx_info_struct
};
-
static const bfd_arch_info_type h8300hn_info_struct =
{
32, /* 32 bits in a word. */
- 32, /* 32 bits in an address. */
+ 16, /* 16 bits in an address. */
8, /* 8 bits in a byte. */
bfd_arch_h8300,
bfd_mach_h8300hn,
diff --git a/bfd/cpu-h8500.c b/bfd/cpu-h8500.c
index 08fb359..fe05df5 100644
--- a/bfd/cpu-h8500.c
+++ b/bfd/cpu-h8500.c
@@ -1,5 +1,6 @@
/* BFD library support routines for the H8/500 architecture.
- Copyright 1993, 1995, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -35,7 +36,7 @@ howto16_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd)
bfd *abfd;
arelent *reloc_entry;
- struct symbol_cache_entry *symbol_in;
+ struct bfd_symbol *symbol_in;
PTR data;
asection *ignore_input_section;
bfd *ignore_bfd;
@@ -57,7 +58,7 @@ howto8_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd)
bfd *abfd;
arelent *reloc_entry;
- struct symbol_cache_entry *symbol_in;
+ struct bfd_symbol *symbol_in;
PTR data;
asection *ignore_input_section;
bfd *ignore_bfd;
@@ -79,7 +80,7 @@ howto8_FFnn_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd)
bfd *abfd;
arelent *reloc_entry;
- struct symbol_cache_entry *symbol_in;
+ struct bfd_symbol *symbol_in;
PTR data;
asection *ignore_input_section;
bfd *ignore_bfd;
@@ -102,7 +103,7 @@ howto8_pcrel_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd)
bfd *abfd;
arelent *reloc_entry;
- struct symbol_cache_entry *symbol_in;
+ struct bfd_symbol *symbol_in;
PTR data;
asection *ignore_input_section;
bfd *ignore_bfd;
diff --git a/bfd/cpu-hppa.c b/bfd/cpu-hppa.c
index 250c630..de5de7e 100644
--- a/bfd/cpu-hppa.c
+++ b/bfd/cpu-hppa.c
@@ -1,5 +1,5 @@
/* BFD support for the HP Precision Architecture architecture.
- Copyright 1992, 1995, 1998, 1999, 2000, 2002
+ Copyright 1992, 1995, 1998, 1999, 2000, 2002, 2003
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/bfd/cpu-ia64-opc.c b/bfd/cpu-ia64-opc.c
index 3cafb9f..740c2ee 100644
--- a/bfd/cpu-ia64-opc.c
+++ b/bfd/cpu-ia64-opc.c
@@ -1,4 +1,5 @@
-/* Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright 1998, 1999, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
diff --git a/bfd/cpu-iq2000.c b/bfd/cpu-iq2000.c
index fd6d230..4545f30 100644
--- a/bfd/cpu-iq2000.c
+++ b/bfd/cpu-iq2000.c
@@ -23,18 +23,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static const bfd_arch_info_type arch_info_struct[] =
{
- 32, /* bits per word */
- 32, /* bits per address */
- 8, /* bits per byte */
- bfd_arch_iq2000, /* architecture */
- bfd_mach_iq10, /* machine */
- "iq2000", /* architecture name */
- "iq10", /* printable name */
- 3, /* section align power */
- FALSE, /* the default ? */
- bfd_default_compatible, /* architecture comparison fn */
- bfd_default_scan, /* string to architecture convert fn */
- NULL /* next in list */
+ {
+ 32, /* bits per word */
+ 32, /* bits per address */
+ 8, /* bits per byte */
+ bfd_arch_iq2000, /* architecture */
+ bfd_mach_iq10, /* machine */
+ "iq2000", /* architecture name */
+ "iq10", /* printable name */
+ 3, /* section align power */
+ FALSE, /* the default ? */
+ bfd_default_compatible, /* architecture comparison fn */
+ bfd_default_scan, /* string to architecture convert fn */
+ NULL /* next in list */
+ }
};
const bfd_arch_info_type bfd_iq2000_arch =
@@ -52,6 +54,3 @@ const bfd_arch_info_type bfd_iq2000_arch =
bfd_default_scan, /* string to architecture convert fn */
&arch_info_struct[0], /* next in list */
};
-
-
-
diff --git a/bfd/cpu-m10300.c b/bfd/cpu-m10300.c
index 2de9cd1..76e40fd 100644
--- a/bfd/cpu-m10300.c
+++ b/bfd/cpu-m10300.c
@@ -1,5 +1,5 @@
/* BFD support for the Matsushita 10300 processor
- Copyright 1996, 1997, 1999, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/bfd/cpu-m68k.c b/bfd/cpu-m68k.c
index 1648340..71c7029 100644
--- a/bfd/cpu-m68k.c
+++ b/bfd/cpu-m68k.c
@@ -1,23 +1,23 @@
/* BFD library support routines for architectures.
- Copyright 1990, 1991, 1992, 1993, 1994, 1997, 1998, 2000, 2001, 2002
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1997, 1998, 2000, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
-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"
@@ -28,18 +28,19 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static const bfd_arch_info_type arch_info_struct[] =
{
- N(bfd_mach_m68000, "m68k:68000", FALSE, &arch_info_struct[1]),
- N(bfd_mach_m68008, "m68k:68008", FALSE, &arch_info_struct[2]),
- N(bfd_mach_m68010, "m68k:68010", FALSE, &arch_info_struct[3]),
- N(bfd_mach_m68020, "m68k:68020", FALSE, &arch_info_struct[4]),
- N(bfd_mach_m68030, "m68k:68030", FALSE, &arch_info_struct[5]),
- N(bfd_mach_m68040, "m68k:68040", FALSE, &arch_info_struct[6]),
- N(bfd_mach_cpu32, "m68k:cpu32", FALSE, &arch_info_struct[7]),
- N(bfd_mach_mcf5200,"m68k:5200", FALSE, &arch_info_struct[8]),
- N(bfd_mach_mcf5206e,"m68k:5206e",FALSE, &arch_info_struct[9]),
- 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, 0),
+ N(bfd_mach_m68000, "m68k:68000", FALSE, &arch_info_struct[1]),
+ N(bfd_mach_m68008, "m68k:68008", FALSE, &arch_info_struct[2]),
+ N(bfd_mach_m68010, "m68k:68010", FALSE, &arch_info_struct[3]),
+ N(bfd_mach_m68020, "m68k:68020", FALSE, &arch_info_struct[4]),
+ N(bfd_mach_m68030, "m68k:68030", FALSE, &arch_info_struct[5]),
+ N(bfd_mach_m68040, "m68k:68040", FALSE, &arch_info_struct[6]),
+ N(bfd_mach_cpu32, "m68k:cpu32", FALSE, &arch_info_struct[7]),
+ N(bfd_mach_mcf5200, "m68k:5200", FALSE, &arch_info_struct[8]),
+ N(bfd_mach_mcf5206e,"m68k:5206e", FALSE, &arch_info_struct[9]),
+ 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),
};
const bfd_arch_info_type bfd_m68k_arch =
diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
index e64ee06..1d56dff 100644
--- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c
@@ -1,6 +1,6 @@
/* bfd back-end for mips support
- Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
+ 2002, 2003 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -85,6 +85,7 @@ enum
I_mipsisa32,
I_mipsisa32r2,
I_mipsisa64,
+ I_mipsisa64r2,
I_sb1,
};
@@ -116,6 +117,7 @@ static const bfd_arch_info_type arch_info_struct[] =
N (32, 32, bfd_mach_mipsisa32, "mips:isa32", FALSE, NN(I_mipsisa32)),
N (32, 32, bfd_mach_mipsisa32r2,"mips:isa32r2", FALSE, NN(I_mipsisa32r2)),
N (64, 64, bfd_mach_mipsisa64, "mips:isa64", FALSE, NN(I_mipsisa64)),
+ N (64, 64, bfd_mach_mipsisa64r2,"mips:isa64r2", FALSE, NN(I_mipsisa64r2)),
N (64, 64, bfd_mach_mips_sb1, "mips:sb1", FALSE, 0),
};
diff --git a/bfd/cpu-msp430.c b/bfd/cpu-msp430.c
index 54ed649..519131c 100644
--- a/bfd/cpu-msp430.c
+++ b/bfd/cpu-msp430.c
@@ -1,5 +1,5 @@
/* BFD library support routines for the MSP architecture.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003 Free Software Foundation, Inc.
Contributed by Dmitry Diky <diwil@mail.ru>
This file is part of BFD, the Binary File Descriptor library.
diff --git a/bfd/cpu-ns32k.c b/bfd/cpu-ns32k.c
index 1a12b16..aab1559 100644
--- a/bfd/cpu-ns32k.c
+++ b/bfd/cpu-ns32k.c
@@ -37,7 +37,7 @@ const bfd_arch_info_type bfd_ns32k_arch =
N(32032,"ns32k:32032",FALSE, &arch_info_struct[0]);
static bfd_reloc_status_type do_ns32k_reloc
- PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
+ PARAMS ((bfd *, arelent *, struct bfd_symbol *, PTR, asection *,
bfd *, char **,
bfd_vma (*) (bfd_byte *, int),
void (*) (bfd_vma, bfd_byte *, int)));
@@ -158,7 +158,7 @@ do_ns32k_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
error_message, get_data, put_data)
bfd *abfd;
arelent *reloc_entry;
- struct symbol_cache_entry *symbol;
+ struct bfd_symbol *symbol;
PTR data;
asection *input_section;
bfd *output_bfd;
@@ -762,7 +762,7 @@ _bfd_ns32k_reloc_disp (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
bfd *abfd;
arelent *reloc_entry;
- struct symbol_cache_entry *symbol;
+ struct bfd_symbol *symbol;
PTR data;
asection *input_section;
bfd *output_bfd;
@@ -779,7 +779,7 @@ _bfd_ns32k_reloc_imm (abfd, reloc_entry, symbol, data, input_section,
output_bfd, error_message)
bfd *abfd;
arelent *reloc_entry;
- struct symbol_cache_entry *symbol;
+ struct bfd_symbol *symbol;
PTR data;
asection *input_section;
bfd *output_bfd;
diff --git a/bfd/cpu-rs6000.c b/bfd/cpu-rs6000.c
index 63df554..d94921f 100644
--- a/bfd/cpu-rs6000.c
+++ b/bfd/cpu-rs6000.c
@@ -1,5 +1,5 @@
/* BFD back-end for rs6000 support
- Copyright 1990, 1991, 1993, 1995, 2000, 2002
+ Copyright 1990, 1991, 1993, 1995, 2000, 2002, 2003
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
@@ -47,7 +47,7 @@ rs6000_compatible (a,b)
case bfd_arch_rs6000:
return bfd_default_compatible (a, b);
case bfd_arch_powerpc:
- if (b->mach == bfd_mach_rs6k)
+ if (a->mach == bfd_mach_rs6k)
return b;
return NULL;
}
diff --git a/bfd/cpu-sh.c b/bfd/cpu-sh.c
index e247cb8..2f33240 100644
--- a/bfd/cpu-sh.c
+++ b/bfd/cpu-sh.c
@@ -23,21 +23,6 @@
#include "sysdep.h"
#include "libbfd.h"
-#if 0
-/* This routine is provided two arch_infos and returns whether
- they'd be compatible. */
-
-static const bfd_arch_info_type *
-compatible (a,b)
- const bfd_arch_info_type *a;
- const bfd_arch_info_type *b;
-{
- if (a->arch != b->arch || a->mach != b->mach)
- return NULL;
- return a;
-}
-#endif
-
#define SH_NEXT &arch_info_struct[0]
#define SH2_NEXT &arch_info_struct[1]
#define SH2E_NEXT &arch_info_struct[2]
@@ -46,6 +31,10 @@ compatible (a,b)
#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 SH4A_NOFPU_NEXT &arch_info_struct[11]
#define SH64_NEXT NULL
static const bfd_arch_info_type arch_info_struct[] =
@@ -149,6 +138,62 @@ static const bfd_arch_info_type arch_info_struct[] =
SH4_NEXT
},
{
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
+ bfd_mach_sh4a,
+ "sh", /* arch_name */
+ "sh4a", /* printable name */
+ 1,
+ FALSE, /* not the default */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH4A_NEXT
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
+ bfd_mach_sh4al_dsp,
+ "sh", /* arch_name */
+ "sh4al-dsp", /* printable name */
+ 1,
+ FALSE, /* not the default */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH4AL_DSP_NEXT
+ },
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_sh,
+ bfd_mach_sh4_nofpu,
+ "sh", /* arch_name */
+ "sh4-nofpu", /* printable name */
+ 1,
+ FALSE, /* not the default */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH4_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_sh4a_nofpu,
+ "sh", /* arch_name */
+ "sh4a-nofpu", /* printable name */
+ 1,
+ FALSE, /* not the default */
+ bfd_default_compatible,
+ bfd_default_scan,
+ SH4A_NOFPU_NEXT
+ },
+ {
64, /* 64 bits in a word */
64, /* 64 bits in an address */
8, /* 8 bits in a byte */
diff --git a/bfd/cpu-z8k.c b/bfd/cpu-z8k.c
index 60d82ef..3ccedf6 100644
--- a/bfd/cpu-z8k.c
+++ b/bfd/cpu-z8k.c
@@ -1,5 +1,5 @@
/* BFD library support routines for the Z800n architecture.
- Copyright 1992, 1993, 1994, 2000, 2001, 2002
+ Copyright 1992, 1993, 1994, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support.
@@ -36,7 +36,7 @@ howto16_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd)
bfd *abfd;
arelent *reloc_entry;
- struct symbol_cache_entry *symbol_in;
+ struct bfd_symbol *symbol_in;
PTR data;
asection *ignore_input_section;
bfd *ignore_bfd;
@@ -58,7 +58,7 @@ howto8_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd)
bfd *abfd;
arelent *reloc_entry;
- struct symbol_cache_entry *symbol_in;
+ struct bfd_symbol *symbol_in;
PTR data;
asection *ignore_input_section;
bfd *ignore_bfd;
@@ -80,7 +80,7 @@ howto8_FFnn_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd)
bfd *abfd;
arelent *reloc_entry;
- struct symbol_cache_entry *symbol_in;
+ struct bfd_symbol *symbol_in;
PTR data;
asection *ignore_input_section;
bfd *ignore_bfd;
@@ -103,7 +103,7 @@ howto8_pcrel_callback (abfd, reloc_entry, symbol_in, data,
ignore_input_section, ignore_bfd)
bfd *abfd;
arelent *reloc_entry;
- struct symbol_cache_entry *symbol_in;
+ struct bfd_symbol *symbol_in;
PTR data;
asection *ignore_input_section;
bfd *ignore_bfd;
diff --git a/bfd/doc/ChangeLog b/bfd/doc/ChangeLog
index d345d80..3636ed8 100644
--- a/bfd/doc/ChangeLog
+++ b/bfd/doc/ChangeLog
@@ -1,3 +1,12 @@
+2003-10-15 Andrew Cagney <cagney@redhat.com>
+
+ * bfdint.texi (BFD target vector symbols): Rename _get_symtab to
+ _canonicalize_symtab.
+
+2003-10-08 David Taylor <dtaylor@emc.com>
+
+ * bfd.texinfo: Remove spurious backslash.
+
2003-07-04 Josh Baratz <baratz@intersystems.com>
* Makefile.am (MKDOC rule): Add $(CFLAGS) in case it contains
diff --git a/bfd/doc/Makefile.in b/bfd/doc/Makefile.in
index 81db77e..1c1fce9 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
diff --git a/bfd/doc/bfd.texinfo b/bfd/doc/bfd.texinfo
index d6a427f..3ed4194 100644
--- a/bfd/doc/bfd.texinfo
+++ b/bfd/doc/bfd.texinfo
@@ -64,7 +64,7 @@ notice identical to this one except for the removal of this paragraph
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\1.5} % For use in headers, footers too
+\xdef\manvers{1.5} % For use in headers, footers too
{\parskip=0pt
\hfill Free Software Foundation\par
\hfill sac\@www.gnu.org\par
diff --git a/bfd/doc/bfdint.texi b/bfd/doc/bfdint.texi
index 4566731..cd29ae8 100644
--- a/bfd/doc/bfdint.texi
+++ b/bfd/doc/bfdint.texi
@@ -694,7 +694,7 @@ information in BFD private data. This is called via
@samp{bfd_get_symtab_upper_bound}. The corresponding field in the
target vector is named @samp{_bfd_get_symtab_upper_bound}.
-@item _get_symtab
+@item _canonicalize_symtab
Read in the symbol table. This is called via
@samp{bfd_canonicalize_symtab}. The corresponding field in the target
vector is named @samp{_bfd_canonicalize_symtab}.
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 7a9e5b0..49422b2 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -61,21 +61,12 @@ struct attribute
{
char *str;
struct dwarf_block *blk;
- unsigned int unsnd;
- int snd;
- bfd_vma addr;
+ bfd_vma val;
+ bfd_signed_vma sval;
}
u;
};
-/* Get at parts of an attribute structure. */
-
-#define DW_STRING(attr) ((attr)->u.str)
-#define DW_UNSND(attr) ((attr)->u.unsnd)
-#define DW_BLOCK(attr) ((attr)->u.blk)
-#define DW_SND(attr) ((attr)->u.snd)
-#define DW_ADDR(attr) ((attr)->u.addr)
-
/* Blocks are a bunch of untyped bytes. */
struct dwarf_block
{
@@ -652,7 +643,7 @@ read_attribute_value (attr, form, unit, info_ptr)
case DW_FORM_addr:
/* FIXME: DWARF3 draft says DW_FORM_ref_addr is offset_size. */
case DW_FORM_ref_addr:
- DW_ADDR (attr) = read_address (unit, info_ptr);
+ attr->u.val = read_address (unit, info_ptr);
info_ptr += unit->addr_size;
break;
case DW_FORM_block2:
@@ -662,7 +653,7 @@ read_attribute_value (attr, form, unit, info_ptr)
info_ptr += 2;
blk->data = read_n_bytes (abfd, info_ptr, blk->size);
info_ptr += blk->size;
- DW_BLOCK (attr) = blk;
+ attr->u.blk = blk;
break;
case DW_FORM_block4:
amt = sizeof (struct dwarf_block);
@@ -671,26 +662,26 @@ read_attribute_value (attr, form, unit, info_ptr)
info_ptr += 4;
blk->data = read_n_bytes (abfd, info_ptr, blk->size);
info_ptr += blk->size;
- DW_BLOCK (attr) = blk;
+ attr->u.blk = blk;
break;
case DW_FORM_data2:
- DW_UNSND (attr) = read_2_bytes (abfd, info_ptr);
+ attr->u.val = read_2_bytes (abfd, info_ptr);
info_ptr += 2;
break;
case DW_FORM_data4:
- DW_UNSND (attr) = read_4_bytes (abfd, info_ptr);
+ attr->u.val = read_4_bytes (abfd, info_ptr);
info_ptr += 4;
break;
case DW_FORM_data8:
- DW_UNSND (attr) = read_8_bytes (abfd, info_ptr);
+ attr->u.val = read_8_bytes (abfd, info_ptr);
info_ptr += 8;
break;
case DW_FORM_string:
- DW_STRING (attr) = read_string (abfd, info_ptr, &bytes_read);
+ attr->u.str = read_string (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
break;
case DW_FORM_strp:
- DW_STRING (attr) = read_indirect_string (unit, info_ptr, &bytes_read);
+ attr->u.str = read_indirect_string (unit, info_ptr, &bytes_read);
info_ptr += bytes_read;
break;
case DW_FORM_block:
@@ -700,7 +691,7 @@ read_attribute_value (attr, form, unit, info_ptr)
info_ptr += bytes_read;
blk->data = read_n_bytes (abfd, info_ptr, blk->size);
info_ptr += blk->size;
- DW_BLOCK (attr) = blk;
+ attr->u.blk = blk;
break;
case DW_FORM_block1:
amt = sizeof (struct dwarf_block);
@@ -709,42 +700,42 @@ read_attribute_value (attr, form, unit, info_ptr)
info_ptr += 1;
blk->data = read_n_bytes (abfd, info_ptr, blk->size);
info_ptr += blk->size;
- DW_BLOCK (attr) = blk;
+ attr->u.blk = blk;
break;
case DW_FORM_data1:
- DW_UNSND (attr) = read_1_byte (abfd, info_ptr);
+ attr->u.val = read_1_byte (abfd, info_ptr);
info_ptr += 1;
break;
case DW_FORM_flag:
- DW_UNSND (attr) = read_1_byte (abfd, info_ptr);
+ attr->u.val = read_1_byte (abfd, info_ptr);
info_ptr += 1;
break;
case DW_FORM_sdata:
- DW_SND (attr) = read_signed_leb128 (abfd, info_ptr, &bytes_read);
+ attr->u.sval = read_signed_leb128 (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
break;
case DW_FORM_udata:
- DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
+ attr->u.val = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
break;
case DW_FORM_ref1:
- DW_UNSND (attr) = read_1_byte (abfd, info_ptr);
+ attr->u.val = read_1_byte (abfd, info_ptr);
info_ptr += 1;
break;
case DW_FORM_ref2:
- DW_UNSND (attr) = read_2_bytes (abfd, info_ptr);
+ attr->u.val = read_2_bytes (abfd, info_ptr);
info_ptr += 2;
break;
case DW_FORM_ref4:
- DW_UNSND (attr) = read_4_bytes (abfd, info_ptr);
+ attr->u.val = read_4_bytes (abfd, info_ptr);
info_ptr += 4;
break;
case DW_FORM_ref8:
- DW_UNSND (attr) = read_8_bytes (abfd, info_ptr);
+ attr->u.val = read_8_bytes (abfd, info_ptr);
info_ptr += 8;
break;
case DW_FORM_ref_udata:
- DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
+ attr->u.val = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
break;
case DW_FORM_indirect:
@@ -1168,7 +1159,7 @@ decode_line_info (unit, stash)
{
/* State machine registers. */
bfd_vma address = 0;
- char * filename = concat_filename (table, 1);
+ char * filename = table->num_files ? concat_filename (table, 1) : NULL;
unsigned int line = 1;
unsigned int column = 0;
int is_stmt = lh.default_is_stmt;
@@ -1493,23 +1484,23 @@ scan_unit_for_functions (unit)
{
case DW_AT_name:
- name = DW_STRING (&attr);
+ name = attr.u.str;
/* Prefer DW_AT_MIPS_linkage_name over DW_AT_name. */
if (func->name == NULL)
- func->name = DW_STRING (&attr);
+ func->name = attr.u.str;
break;
case DW_AT_MIPS_linkage_name:
- func->name = DW_STRING (&attr);
+ func->name = attr.u.str;
break;
case DW_AT_low_pc:
- func->low = DW_ADDR (&attr);
+ func->low = attr.u.val;
break;
case DW_AT_high_pc:
- func->high = DW_ADDR (&attr);
+ func->high = attr.u.val;
break;
default:
@@ -1521,7 +1512,7 @@ scan_unit_for_functions (unit)
switch (attr.name)
{
case DW_AT_name:
- name = DW_STRING (&attr);
+ name = attr.u.str;
break;
default:
@@ -1642,24 +1633,24 @@ parse_comp_unit (abfd, stash, unit_length, offset_size)
{
case DW_AT_stmt_list:
unit->stmtlist = 1;
- unit->line_offset = DW_UNSND (&attr);
+ unit->line_offset = attr.u.val;
break;
case DW_AT_name:
- unit->name = DW_STRING (&attr);
+ unit->name = attr.u.str;
break;
case DW_AT_low_pc:
- unit->arange.low = DW_ADDR (&attr);
+ unit->arange.low = attr.u.val;
break;
case DW_AT_high_pc:
- unit->arange.high = DW_ADDR (&attr);
+ unit->arange.high = attr.u.val;
break;
case DW_AT_comp_dir:
{
- char* comp_dir = DW_STRING (&attr);
+ char* comp_dir = attr.u.str;
if (comp_dir)
{
/* Irix 6.2 native cc prepends <machine>.: to the compilation
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index 021c1fe..b45f168 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -100,9 +100,9 @@ static asection bfd_debug_section =
/* target_index, used_by_bfd, constructor_chain, owner, */
0, NULL, NULL, NULL,
/* symbol, */
- (struct symbol_cache_entry *) NULL,
+ (struct bfd_symbol *) NULL,
/* symbol_ptr_ptr, */
- (struct symbol_cache_entry **) NULL,
+ (struct bfd_symbol **) NULL,
/* link_order_head, link_order_tail */
NULL, NULL
};
@@ -1062,7 +1062,7 @@ _bfd_ecoff_get_symtab_upper_bound (abfd)
/* Get the canonical symbols. */
long
-_bfd_ecoff_get_symtab (abfd, alocation)
+_bfd_ecoff_canonicalize_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
@@ -2262,7 +2262,7 @@ bfd_boolean
_bfd_ecoff_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
diff --git a/bfd/efi-app-ia32.c b/bfd/efi-app-ia32.c
index 0315221..92a17ef 100644
--- a/bfd/efi-app-ia32.c
+++ b/bfd/efi-app-ia32.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel IA-32 EFI application files.
- Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index abbe377..d5965d3 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -309,14 +309,6 @@ struct eh_frame_hdr_info
bfd_boolean table;
};
-/* Cached start, size and alignment of PT_TLS segment. */
-struct elf_link_tls_segment
-{
- bfd_vma start;
- bfd_size_type size;
- unsigned int align;
-};
-
/* ELF linker hash table. */
struct elf_link_hash_table
@@ -377,8 +369,9 @@ struct elf_link_hash_table
objects included in the link. */
struct bfd_link_needed_list *runpath;
- /* Cached start, size and alignment of PT_TLS segment. */
- struct elf_link_tls_segment *tls_segment;
+ /* Cached first output tls section and size of PT_TLS segment. */
+ asection *tls_sec;
+ bfd_size_type tls_size;
/* A linked list of BFD's loaded in the link. */
struct elf_link_loaded_list *loaded;
@@ -511,11 +504,16 @@ typedef enum {
struct bfd_elf_special_section
{
const char *prefix;
- size_t prefix_length;
- const char *suffix;
- size_t suffix_length;
+ int prefix_length;
+ /* 0 means name must match PREFIX exactly.
+ -1 means name must start with PREFIX followed by an arbitrary string.
+ -2 means name must match PREFIX exactly or consist of PREFIX followed
+ by a dot then anything.
+ > 0 means name must start with the first PREFIX_LENGTH chars of
+ PREFIX and finish with the last SUFFIX_LENGTH chars of PREFIX. */
+ int suffix_length;
int type;
- int attributes;
+ int attr;
};
struct elf_backend_data
@@ -808,6 +806,11 @@ struct elf_backend_data
void (*elf_backend_hide_symbol)
(struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean);
+ /* Merge the backend specific symbol attribute. */
+ void (*elf_backend_merge_symbol_attribute)
+ (struct elf_link_hash_entry *, const Elf_Internal_Sym *, bfd_boolean,
+ bfd_boolean);
+
/* Emit relocations. Overrides default routine for emitting relocs,
except during a relocatable link, or if all relocs are being emitted. */
bfd_boolean (*elf_backend_emit_relocs)
@@ -884,10 +887,9 @@ struct elf_backend_data
.got section */
bfd_vma got_symbol_offset;
- /* The size in bytes of the headers for the GOT and PLT. This includes
- the so-called reserved entries on some systems. */
+ /* The size in bytes of the header for the GOT. This includes the
+ so-called reserved entries on some systems. */
bfd_vma got_header_size;
- bfd_vma plt_header_size;
/* This is TRUE if the linker should act like collect and gather
global constructors and destructors by name. This is TRUE for
@@ -1003,7 +1005,7 @@ struct bfd_elf_section_data
const char *name;
/* Group signature sym, if this is the SHT_GROUP section. */
- struct symbol_cache_entry *id;
+ struct bfd_symbol *id;
} group;
/* A linked list of sections in the group. Circular when used by
@@ -1293,7 +1295,7 @@ extern void _bfd_elf_fprintf_vma
extern enum elf_reloc_type_class _bfd_elf_reloc_type_class
(const Elf_Internal_Rela *);
extern bfd_vma _bfd_elf_rela_local_sym
- (bfd *, Elf_Internal_Sym *, asection *, Elf_Internal_Rela *);
+ (bfd *, Elf_Internal_Sym *, asection **, Elf_Internal_Rela *);
extern bfd_vma _bfd_elf_rel_local_sym
(bfd *, Elf_Internal_Sym *, asection **, bfd_vma);
extern bfd_vma _bfd_elf_section_offset
@@ -1332,7 +1334,7 @@ extern bfd_boolean _bfd_elf_slurp_version_tables
extern bfd_boolean _bfd_elf_merge_sections
(bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_elf_discard_group
- (bfd *, struct sec *);
+ (bfd *, struct bfd_section *);
extern void bfd_elf_set_group_contents
(bfd *, asection *, void *);
extern void _bfd_elf_link_just_syms
@@ -1346,10 +1348,10 @@ extern bfd_boolean _bfd_elf_write_object_contents
extern bfd_boolean _bfd_elf_write_corefile_contents
(bfd *);
extern bfd_boolean _bfd_elf_set_section_contents
- (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
+ (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
extern long _bfd_elf_get_symtab_upper_bound
(bfd *);
-extern long _bfd_elf_get_symtab
+extern long _bfd_elf_canonicalize_symtab
(bfd *, asymbol **);
extern long _bfd_elf_get_dynamic_symtab_upper_bound
(bfd *);
@@ -1384,8 +1386,8 @@ extern bfd_boolean _bfd_elf_new_section_hook
(bfd *, asection *);
extern bfd_boolean _bfd_elf_init_reloc_shdr
(bfd *, Elf_Internal_Shdr *, asection *, bfd_boolean);
-extern bfd_boolean _bfd_elf_get_sec_type_attr
- (bfd *, const char *, int *, int *);
+extern const struct bfd_elf_special_section *_bfd_elf_get_sec_type_attr
+ (bfd *, const char *);
/* If the target doesn't have reloc handling written yet: */
extern void _bfd_elf_no_info_to_howto
@@ -1624,7 +1626,7 @@ extern int elf_link_record_local_dynamic_symbol
extern bfd_boolean _bfd_elf_close_and_cleanup
(bfd *);
extern bfd_reloc_status_type _bfd_elf_rel_vtable_reloc_fn
- (bfd *, arelent *, struct symbol_cache_entry *, void *,
+ (bfd *, arelent *, struct bfd_symbol *, void *,
asection *, bfd *, char **);
extern bfd_boolean _bfd_elf32_gc_sections
diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c
index c71129e..28e0b55 100644
--- a/bfd/elf-eh-frame.c
+++ b/bfd/elf-eh-frame.c
@@ -372,6 +372,9 @@ _bfd_elf_discard_section_eh_frame
all FDEs. Also, it can be removed if we have removed
all FDEs using it. */
if ((!info->relocatable
+ && hdr_info->last_cie_sec
+ && (sec->output_section
+ == hdr_info->last_cie_sec->output_section)
&& cie_compare (&cie, &hdr_info->last_cie) == 0)
|| cie_usage_count == 0)
{
@@ -1026,6 +1029,42 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
and 3xDW_CFA_nop as pad */
p += 16;
}
+ else
+ {
+ unsigned int alignment = 1 << sec->alignment_power;
+ unsigned int pad = sec->_cooked_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))
+ {
+ /* Find the last CIE/FDE. */
+ for (i = sec_info->count - 1; i > 0; i--)
+ if (! sec_info->entry[i].removed)
+ break;
+
+ /* The size of the last CIE/FDE must be at least 4. */
+ if (sec_info->entry[i].removed
+ || sec_info->entry[i].size < 4)
+ abort ();
+
+ pad = alignment - pad;
+
+ buf = contents + sec_info->entry[i].new_offset;
+
+ /* Update length. */
+ sec_info->entry[i].size += pad;
+ bfd_put_32 (abfd, sec_info->entry[i].size - 4, buf);
+
+ /* Pad it with DW_CFA_nop */
+ memset (p, 0, pad);
+ p += pad;
+
+ sec->_cooked_size += pad;
+ }
+ }
BFD_ASSERT ((bfd_size_type) (p - contents) == sec->_cooked_size);
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index bdd7a74..0f15b0d 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -1346,7 +1346,7 @@ elf_hppa_relocate_section (bfd *output_bfd,
/* This is a local symbol. */
sym = local_syms + r_symndx;
sym_sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sym_sec, rel);
/* If this symbol has an entry in the PA64 dynamic hash
table, then get it. */
diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c
index 09d7d99..7373dc0 100644
--- a/bfd/elf-m10200.c
+++ b/bfd/elf-m10200.c
@@ -373,7 +373,7 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else
{
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index dc25c38..685ac9b 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -561,6 +561,7 @@ _bfd_mn10300_elf_create_got_section (abfd, info)
flagword flags;
flagword pltflags;
asection * s;
+ struct bfd_link_hash_entry * bh;
struct elf_link_hash_entry * h;
const struct elf_backend_data * bed = get_elf_backend_data (abfd);
int ptralign;
@@ -604,13 +605,13 @@ _bfd_mn10300_elf_create_got_section (abfd, info)
{
/* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the
.plt section. */
- struct elf_link_hash_entry *h = NULL;
+ bh = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s,
(bfd_vma) 0, (const char *) NULL, FALSE,
- get_elf_backend_data (abfd)->collect,
- (struct bfd_link_hash_entry **) &h)))
+ get_elf_backend_data (abfd)->collect, &bh)))
return FALSE;
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -638,12 +639,13 @@ _bfd_mn10300_elf_create_got_section (abfd, info)
(or .got.plt) section. We don't do this in the linker script
because we don't want to define the symbol if we are not creating
a global offset table. */
- h = NULL;
+ bh = NULL;
if (!(_bfd_generic_link_add_one_symbol
(info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
bed->got_symbol_offset, (const char *) NULL, FALSE,
- bed->collect, (struct bfd_link_hash_entry **) &h)))
+ bed->collect, &bh)))
return FALSE;
+ h = (struct elf_link_hash_entry *) bh;
h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
h->type = STT_OBJECT;
@@ -1574,7 +1576,7 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else
{
@@ -4349,7 +4351,7 @@ _bfd_mn10300_elf_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -4874,6 +4876,5 @@ _bfd_mn10300_elf_finish_dynamic_sections (output_bfd, info)
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 12
-#define elf_backend_plt_header_size PLT0_ENTRY_SIZE
#include "elf32-target.h"
diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c
index 764ab54..673b9d7 100644
--- a/bfd/elf-strtab.c
+++ b/bfd/elf-strtab.c
@@ -1,5 +1,5 @@
/* ELF strtab with GC and suffix merging support.
- Copyright 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -30,15 +30,14 @@
struct elf_strtab_hash_entry
{
struct bfd_hash_entry root;
- /* Length of this entry. */
- unsigned int len;
+ /* Length of this entry. This includes the zero terminator. */
+ int len;
unsigned int refcount;
union {
/* Index within the merged section. */
bfd_size_type index;
- /* Entry this is a suffix of (if len is 0). */
+ /* Entry this is a suffix of (if len < 0). */
struct elf_strtab_hash_entry *suffix;
- struct elf_strtab_hash_entry *next;
} u;
};
@@ -158,6 +157,8 @@ _bfd_elf_strtab_add (struct elf_strtab_hash *tab,
if (entry->len == 0)
{
entry->len = strlen (str) + 1;
+ /* 2G strings lose. */
+ BFD_ASSERT (entry->len > 0);
if (tab->size == tab->alloced)
{
bfd_size_type amt = sizeof (struct elf_strtab_hash_entry *);
@@ -235,14 +236,14 @@ _bfd_elf_strtab_emit (register bfd *abfd, struct elf_strtab_hash *tab)
for (i = 1; i < tab->size; ++i)
{
register const char *str;
- register size_t len;
+ register unsigned int len;
- str = tab->array[i]->root.string;
- len = tab->array[i]->len;
BFD_ASSERT (tab->array[i]->refcount == 0);
- if (len == 0)
+ len = tab->array[i]->len;
+ if ((int) len < 0)
continue;
+ str = tab->array[i]->root.string;
if (bfd_bwrite (str, len, abfd) != len)
return FALSE;
@@ -253,40 +254,41 @@ _bfd_elf_strtab_emit (register bfd *abfd, struct elf_strtab_hash *tab)
return TRUE;
}
-/* Compare two elf_strtab_hash_entry structures. This is called via qsort. */
+/* Compare two elf_strtab_hash_entry structures. Called via qsort. */
static int
-cmplengthentry (const void *a, const void *b)
+strrevcmp (const void *a, const void *b)
{
struct elf_strtab_hash_entry *A = *(struct elf_strtab_hash_entry **) a;
struct elf_strtab_hash_entry *B = *(struct elf_strtab_hash_entry **) b;
+ unsigned int lenA = A->len;
+ unsigned int lenB = B->len;
+ const unsigned char *s = A->root.string + lenA - 1;
+ const unsigned char *t = B->root.string + lenB - 1;
+ int l = lenA < lenB ? lenA : lenB;
- if (A->len < B->len)
- return 1;
- else if (A->len > B->len)
- return -1;
-
- return memcmp (A->root.string, B->root.string, A->len);
+ while (l)
+ {
+ if (*s != *t)
+ return (int) *s - (int) *t;
+ s--;
+ t--;
+ l--;
+ }
+ return lenA - lenB;
}
-static int
-last4_eq (const void *a, const void *b)
+static inline int
+is_suffix (const struct elf_strtab_hash_entry *A,
+ const struct elf_strtab_hash_entry *B)
{
- const struct elf_strtab_hash_entry *A = a;
- const struct elf_strtab_hash_entry *B = b;
-
- if (memcmp (A->root.string + A->len - 5, B->root.string + B->len - 5, 4)
- != 0)
- /* This was a hashtable collision. */
- return 0;
-
if (A->len <= B->len)
/* B cannot be a suffix of A unless A is equal to B, which is guaranteed
not to be equal by the hash table. */
return 0;
return memcmp (A->root.string + (A->len - B->len),
- B->root.string, B->len - 5) == 0;
+ B->root.string, B->len - 1) == 0;
}
/* This function assigns final string table offsets for used strings,
@@ -295,10 +297,8 @@ last4_eq (const void *a, const void *b)
void
_bfd_elf_strtab_finalize (struct elf_strtab_hash *tab)
{
- struct elf_strtab_hash_entry **array, **a, **end, *e;
- htab_t last4tab = NULL;
+ struct elf_strtab_hash_entry **array, **a, *e;
bfd_size_type size, amt;
- struct elf_strtab_hash_entry *last[256], **last_ptr[256];
/* GCC 2.91.66 (egcs-1.1.2) on i386 miscompiles this function when i is
a 64-bit bfd_size_type: a 64-bit target or --enable-64-bit-bfd.
@@ -306,105 +306,71 @@ _bfd_elf_strtab_finalize (struct elf_strtab_hash *tab)
cycles. */
size_t i;
- /* Now sort the strings by length, longest first. */
- array = NULL;
+ /* Sort the strings by suffix and length. */
amt = tab->size * sizeof (struct elf_strtab_hash_entry *);
array = bfd_malloc (amt);
if (array == NULL)
goto alloc_failure;
- memset (last, 0, sizeof (last));
- for (i = 0; i < 256; ++i)
- last_ptr[i] = &last[i];
for (i = 1, a = array; i < tab->size; ++i)
- if (tab->array[i]->refcount)
- *a++ = tab->array[i];
- else
- tab->array[i]->len = 0;
+ {
+ e = tab->array[i];
+ if (e->refcount)
+ {
+ *a++ = e;
+ /* Adjust the length to not include the zero terminator. */
+ e->len -= 1;
+ }
+ else
+ e->len = 0;
+ }
size = a - array;
+ if (size != 0)
+ {
+ qsort (array, size, sizeof (struct elf_strtab_hash_entry *), strrevcmp);
- qsort (array, size, sizeof (struct elf_strtab_hash_entry *), cmplengthentry);
+ /* Loop over the sorted array and merge suffixes. Start from the
+ end because we want eg.
- last4tab = htab_create_alloc (size * 4, NULL, last4_eq, NULL, calloc, free);
- if (last4tab == NULL)
- goto alloc_failure;
+ s1 -> "d"
+ s2 -> "bcd"
+ s3 -> "abcd"
- /* Now insert the strings into hash tables (strings with last 4 characters
- and strings with last character equal), look for longer strings which
- we're suffix of. */
- for (a = array, end = array + size; a < end; a++)
- {
- register hashval_t hash;
- unsigned int c;
- unsigned int j;
- const unsigned char *s;
- void **p;
-
- e = *a;
- if (e->len > 4)
- {
- s = e->root.string + e->len - 1;
- hash = 0;
- for (j = 0; j < 4; j++)
- {
- c = *--s;
- hash += c + (c << 17);
- hash ^= hash >> 2;
- }
- p = htab_find_slot_with_hash (last4tab, e, hash, INSERT);
- if (p == NULL)
- goto alloc_failure;
- if (*p)
- {
- struct elf_strtab_hash_entry *ent;
+ to end up as
- ent = *p;
- e->u.suffix = ent;
- e->len = 0;
- continue;
- }
- else
- *p = e;
- }
- else
- {
- struct elf_strtab_hash_entry *tem;
+ s3 -> "abcd"
+ s2 _____^
+ s1 _______^
- c = e->root.string[e->len - 2] & 0xff;
+ ie. we don't want s1 pointing into the old s2. */
+ e = *--a;
+ e->len += 1;
+ while (--a >= array)
+ {
+ struct elf_strtab_hash_entry *cmp = *a;
- for (tem = last[c]; tem; tem = tem->u.next)
- if (tem->len > e->len
- && memcmp (tem->root.string + (tem->len - e->len),
- e->root.string, e->len - 1) == 0)
- break;
- if (tem)
+ cmp->len += 1;
+ if (is_suffix (e, cmp))
{
- e->u.suffix = tem;
- e->len = 0;
- continue;
+ cmp->u.suffix = e;
+ cmp->len = -cmp->len;
}
+ else
+ e = cmp;
}
-
- c = e->root.string[e->len - 2] & 0xff;
- /* Put longest strings first. */
- *last_ptr[c] = e;
- last_ptr[c] = &e->u.next;
- e->u.next = NULL;
}
alloc_failure:
if (array)
free (array);
- if (last4tab)
- htab_delete (last4tab);
- /* Now assign positions to the strings we want to keep. */
+ /* Assign positions to the strings we want to keep. */
size = 1;
for (i = 1; i < tab->size; ++i)
{
e = tab->array[i];
- if (e->refcount && e->len)
+ if (e->refcount && e->len > 0)
{
e->u.index = size;
size += e->len;
@@ -413,12 +379,11 @@ alloc_failure:
tab->sec_size = size;
- /* And now adjust the rest. */
+ /* Adjust the rest. */
for (i = 1; i < tab->size; ++i)
{
e = tab->array[i];
- if (e->refcount && ! e->len)
- e->u.index = e->u.suffix->u.index
- + (e->u.suffix->len - strlen (e->root.string) - 1);
+ if (e->refcount && e->len < 0)
+ e->u.index = e->u.suffix->u.index + (e->u.suffix->len + e->len);
}
}
diff --git a/bfd/elf.c b/bfd/elf.c
index 3868cff..e008cb7 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1444,7 +1444,8 @@ _bfd_elf_link_hash_table_init
memset (&table->eh_info, 0, sizeof (table->eh_info));
table->dynlocal = NULL;
table->runpath = NULL;
- table->tls_segment = NULL;
+ table->tls_sec = NULL;
+ table->tls_size = 0;
table->loaded = NULL;
ret = _bfd_link_hash_table_init (&table->root, abfd, newfunc);
@@ -2019,82 +2020,44 @@ bfd_section_from_elf_index (bfd *abfd, unsigned int index)
static struct bfd_elf_special_section const special_sections[] =
{
- { ".bss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".comment", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".data", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".data1", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".debug", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".fini", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".init", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".line", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".rodata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { ".rodata1", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { ".tbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
- { ".tdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
- { ".text", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".init_array", 0, NULL, 0,
- SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE },
- { ".fini_array", 0, NULL, 0,
- SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE },
- { ".preinit_array", 0, NULL, 0,
- SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE },
- { ".debug_line", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".debug_info", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".debug_abbrev", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".debug_aranges", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".dynamic", 0, NULL, 0,
- SHT_DYNAMIC, SHF_ALLOC },
- { ".dynstr", 0, NULL, 0,
- SHT_STRTAB, SHF_ALLOC },
- { ".dynsym", 0, NULL, 0,
- SHT_DYNSYM, SHF_ALLOC },
- { ".got", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".hash", 0, NULL, 0,
- SHT_HASH, SHF_ALLOC },
- { ".interp", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { ".plt", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".shstrtab", 0, NULL, 0,
- SHT_STRTAB, 0 },
- { ".strtab", 0, NULL, 0,
- SHT_STRTAB, 0 },
- { ".symtab", 0, NULL, 0,
- SHT_SYMTAB, 0 },
- { ".gnu.version", 0, NULL, 0,
- SHT_GNU_versym, 0 },
- { ".gnu.version_d", 0, NULL, 0,
- SHT_GNU_verdef, 0 },
- { ".gnu.version_r", 0, NULL, 0,
- SHT_GNU_verneed, 0 },
- { ".note", 5, NULL, 0,
- SHT_NOTE, 0 },
- { ".rela", 5, NULL, 0,
- SHT_RELA, 0 },
- { ".rel", 4, NULL, 0,
- SHT_REL, 0 },
- { ".stab", 5, "str", 3,
- SHT_STRTAB, 0 },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".bss", 4, -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 },
+ { ".debug", 6, 0, SHT_PROGBITS, 0 },
+ { ".fini", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { ".init", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { ".line", 5, 0, SHT_PROGBITS, 0 },
+ { ".rodata", 7, -2, SHT_PROGBITS, SHF_ALLOC },
+ { ".rodata1", 8, 0, SHT_PROGBITS, SHF_ALLOC },
+ { ".tbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
+ { ".tdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
+ { ".text", 5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { ".init_array", 11, 0, SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE },
+ { ".fini_array", 11, 0, SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE },
+ { ".preinit_array", 14, 0, SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE },
+ { ".debug_line", 11, 0, SHT_PROGBITS, 0 },
+ { ".debug_info", 11, 0, SHT_PROGBITS, 0 },
+ { ".debug_abbrev", 13, 0, SHT_PROGBITS, 0 },
+ { ".debug_aranges", 14, 0, SHT_PROGBITS, 0 },
+ { ".dynamic", 8, 0, SHT_DYNAMIC, SHF_ALLOC },
+ { ".dynstr", 7, 0, SHT_STRTAB, SHF_ALLOC },
+ { ".dynsym", 7, 0, SHT_DYNSYM, SHF_ALLOC },
+ { ".got", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".hash", 5, 0, SHT_HASH, SHF_ALLOC },
+ { ".interp", 7, 0, SHT_PROGBITS, 0 },
+ { ".plt", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { ".shstrtab", 9, 0, SHT_STRTAB, 0 },
+ { ".strtab", 7, 0, SHT_STRTAB, 0 },
+ { ".symtab", 7, 0, SHT_SYMTAB, 0 },
+ { ".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", 5, -1, SHT_NOTE, 0 },
+ { ".rela", 5, -1, SHT_RELA, 0 },
+ { ".rel", 4, -1, SHT_REL, 0 },
+ { ".stabstr", 5, 3, SHT_STRTAB, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section *
@@ -2103,32 +2066,55 @@ get_special_section (const char *name,
unsigned int rela)
{
int i;
+ int len = strlen (name);
for (i = 0; special_sections[i].prefix != NULL; i++)
- if (((special_sections[i].prefix_length
- && strncmp (name, special_sections[i].prefix,
- special_sections[i].prefix_length) == 0
- && (! special_sections[i].suffix_length
- || strcmp ((name + strlen (name)
- - special_sections[i].suffix_length),
- special_sections[i].suffix) == 0))
- || strcmp (name, special_sections[i].prefix) == 0)
- && (rela || special_sections[i].type != SHT_RELA))
+ {
+ int suffix_len;
+ int prefix_len = special_sections[i].prefix_length;
+
+ if (len < prefix_len)
+ continue;
+ if (memcmp (name, special_sections[i].prefix, prefix_len) != 0)
+ continue;
+
+ suffix_len = special_sections[i].suffix_length;
+ if (suffix_len <= 0)
+ {
+ if (name[prefix_len] != 0)
+ {
+ if (suffix_len == 0)
+ continue;
+ if (name[prefix_len] != '.'
+ && (suffix_len == -2
+ || (rela && special_sections[i].type == SHT_REL)))
+ continue;
+ }
+ }
+ else
+ {
+ if (len < prefix_len + suffix_len)
+ continue;
+ if (memcmp (name + len - suffix_len,
+ special_sections[i].prefix + prefix_len,
+ suffix_len) != 0)
+ continue;
+ }
return &special_sections[i];
+ }
return NULL;
}
-bfd_boolean
-_bfd_elf_get_sec_type_attr (bfd *abfd, const char *name, int *type, int *attr)
+const struct bfd_elf_special_section *
+_bfd_elf_get_sec_type_attr (bfd *abfd, const char *name)
{
- bfd_boolean found = FALSE;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ const struct bfd_elf_special_section *ssect = NULL;
/* See if this is one of the special sections. */
if (name)
{
- const struct bfd_elf_special_section *ssect = NULL;
unsigned int rela = bed->default_use_rela_p;
if (bed->special_sections)
@@ -2136,23 +2122,16 @@ _bfd_elf_get_sec_type_attr (bfd *abfd, const char *name, int *type, int *attr)
if (! ssect)
ssect = get_special_section (name, special_sections, rela);
-
- if (ssect)
- {
- *type = ssect->type;
- *attr = ssect->attributes;
- found = TRUE;
- }
}
- return found;
+ return ssect;
}
bfd_boolean
_bfd_elf_new_section_hook (bfd *abfd, asection *sec)
{
struct bfd_elf_section_data *sdata;
- int type, attr;
+ const struct bfd_elf_special_section *ssect;
sdata = (struct bfd_elf_section_data *) sec->used_by_bfd;
if (sdata == NULL)
@@ -2164,11 +2143,11 @@ _bfd_elf_new_section_hook (bfd *abfd, asection *sec)
}
elf_section_type (sec) = SHT_NULL;
- if (sec->name && _bfd_elf_get_sec_type_attr (abfd, sec->name,
- &type, &attr))
+ ssect = _bfd_elf_get_sec_type_attr (abfd, sec->name);
+ if (ssect != NULL)
{
- elf_section_type (sec) = type;
- elf_section_flags (sec) = attr;
+ elf_section_type (sec) = ssect->type;
+ elf_section_flags (sec) = ssect->attr;
}
/* Indicate whether or not this section should use RELA relocations. */
@@ -2228,6 +2207,7 @@ _bfd_elf_make_section_from_phdr (bfd *abfd,
newsect->_raw_size = hdr->p_filesz;
newsect->filepos = hdr->p_offset;
newsect->flags |= SEC_HAS_CONTENTS;
+ newsect->alignment_power = bfd_log2 (hdr->p_align);
if (hdr->p_type == PT_LOAD)
{
newsect->flags |= SEC_ALLOC;
@@ -2430,7 +2410,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
case SHT_HASH:
this_hdr->sh_entsize = bed->s->sizeof_hash_entry;
break;
-
+
case SHT_DYNSYM:
this_hdr->sh_entsize = bed->s->sizeof_sym;
break;
@@ -4453,7 +4433,7 @@ _bfd_elf_write_corefile_contents (bfd *abfd)
/* Given a section, search the header to find them. */
int
-_bfd_elf_section_from_bfd_section (bfd *abfd, struct sec *asect)
+_bfd_elf_section_from_bfd_section (bfd *abfd, struct bfd_section *asect)
{
const struct elf_backend_data *bed;
int index;
@@ -5613,7 +5593,7 @@ _bfd_elf_canonicalize_reloc (bfd *abfd,
}
long
-_bfd_elf_get_symtab (bfd *abfd, asymbol **allocation)
+_bfd_elf_canonicalize_symtab (bfd *abfd, asymbol **allocation)
{
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
long symcount = bed->s->slurp_symbol_table (abfd, allocation, FALSE);
@@ -6116,7 +6096,7 @@ _bfd_elf_sizeof_headers (bfd *abfd, bfd_boolean reloc)
bfd_boolean
_bfd_elf_set_section_contents (bfd *abfd,
sec_ptr section,
- void *location,
+ const void *location,
file_ptr offset,
bfd_size_type count)
{
@@ -6260,7 +6240,7 @@ _bfd_elf_close_and_cleanup (bfd *abfd)
bfd_reloc_status_type
_bfd_elf_rel_vtable_reloc_fn
(bfd *abfd ATTRIBUTE_UNUSED, arelent *re ATTRIBUTE_UNUSED,
- struct symbol_cache_entry *symbol ATTRIBUTE_UNUSED,
+ struct bfd_symbol *symbol ATTRIBUTE_UNUSED,
void *data ATTRIBUTE_UNUSED, asection *is ATTRIBUTE_UNUSED,
bfd *obfd ATTRIBUTE_UNUSED, char **errmsg ATTRIBUTE_UNUSED)
{
@@ -6336,7 +6316,7 @@ _bfd_elfcore_make_pseudosection (bfd *abfd,
return FALSE;
memcpy (threaded_name, buf, len);
- sect = bfd_make_section (abfd, threaded_name);
+ sect = bfd_make_section_anyway (abfd, threaded_name);
if (sect == NULL)
return FALSE;
sect->_raw_size = size;
@@ -6620,7 +6600,7 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
memcpy (name, buf, len);
- sect = bfd_make_section (abfd, name);
+ sect = bfd_make_section_anyway (abfd, name);
if (sect == NULL)
return FALSE;
@@ -6650,7 +6630,7 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
memcpy (name, buf, len);
- sect = bfd_make_section (abfd, name);
+ sect = bfd_make_section_anyway (abfd, name);
if (sect == NULL)
return FALSE;
@@ -6706,7 +6686,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
memcpy (name, buf, len);
- sect = bfd_make_section (abfd, name);
+ sect = bfd_make_section_anyway (abfd, name);
if (sect == NULL)
return FALSE;
@@ -6733,7 +6713,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
memcpy (name, buf, len);
- sect = bfd_make_section (abfd, name);
+ sect = bfd_make_section_anyway (abfd, name);
if (sect == NULL)
return FALSE;
@@ -6810,7 +6790,7 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
case NT_AUXV:
{
- asection *sect = bfd_make_section (abfd, ".auxv");
+ asection *sect = bfd_make_section_anyway (abfd, ".auxv");
if (sect == NULL)
return FALSE;
@@ -6962,7 +6942,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, pid_t *tid)
return FALSE;
strcpy (name, buf);
- sect = bfd_make_section (abfd, name);
+ sect = bfd_make_section_anyway (abfd, name);
if (sect == NULL)
return FALSE;
@@ -6989,7 +6969,7 @@ elfcore_grok_nto_gregs (bfd *abfd, Elf_Internal_Note *note, pid_t tid)
return FALSE;
strcpy (name, buf);
- sect = bfd_make_section (abfd, name);
+ sect = bfd_make_section_anyway (abfd, name);
if (sect == NULL)
return FALSE;
@@ -7066,7 +7046,7 @@ elfcore_write_note (bfd *abfd,
pad = -namesz & ((1 << bed->s->log_file_align) - 1);
}
- newspace = sizeof (Elf_External_Note) - 1 + namesz + pad + size;
+ newspace = 12 + namesz + pad + size;
p = realloc (buf, *bufsiz + newspace);
dest = p + *bufsiz;
@@ -7388,9 +7368,10 @@ _bfd_elf_reloc_type_class (const Elf_Internal_Rela *rela ATTRIBUTE_UNUSED)
bfd_vma
_bfd_elf_rela_local_sym (bfd *abfd,
Elf_Internal_Sym *sym,
- asection *sec,
+ asection **psec,
Elf_Internal_Rela *rel)
{
+ asection *sec = *psec;
bfd_vma relocation;
relocation = (sec->output_section->vma
@@ -7400,16 +7381,14 @@ _bfd_elf_rela_local_sym (bfd *abfd,
&& ELF_ST_TYPE (sym->st_info) == STT_SECTION
&& sec->sec_info_type == ELF_INFO_TYPE_MERGE)
{
- asection *msec;
-
- msec = sec;
rel->r_addend =
- _bfd_merged_section_offset (abfd, &msec,
+ _bfd_merged_section_offset (abfd, psec,
elf_section_data (sec)->sec_info,
sym->st_value + rel->r_addend,
- 0)
- - relocation;
- rel->r_addend += msec->output_section->vma + msec->output_offset;
+ 0);
+ sec = *psec;
+ rel->r_addend -= relocation;
+ rel->r_addend += sec->output_section->vma + sec->output_offset;
}
return relocation;
}
diff --git a/bfd/elf32-am33lin.c b/bfd/elf32-am33lin.c
index 4cc2230..32e5663 100644
--- a/bfd/elf32-am33lin.c
+++ b/bfd/elf32-am33lin.c
@@ -1,5 +1,5 @@
/* Matsushita AM33/2.0 support for 32-bit GNU/Linux ELF
- Copyright 2001
+ Copyright 2003
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h
index a28c558..bcc1188 100644
--- a/bfd/elf32-arm.h
+++ b/bfd/elf32-arm.h
@@ -84,6 +84,12 @@ static struct bfd_hash_entry * elf32_arm_link_hash_newfunc
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
@@ -119,6 +125,12 @@ bfd_boolean bfd_elf32_arm_process_before_allocation
section. */
#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#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
@@ -126,23 +138,56 @@ bfd_boolean bfd_elf32_arm_process_before_allocation
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_ENTRY_SIZE / 4] =
+static const bfd_vma elf32_arm_plt0_entry [PLT_HEADER_SIZE / 4] =
+ {
+ 0xe52de004, /* str lr, [sp, #-4]! */
+ 0xe59fe010, /* ldr lr, [pc, #16] */
+ 0xe08fe00e, /* add lr, pc, lr */
+ 0xe5bef008, /* ldr pc, [lr, #8]! */
+ };
+
+/* Subsequent entries in a procedure linkage table look like
+ this. */
+static const bfd_vma elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] =
+ {
+ 0xe28fc600, /* add ip, pc, #NN */
+ 0xe28cca00, /* add ip, ip, #NN */
+ 0xe5bcf000, /* ldr pc, [ip, #NN]! */
+ 0x00000000, /* unused */
+ };
+
+#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] =
{
- 0xe52de004, /* str lr, [sp, #-4]! */
- 0xe59fe010, /* ldr lr, [pc, #16] */
- 0xe08fe00e, /* add lr, pc, lr */
- 0xe5bef008 /* ldr pc, [lr, #8]! */
+ 0xe52de004, /* str lr, [sp, #-4]! */
+ 0xe59fe004, /* ldr lr, [pc, #4] */
+ 0xe08fe00e, /* add lr, pc, lr */
+ 0xe5bef008, /* ldr pc, [lr, #8]! */
+ 0x00000000, /* &GOT[0] - . */
};
/* Subsequent entries in a procedure linkage table look like
this. */
static const bfd_vma elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] =
- {
- 0xe59fc004, /* ldr ip, [pc, #4] */
- 0xe08fc00c, /* add ip, pc, ip */
- 0xe59cf000, /* ldr pc, [ip] */
- 0x00000000 /* offset to symbol in got */
- };
+ {
+ 0xe28fc600, /* add ip, pc, #0xNN00000 */
+ 0xe28cca00, /* add ip, ip, #0xNN000 */
+ 0xe5bcf000, /* ldr pc, [ip, #0xNNN]! */
+ };
+
+#endif
/* The ARM linker needs to keep track of the number of relocs that it
decides to copy in check_relocs for each symbol. This is so that
@@ -152,14 +197,16 @@ static const bfd_vma elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] =
/* This structure keeps track of the number of PC relative relocs we
have copied for a given symbol. */
-struct elf32_arm_pcrel_relocs_copied
+struct elf32_arm_relocs_copied
{
/* Next section. */
- struct elf32_arm_pcrel_relocs_copied * next;
+ struct elf32_arm_relocs_copied * next;
/* A section in dynobj. */
asection * section;
/* Number of relocs copied in this section. */
bfd_size_type count;
+ /* Number of relocs copied in this section. */
+ bfd_size_type pc_count;
};
/* Arm ELF linker hash entry. */
@@ -168,13 +215,9 @@ struct elf32_arm_link_hash_entry
struct elf_link_hash_entry root;
/* Number of PC relative relocs copied for this symbol. */
- struct elf32_arm_pcrel_relocs_copied * pcrel_relocs_copied;
+ struct elf32_arm_relocs_copied * relocs_copied;
};
-/* Declare this now that the above structures are defined. */
-static bfd_boolean elf32_arm_discard_copies
- PARAMS ((struct elf32_arm_link_hash_entry *, PTR));
-
/* Traverse an arm ELF linker hash table. */
#define elf32_arm_link_hash_traverse(table, func, info) \
(elf_link_hash_traverse \
@@ -204,6 +247,18 @@ struct elf32_arm_link_hash_table
/* A boolean indicating whether knowledge of the ARM's pipeline
length should be applied by the linker. */
int no_pipeline_knowledge;
+
+ /* Short-cuts to get to dynamic linker sections. */
+ asection *sgot;
+ asection *sgotplt;
+ asection *srelgot;
+ asection *splt;
+ asection *srelplt;
+ asection *sdynbss;
+ asection *srelbss;
+
+ /* Small local sym to section mapping cache. */
+ struct sym_sec_cache sym_sec;
};
/* Create an entry in an ARM ELF linker hash table. */
@@ -231,11 +286,121 @@ elf32_arm_link_hash_newfunc (entry, table, string)
_bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret,
table, string));
if (ret != (struct elf32_arm_link_hash_entry *) NULL)
- ret->pcrel_relocs_copied = NULL;
+ ret->relocs_copied = NULL;
return (struct bfd_hash_entry *) ret;
}
+/* Create .got, .gotplt, and .rel.got sections in DYNOBJ, and set up
+ shortcuts to them in our hash table. */
+
+static bfd_boolean
+create_got_section (dynobj, info)
+ bfd *dynobj;
+ struct bfd_link_info *info;
+{
+ struct elf32_arm_link_hash_table *htab;
+
+ 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)
+ abort ();
+
+ htab->srelgot = bfd_make_section (dynobj, ".rel.got");
+ if (htab->srelgot == NULL
+ || ! bfd_set_section_flags (dynobj, htab->srelgot,
+ (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED
+ | SEC_READONLY))
+ || ! bfd_set_section_alignment (dynobj, htab->srelgot, 2))
+ return FALSE;
+ return TRUE;
+}
+
+/* Create .plt, .rel.plt, .got, .got.plt, .rel.got, .dynbss, and
+ .rel.bss sections in DYNOBJ, and set up shortcuts to them in our
+ hash table. */
+
+static bfd_boolean
+elf32_arm_create_dynamic_sections (dynobj, info)
+ bfd *dynobj;
+ struct bfd_link_info *info;
+{
+ struct elf32_arm_link_hash_table *htab;
+
+ htab = elf32_arm_hash_table (info);
+ if (!htab->sgot && !create_got_section (dynobj, info))
+ return FALSE;
+
+ if (!_bfd_elf_create_dynamic_sections (dynobj, info))
+ return FALSE;
+
+ htab->splt = bfd_get_section_by_name (dynobj, ".plt");
+ htab->srelplt = bfd_get_section_by_name (dynobj, ".rel.plt");
+ htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
+ if (!info->shared)
+ htab->srelbss = bfd_get_section_by_name (dynobj, ".rel.bss");
+
+ if (!htab->splt || !htab->srelplt || !htab->sdynbss
+ || (!info->shared && !htab->srelbss))
+ abort ();
+
+ return TRUE;
+}
+
+/* Copy the extra info we tack onto an elf_link_hash_entry. */
+
+static void
+elf32_arm_copy_indirect_symbol (const struct elf_backend_data *bed,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
+{
+ struct elf32_arm_link_hash_entry *edir, *eind;
+
+ edir = (struct elf32_arm_link_hash_entry *) dir;
+ eind = (struct elf32_arm_link_hash_entry *) ind;
+
+ if (eind->relocs_copied != NULL)
+ {
+ if (edir->relocs_copied != NULL)
+ {
+ struct elf32_arm_relocs_copied **pp;
+ struct elf32_arm_relocs_copied *p;
+
+ if (ind->root.type == bfd_link_hash_indirect)
+ abort ();
+
+ /* Add reloc counts against the weak sym to the strong sym
+ list. Merge any entries against the same section. */
+ for (pp = &eind->relocs_copied; (p = *pp) != NULL; )
+ {
+ struct elf32_arm_relocs_copied *q;
+
+ for (q = edir->relocs_copied; q != NULL; q = q->next)
+ if (q->section == p->section)
+ {
+ q->pc_count += p->pc_count;
+ q->count += p->count;
+ *pp = p->next;
+ break;
+ }
+ if (q == NULL)
+ pp = &p->next;
+ }
+ *pp = edir->relocs_copied;
+ }
+
+ edir->relocs_copied = eind->relocs_copied;
+ eind->relocs_copied = NULL;
+ }
+
+ _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
+}
+
/* Create an ARM elf linker hash table. */
static struct bfd_link_hash_table *
@@ -256,10 +421,18 @@ elf32_arm_link_hash_table_create (abfd)
return NULL;
}
+ ret->sgot = NULL;
+ ret->sgotplt = NULL;
+ ret->srelgot = NULL;
+ ret->splt = NULL;
+ ret->srelplt = NULL;
+ ret->sdynbss = NULL;
+ ret->srelbss = NULL;
ret->thumb_glue_size = 0;
ret->arm_glue_size = 0;
ret->bfd_of_glue_owner = NULL;
ret->no_pipeline_knowledge = 0;
+ ret->sym_sec.abfd = NULL;
return &ret->root.root;
}
@@ -1134,16 +1307,21 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
#ifndef OLD_ARM_ABI
case R_ARM_XPC25:
#endif
+ /* 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)
+ return bfd_reloc_ok;
+
/* When generating a shared object, these relocations are copied
into the output file to be resolved at run time. */
- if (info->shared
- && r_symndx != 0
- && (r_type != R_ARM_PC24
- || (h != NULL
- && h->dynindx != -1
- && (! info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ if ((info->shared
+ && (input_section->flags & SEC_ALLOC)
+ && (h == NULL
+ || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak)
+ && (r_type != R_ARM_PC24
+ || !SYMBOL_CALLS_LOCAL (info, h))))
{
Elf_Internal_Rela outrel;
bfd_byte *loc;
@@ -1184,30 +1362,19 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
if (skip)
memset (&outrel, 0, sizeof outrel);
- else if (r_type == R_ARM_PC24)
- {
- BFD_ASSERT (h != NULL && h->dynindx != -1);
- if ((input_section->flags & SEC_ALLOC) == 0)
- relocate = TRUE;
- outrel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_PC24);
- }
+ else if (h != NULL
+ && h->dynindx != -1
+ && (r_type == R_ARM_PC24
+ || !info->shared
+ || !info->symbolic
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
else
{
- if (h == NULL
- || ((info->symbolic || h->dynindx == -1)
- && (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) != 0))
- {
- relocate = TRUE;
- outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
- }
- else
- {
- BFD_ASSERT (h->dynindx != -1);
- if ((input_section->flags & SEC_ALLOC) == 0)
- relocate = TRUE;
- outrel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_ABS32);
- }
+ /* This symbol is local, or marked to become local. */
+ relocate = TRUE;
+ outrel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
}
loc = sreloc->contents;
@@ -1617,16 +1784,17 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
if (h != NULL)
{
bfd_vma off;
- bfd_boolean dyn = elf_hash_table (info)->dynamic_sections_created;
+ bfd_boolean dyn;
off = h->got.offset;
BFD_ASSERT (off != (bfd_vma) -1);
+ dyn = globals->root.dynamic_sections_created;
- if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
+ if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info->shared, h)
|| (info->shared
- && (info->symbolic || h->dynindx == -1
- || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)))
+ && SYMBOL_REFERENCES_LOCAL (info, h))
+ || (ELF_ST_VISIBILITY (h->other)
+ && h->root.type == bfd_link_hash_undefweak))
{
/* This is actually a static link, or it is a -Bsymbolic link
and the symbol is defined locally. We must initialize this
@@ -1712,7 +1880,8 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
contents, rel->r_offset, value,
(bfd_vma) 0);
- if (h->plt.offset == (bfd_vma) -1)
+ if (h->plt.offset == (bfd_vma) -1
+ || globals->splt == NULL)
/* We didn't make a PLT entry for this symbol. This
happens when statically linking PIC code, or when
using -Bsymbolic. */
@@ -1958,7 +2127,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_put_32 (input_bfd, value, contents + rel->r_offset);
}
#else
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
#endif
}
else
@@ -1983,9 +2152,10 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
case R_ARM_THM_PC22:
if (info->shared
&& (
- (!info->symbolic && h->dynindx != -1)
+ (!info->symbolic && h->dynindx != -1)
|| (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
)
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
&& ((input_section->flags & SEC_ALLOC) != 0
/* DWARF will emit R_ARM_ABS32 relocations in its
sections against symbols defined externally
@@ -2217,7 +2387,6 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
flagword out_flags;
flagword in_flags;
bfd_boolean flags_compatible = TRUE;
- bfd_boolean null_input_bfd = TRUE;
asection *sec;
/* Check if we have the same endianess. */
@@ -2268,21 +2437,29 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
if (in_flags == out_flags)
return TRUE;
- /* Check to see if the input BFD actually contains any sections.
- If not, its flags may not have been initialised either, but it cannot
- actually cause any incompatibility. */
- for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ /* Check to see if the input BFD actually contains any sections. If
+ not, its flags may not have been initialised either, but it
+ cannot actually cause any incompatibility. Do not short-circuit
+ dynamic objects; their section list may be emptied by
+ elf_link_add_object_symbols. */
+
+ if (!(ibfd->flags & DYNAMIC))
{
- /* Ignore synthetic glue sections. */
- if (strcmp (sec->name, ".glue_7")
- && strcmp (sec->name, ".glue_7t"))
+ bfd_boolean null_input_bfd = TRUE;
+
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
{
- null_input_bfd = FALSE;
- break;
+ /* Ignore synthetic glue sections. */
+ if (strcmp (sec->name, ".glue_7")
+ && strcmp (sec->name, ".glue_7t"))
+ {
+ null_input_bfd = FALSE;
+ break;
+ }
}
+ if (null_input_bfd)
+ return TRUE;
}
- if (null_input_bfd)
- return TRUE;
/* Complain about various flag mismatches. */
if (EF_ARM_EABI_VERSION (in_flags) != EF_ARM_EABI_VERSION (out_flags))
@@ -2351,7 +2528,7 @@ ERROR: %s uses Maverick instructions, whereas %s does not"),
bfd_get_filename (obfd));
else
_bfd_error_handler (_("\
-ERROR: %s uses Maverick instructions, whereas %s does not"),
+ERROR: %s does not use Maverick instructions, whereas %s does"),
bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
@@ -2596,7 +2773,82 @@ elf32_arm_gc_sweep_hook (abfd, info, sec, relocs)
asection *sec ATTRIBUTE_UNUSED;
const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
{
- /* We don't support garbage collection of GOT and PLT relocs yet. */
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ bfd_signed_vma *local_got_refcounts;
+ const Elf_Internal_Rela *rel, *relend;
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+
+ elf_section_data (sec)->local_dynrel = NULL;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+
+ relend = relocs + sec->reloc_count;
+ for (rel = relocs; rel < relend; rel++)
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_ARM_GOT32:
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ if (h->got.refcount > 0)
+ h->got.refcount -= 1;
+ }
+ else if (local_got_refcounts != NULL)
+ {
+ if (local_got_refcounts[r_symndx] > 0)
+ local_got_refcounts[r_symndx] -= 1;
+ }
+ break;
+
+ case R_ARM_ABS32:
+ case R_ARM_REL32:
+ case R_ARM_PC24:
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ struct elf32_arm_link_hash_entry *eh;
+ struct elf32_arm_relocs_copied **pp;
+ struct elf32_arm_relocs_copied *p;
+
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ if (!info->shared && h->plt.refcount > 0)
+ h->plt.refcount -= 1;
+
+ eh = (struct elf32_arm_link_hash_entry *) h;
+
+ for (pp = &eh->relocs_copied; (p = *pp) != NULL; pp = &p->next)
+ if (p->section == sec)
+ {
+ if (ELF32_R_TYPE (rel->r_info) == R_ARM_PC24)
+ p->pc_count -= 1;
+ p->count -= 1;
+ if (p->count == 0)
+ *pp = p->next;
+ break;
+ }
+ }
+ break;
+
+ case R_ARM_PLT32:
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ if (h->plt.refcount > 0)
+ h->plt.refcount -= 1;
+ }
+ break;
+
+ default:
+ break;
+ }
+
return TRUE;
}
@@ -2615,13 +2867,15 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
bfd *dynobj;
- asection *sgot, *srelgot, *sreloc;
+ asection *sreloc;
bfd_vma *local_got_offsets;
+ struct elf32_arm_link_hash_table *htab;
if (info->relocatable)
return TRUE;
- sgot = srelgot = sreloc = NULL;
+ htab = elf32_arm_hash_table (info);
+ sreloc = NULL;
dynobj = elf_hash_table (info)->dynobj;
local_got_offsets = elf_local_got_offsets (abfd);
@@ -2646,126 +2900,82 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
else
h = sym_hashes[r_symndx - symtab_hdr->sh_info];
- /* Some relocs require a global offset table. */
- if (dynobj == NULL)
- {
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_ARM_GOT32:
- case R_ARM_GOTOFF:
- case R_ARM_GOTPC:
- elf_hash_table (info)->dynobj = dynobj = abfd;
- if (! _bfd_elf_create_got_section (dynobj, info))
- return FALSE;
- break;
-
- default:
- break;
- }
- }
-
switch (ELF32_R_TYPE (rel->r_info))
{
- case R_ARM_GOT32:
- /* This symbol requires a global offset table entry. */
- if (sgot == NULL)
- {
- sgot = bfd_get_section_by_name (dynobj, ".got");
- BFD_ASSERT (sgot != NULL);
- }
+ case R_ARM_PLT32:
+ /* This symbol requires a procedure linkage table entry. We
+ actually build the entry in adjust_dynamic_symbol,
+ because this might be a case of linking PIC code which is
+ never referenced by a dynamic object, in which case we
+ don't need to generate a procedure linkage table entry
+ after all. */
- /* Get the got relocation section if necessary. */
- if (srelgot == NULL
- && (h != NULL || info->shared))
- {
- srelgot = bfd_get_section_by_name (dynobj, ".rel.got");
+ /* If this is a local symbol, we resolve it directly without
+ creating a procedure linkage table entry. */
+ if (h == NULL)
+ continue;
- /* If no got relocation section, make one and initialize. */
- if (srelgot == NULL)
- {
- srelgot = bfd_make_section (dynobj, ".rel.got");
- if (srelgot == NULL
- || ! bfd_set_section_flags (dynobj, srelgot,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_LINKER_CREATED
- | SEC_READONLY))
- || ! bfd_set_section_alignment (dynobj, srelgot, 2))
- return FALSE;
- }
- }
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->plt.refcount++;
+ break;
+ case R_ARM_GOT32:
+ /* This symbol requires a global offset table entry. */
if (h != NULL)
{
- if (h->got.offset != (bfd_vma) -1)
- /* We have already allocated space in the .got. */
- break;
-
- h->got.offset = sgot->_raw_size;
-
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
- if (! bfd_elf32_link_record_dynamic_symbol (info, h))
- return FALSE;
-
- srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ h->got.refcount++;
}
else
{
- /* This is a global offset table entry for a local
- symbol. */
- if (local_got_offsets == NULL)
+ bfd_signed_vma *local_got_refcounts;
+
+ /* This is a global offset table entry for a local symbol. */
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+ if (local_got_refcounts == NULL)
{
bfd_size_type size;
- unsigned int i;
size = symtab_hdr->sh_info;
- size *= sizeof (bfd_vma);
- local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size);
- if (local_got_offsets == NULL)
+ size *= (sizeof (bfd_signed_vma) + sizeof(char));
+ local_got_refcounts = ((bfd_signed_vma *)
+ bfd_zalloc (abfd, size));
+ if (local_got_refcounts == NULL)
return FALSE;
- elf_local_got_offsets (abfd) = local_got_offsets;
- for (i = 0; i < symtab_hdr->sh_info; i++)
- local_got_offsets[i] = (bfd_vma) -1;
+ elf_local_got_refcounts (abfd) = local_got_refcounts;
}
-
- if (local_got_offsets[r_symndx] != (bfd_vma) -1)
- /* We have already allocated space in the .got. */
- break;
-
- local_got_offsets[r_symndx] = sgot->_raw_size;
-
- if (info->shared)
- /* If we are generating a shared object, we need to
- output a R_ARM_RELATIVE reloc so that the dynamic
- linker can adjust this GOT entry. */
- srelgot->_raw_size += sizeof (Elf32_External_Rel);
+ local_got_refcounts[r_symndx] += 1;
}
-
- sgot->_raw_size += 4;
break;
- case R_ARM_PLT32:
- /* This symbol requires a procedure linkage table entry. We
- actually build the entry in adjust_dynamic_symbol,
- because this might be a case of linking PIC code which is
- never referenced by a dynamic object, in which case we
- 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)
- continue;
-
- h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ case R_ARM_GOTOFF:
+ case R_ARM_GOTPC:
+ if (htab->sgot == NULL)
+ {
+ if (htab->root.dynobj == NULL)
+ htab->root.dynobj = abfd;
+ if (!create_got_section (htab->root.dynobj, info))
+ return FALSE;
+ }
break;
case R_ARM_ABS32:
case R_ARM_REL32:
case R_ARM_PC24:
+ if (h != NULL && !info->shared)
+ {
+ /* If this reloc is in a read-only section, we might
+ need a copy reloc. We can't check reliably at this
+ stage whether the section is read-only, as input
+ sections have not yet been mapped to output sections.
+ Tentatively set the flag for now, and correct in
+ adjust_dynamic_symbol. */
+ h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
+
+ /* We may need a .plt entry if the function this reloc
+ refers to is in a shared lib. */
+ h->plt.refcount += 1;
+ }
+
/* 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
@@ -2777,14 +2987,17 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
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. */
+ relocs_copied field of the hash table entry. */
if (info->shared
- && (ELF32_R_TYPE (rel->r_info) != R_ARM_PC24
- || (h != NULL
- && (! info->symbolic
- || (h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ && (sec->flags & SEC_ALLOC) != 0
+ && (ELF32_R_TYPE (rel->r_info) != R_ARM_PC24
+ || (h != NULL
+ && (! info->symbolic
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))))
{
+ struct elf32_arm_relocs_copied *p, **head;
+
/* When creating a shared object, we must copy these
reloc types into the output file. We create a reloc
section in dynobj and make room for this reloc. */
@@ -2818,45 +3031,49 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
|| ! bfd_set_section_alignment (dynobj, sreloc, 2))
return FALSE;
}
- if (sec->flags & SEC_READONLY)
- info->flags |= DF_TEXTREL;
+
+ elf_section_data (sec)->sreloc = sreloc;
}
- sreloc->_raw_size += sizeof (Elf32_External_Rel);
- /* 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_i386 linker
- hash table, which means that h is really a pointer to
- an elf_i386_link_hash_entry. */
- if (h != NULL && info->symbolic
- && ELF32_R_TYPE (rel->r_info) == R_ARM_PC24)
+ /* If this is a global symbol, we count the number of
+ relocations we need for this symbol. */
+ if (h != NULL)
{
- struct elf32_arm_link_hash_entry * eh;
- struct elf32_arm_pcrel_relocs_copied * p;
-
- eh = (struct elf32_arm_link_hash_entry *) h;
-
- for (p = eh->pcrel_relocs_copied; p != NULL; p = p->next)
- if (p->section == sreloc)
- break;
-
+ head = &((struct elf32_arm_link_hash_entry *) h)->relocs_copied;
+ }
+ else
+ {
+ /* 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)
- {
- p = ((struct elf32_arm_pcrel_relocs_copied *)
- bfd_alloc (dynobj, (bfd_size_type) 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;
+ return FALSE;
+ p->next = *head;
+ *head = p;
+ p->section = sec;
+ p->count = 0;
+ p->pc_count = 0;
}
+
+ p->count += 1;
+ if (ELF32_R_TYPE (rel->r_info) == R_ARM_PC24)
+ p->pc_count += 1;
}
break;
@@ -2996,71 +3213,29 @@ elf32_arm_adjust_dynamic_symbol (info, h)
if (h->type == STT_FUNC
|| (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
{
- /* If we link a program (not a DSO), we'll get rid of unnecessary
- PLT entries; we point to the actual symbols -- even for pic
- relocs, because a program built with -fpic should have the same
- result as one built without -fpic, specifically considering weak
- symbols.
- FIXME: m68k and i386 differ here, for unclear reasons. */
- if (! info->shared
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0)
+ if (h->plt.refcount <= 0
+ || SYMBOL_CALLS_LOCAL (info, h)
+ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ && h->root.type == bfd_link_hash_undefweak))
{
/* This case can occur if we saw a PLT32 reloc in an input
- file, but the symbol was not defined by a dynamic object.
- In such a case, we don't actually need to build a
- procedure linkage table, and we can just do a PC32 reloc
- instead. */
- BFD_ASSERT ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0);
+ file, but the symbol was never referred to by a dynamic
+ object, or if all references were garbage collected. In
+ such a case, we don't actually need to build a procedure
+ linkage table, and we can just do a PC24 reloc instead. */
+ h->plt.offset = (bfd_vma) -1;
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- return TRUE;
- }
-
- /* Make sure this symbol is output as a dynamic symbol. */
- if (h->dynindx == -1)
- {
- if (! bfd_elf32_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-
- s = bfd_get_section_by_name (dynobj, ".plt");
- BFD_ASSERT (s != NULL);
-
- /* 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 this symbol is not defined in a regular file, and we are
- not generating a shared library, then set the symbol to this
- location in the .plt. This is required to make function
- pointers compare as equal between the normal executable and
- the shared library. */
- if (! info->shared
- && (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->plt.offset = s->_raw_size;
-
- /* Make room for this entry. */
- s->_raw_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;
-
- /* We also need to make an entry in the .rel.plt section. */
-
- s = bfd_get_section_by_name (dynobj, ".rel.plt");
- BFD_ASSERT (s != NULL);
- s->_raw_size += sizeof (Elf32_External_Rel);
-
return TRUE;
}
+ else
+ /* It's possible that we incorrectly decided a .plt reloc was
+ needed for an R_ARM_PC24 reloc to a non-function sym in
+ check_relocs. We can't decide accurately between function and
+ non-function syms in check-relocs; Objects loaded later in
+ the link may change h->type. So fix it now. */
+ h->plt.offset = (bfd_vma) -1;
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
@@ -3135,6 +3310,198 @@ elf32_arm_adjust_dynamic_symbol (info, h)
return TRUE;
}
+/* Allocate space in .plt, .got and associated reloc sections for
+ dynamic relocs. */
+
+static bfd_boolean
+allocate_dynrelocs (h, inf)
+ struct elf_link_hash_entry *h;
+ PTR inf;
+{
+ struct bfd_link_info *info;
+ struct elf32_arm_link_hash_table *htab;
+ struct elf32_arm_link_hash_entry *eh;
+ struct elf32_arm_relocs_copied *p;
+
+ if (h->root.type == bfd_link_hash_indirect)
+ return TRUE;
+
+ if (h->root.type == bfd_link_hash_warning)
+ /* When warning symbols are created, they **replace** the "real"
+ entry in the hash table, thus we never get to see the real
+ symbol in a hash traversal. So look at it now. */
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ info = (struct bfd_link_info *) inf;
+ htab = elf32_arm_hash_table (info);
+
+ if (htab->root.dynamic_sections_created
+ && h->plt.refcount > 0)
+ {
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ {
+ if (! bfd_elf32_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ if (info->shared
+ || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h))
+ {
+ asection *s = htab->splt;
+
+ /* 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;
+
+ h->plt.offset = s->_raw_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
+ location in the .plt. This is required to make function
+ pointers compare as equal between the normal executable and
+ the shared library. */
+ if (! info->shared
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ {
+ h->root.u.def.section = s;
+ h->root.u.def.value = h->plt.offset;
+ }
+
+ /* Make room for this entry. */
+ s->_raw_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;
+
+ /* We also need to make an entry in the .rel.plt section. */
+ htab->srelplt->_raw_size += sizeof (Elf32_External_Rel);
+ }
+ else
+ {
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ }
+ }
+ else
+ {
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ }
+
+ if (h->got.refcount > 0)
+ {
+ asection *s;
+ bfd_boolean dyn;
+
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ {
+ if (! bfd_elf32_link_record_dynamic_symbol (info, h))
+ 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);
+ }
+ else
+ h->got.offset = (bfd_vma) -1;
+
+ eh = (struct elf32_arm_link_hash_entry *) h;
+ if (eh->relocs_copied == NULL)
+ return TRUE;
+
+ /* In the shared -Bsymbolic case, discard space allocated for
+ dynamic pc-relative relocs against symbols which turn out to be
+ defined in regular objects. For the normal shared case, discard
+ space for pc-relative relocs that have become local due to symbol
+ visibility changes. */
+
+ if (info->shared)
+ {
+ /* The only reloc that uses pc_count is R_ARM_PC24, which will
+ appear on a call or on something like ".long foo - .". We
+ want calls to protected symbols to resolve directly to the
+ function rather than going via the plt. If people want
+ function pointer comparisons to work as expected then they
+ should avoid writing assembly like ".long foo - .". */
+ if (SYMBOL_CALLS_LOCAL (info, h))
+ {
+ struct elf32_arm_relocs_copied **pp;
+
+ for (pp = &eh->relocs_copied; (p = *pp) != NULL; )
+ {
+ p->count -= p->pc_count;
+ p->pc_count = 0;
+ if (p->count == 0)
+ *pp = p->next;
+ else
+ pp = &p->next;
+ }
+ }
+
+ /* Also discard relocs on undefined weak syms with non-default
+ visibility. */
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ && h->root.type == bfd_link_hash_undefweak)
+ eh->relocs_copied = NULL;
+ }
+ else
+ {
+ /* For the non-shared case, discard space for relocs against
+ symbols which turn out to need copy relocs or are not
+ dynamic. */
+
+ if ((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)
+ || (htab->root.dynamic_sections_created
+ && (h->root.type == bfd_link_hash_undefweak
+ || h->root.type == bfd_link_hash_undefined))))
+ {
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ {
+ if (! bfd_elf32_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ /* If that succeeded, we know we'll be keeping all the
+ relocs. */
+ if (h->dynindx != -1)
+ goto keep;
+ }
+
+ eh->relocs_copied = NULL;
+
+ keep: ;
+ }
+
+ /* Finally, allocate space. */
+ 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);
+ }
+
+ return TRUE;
+}
+
/* Set the sizes of the dynamic sections. */
static bfd_boolean
@@ -3146,14 +3513,17 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
asection * s;
bfd_boolean plt;
bfd_boolean relocs;
+ bfd *ibfd;
+ struct elf32_arm_link_hash_table *htab;
+ htab = elf32_arm_hash_table (info);
dynobj = elf_hash_table (info)->dynobj;
BFD_ASSERT (dynobj != NULL);
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -3161,26 +3531,74 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
}
}
- else
+
+ /* Set up .got offsets for local syms, and space for local dynamic
+ relocs. */
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
{
- /* We may have created entries in the .rel.got section.
- However, if we are not creating the dynamic sections, we will
- not actually use these entries. Reset the size of .rel.got,
- which will cause it to get stripped from the output file
- below. */
- s = bfd_get_section_by_name (dynobj, ".rel.got");
- if (s != NULL)
- s->_raw_size = 0;
+ bfd_signed_vma *local_got;
+ bfd_signed_vma *end_local_got;
+ char *local_tls_type;
+ bfd_size_type locsymcount;
+ Elf_Internal_Shdr *symtab_hdr;
+ asection *srel;
+
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
+ continue;
+
+ for (s = ibfd->sections; s != NULL; s = s->next)
+ {
+ struct elf32_arm_relocs_copied *p;
+
+ for (p = *((struct elf32_arm_relocs_copied **)
+ &elf_section_data (s)->local_dynrel);
+ p != NULL;
+ p = p->next)
+ {
+ if (!bfd_is_abs_section (p->section)
+ && bfd_is_abs_section (p->section->output_section))
+ {
+ /* Input section has been discarded, either because
+ it is a copy of a linkonce section or due to
+ linker script /DISCARD/, so we'll be discarding
+ the relocs too. */
+ }
+ else if (p->count != 0)
+ {
+ srel = elf_section_data (p->section)->sreloc;
+ srel->_raw_size += p->count * sizeof (Elf32_External_Rel);
+ if ((p->section->output_section->flags & SEC_READONLY) != 0)
+ info->flags |= DF_TEXTREL;
+ }
+ }
+ }
+
+ local_got = elf_local_got_refcounts (ibfd);
+ if (!local_got)
+ continue;
+
+ symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+ locsymcount = symtab_hdr->sh_info;
+ end_local_got = local_got + locsymcount;
+ s = htab->sgot;
+ srel = htab->srelgot;
+ for (; local_got < end_local_got; ++local_got, ++local_tls_type)
+ {
+ if (*local_got > 0)
+ {
+ *local_got = s->_raw_size;
+ s->_raw_size += 4;
+ if (info->shared)
+ srel->_raw_size += sizeof (Elf32_External_Rel);
+ }
+ else
+ *local_got = (bfd_vma) -1;
+ }
}
- /* 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_arm_link_hash_traverse (elf32_arm_hash_table (info),
- elf32_arm_discard_copies,
- (PTR) NULL);
+ /* Allocate global sym .plt and .got entries, and space for global
+ sym dynamic relocs. */
+ elf_link_hash_traverse (&htab->root, allocate_dynrelocs, (PTR) info);
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
@@ -3305,33 +3723,6 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
return TRUE;
}
-/* This function is called via elf32_arm_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
-elf32_arm_discard_copies (h, ignore)
- struct elf32_arm_link_hash_entry * h;
- PTR ignore ATTRIBUTE_UNUSED;
-{
- struct elf32_arm_pcrel_relocs_copied * s;
-
- if (h->root.root.type == bfd_link_hash_warning)
- h = (struct elf32_arm_link_hash_entry *) h->root.root.u.i.link;
-
- /* We only discard relocs for symbols defined in a regular object. */
- if ((h->root.elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- return TRUE;
-
- for (s = h->pcrel_relocs_copied; s != NULL; s = s->next)
- s->section->_raw_size -= s->count * sizeof (Elf32_External_Rel);
-
- return TRUE;
-}
-
/* Finish up dynamic symbol handling. We set the contents of various
dynamic sections here. */
@@ -3355,6 +3746,7 @@ elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym)
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. */
@@ -3370,35 +3762,43 @@ elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym)
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_ENTRY_SIZE - 1;
+ plt_index = (h->plt.offset - PLT_HEADER_SIZE) / 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;
+ /* 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);
+
+ BFD_ASSERT ((got_displacement & 0xf0000000) == 0);
+
/* Fill in the entry in the procedure linkage table. */
- bfd_put_32 (output_bfd, elf32_arm_plt_entry[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],
+ 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],
+ bfd_put_32 (output_bfd, elf32_arm_plt_entry[2] | (got_displacement & 0x00000fff),
splt->contents + h->plt.offset + 8);
- bfd_put_32 (output_bfd,
- (sgot->output_section->vma
- + sgot->output_offset
- + got_offset
- - splt->output_section->vma
- - splt->output_offset
- - h->plt.offset - 12),
- splt->contents + h->plt.offset + 12);
+#ifdef FOUR_WORD_PLT
+ 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
@@ -3439,16 +3839,20 @@ elf32_arm_finish_dynamic_symbol (output_bfd, info, h, sym)
+ sgot->output_offset
+ (h->got.offset &~ (bfd_vma) 1));
- /* If this is a -Bsymbolic link, and the symbol is defined
- locally, we just want to emit a RELATIVE reloc. The entry in
- the global offset table will already have been initialized in
- the relocate_section function. */
+ /* If this is a static link, or it is a -Bsymbolic link and the
+ symbol is defined locally or was forced to be local because
+ of a version file, we just want to emit a RELATIVE reloc.
+ The entry in the global offset table will already have been
+ initialized in the relocate_section function. */
if (info->shared
- && (info->symbolic || h->dynindx == -1)
- && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
- rel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
+ && SYMBOL_REFERENCES_LOCAL (info, h))
+ {
+ BFD_ASSERT((h->got.offset & 1) != 0);
+ rel.r_info = ELF32_R_INFO (0, R_ARM_RELATIVE);
+ }
else
{
+ BFD_ASSERT((h->got.offset & 1) == 0);
bfd_put_32 (output_bfd, (bfd_vma) 0, sgot->contents + h->got.offset);
rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT);
}
@@ -3602,10 +4006,26 @@ elf32_arm_finish_dynamic_sections (output_bfd, info)
/* Fill in the first entry in the procedure linkage table. */
if (splt->_raw_size > 0)
{
+ bfd_vma got_displacement;
+
+ /* Calculate the displacement between the PLT slot and &GOT[0]. */
+ got_displacement = (sgot->output_section->vma
+ + sgot->output_offset
+ - splt->output_section->vma
+ - splt->output_offset
+ - 16);
+
bfd_put_32 (output_bfd, elf32_arm_plt0_entry[0], splt->contents + 0);
bfd_put_32 (output_bfd, elf32_arm_plt0_entry[1], splt->contents + 4);
bfd_put_32 (output_bfd, elf32_arm_plt0_entry[2], splt->contents + 8);
bfd_put_32 (output_bfd, elf32_arm_plt0_entry[3], splt->contents + 12);
+#ifdef FOUR_WORD_PLT
+ /* The displacement value goes in the otherwise-unused last word of
+ the second entry. */
+ bfd_put_32 (output_bfd, got_displacement, splt->contents + 28);
+#else
+ bfd_put_32 (output_bfd, got_displacement, splt->contents + 16);
+#endif
}
/* UnixWare sets the entsize of .plt to 4, although that doesn't
@@ -3707,7 +4127,7 @@ elf32_arm_final_write_processing (abfd, linker)
#define elf_backend_check_relocs elf32_arm_check_relocs
#define elf_backend_relocate_section elf32_arm_relocate_section
#define elf_backend_adjust_dynamic_symbol elf32_arm_adjust_dynamic_symbol
-#define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections
+#define elf_backend_create_dynamic_sections elf32_arm_create_dynamic_sections
#define elf_backend_finish_dynamic_symbol elf32_arm_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections elf32_arm_finish_dynamic_sections
#define elf_backend_size_dynamic_sections elf32_arm_size_dynamic_sections
@@ -3716,7 +4136,9 @@ elf32_arm_final_write_processing (abfd, linker)
#define elf_backend_object_p elf32_arm_object_p
#define elf_backend_section_flags elf32_arm_section_flags
#define elf_backend_final_write_processing elf32_arm_final_write_processing
+#define elf_backend_copy_indirect_symbol elf32_arm_copy_indirect_symbol
+#define elf_backend_can_refcount 1
#define elf_backend_can_gc_sections 1
#define elf_backend_plt_readonly 1
#define elf_backend_want_got_plt 1
@@ -3726,7 +4148,6 @@ elf32_arm_final_write_processing (abfd, linker)
#endif
#define elf_backend_got_header_size 12
-#define elf_backend_plt_header_size PLT_ENTRY_SIZE
#include "elf32-target.h"
diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c
index defa9ce..44f2b38 100644
--- a/bfd/elf32-avr.c
+++ b/bfd/elf32-avr.c
@@ -750,7 +750,7 @@ elf32_avr_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections [r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index d630a2a..2c63474 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -847,7 +847,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections [r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
symname = (bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name));
@@ -1292,16 +1292,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
long indx;
- if (h == NULL)
- sec = local_sections[r_symndx];
- else
- {
- BFD_ASSERT (h->root.type == bfd_link_hash_defined
- || (h->root.type
- == bfd_link_hash_defweak));
- sec = h->root.u.def.section;
- }
- if (sec != NULL && bfd_is_abs_section (sec))
+ if (bfd_is_abs_section (sec))
indx = 0;
else if (sec == NULL || sec->owner == NULL)
{
@@ -2647,7 +2638,7 @@ elf_cris_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (!info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -3064,7 +3055,6 @@ elf_cris_reloc_type_class (rela)
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 12
-#define elf_backend_plt_header_size PLT_ENTRY_SIZE
/* Later, we my want to optimize RELA entries into REL entries for dynamic
linking and libraries (if it's a win of any significance). Until then,
diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c
index cc5eddc..f9454ff 100644
--- a/bfd/elf32-d10v.c
+++ b/bfd/elf32-d10v.c
@@ -38,6 +38,10 @@ static bfd_boolean elf32_d10v_gc_sweep_hook
static bfd_boolean elf32_d10v_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
+static bfd_vma extract_rel_addend
+ PARAMS ((bfd *, bfd_byte *, reloc_howto_type *));
+static void insert_rel_addend
+ PARAMS ((bfd *, bfd_byte *, reloc_howto_type *, bfd_vma));
static bfd_boolean elf32_d10v_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *,
@@ -346,6 +350,75 @@ elf32_d10v_check_relocs (abfd, info, sec, relocs)
return TRUE;
}
+static bfd_vma
+extract_rel_addend (abfd, where, howto)
+ bfd *abfd;
+ bfd_byte *where;
+ reloc_howto_type *howto;
+{
+ bfd_vma insn, val;
+
+ switch (howto->size)
+ {
+ case 0:
+ insn = bfd_get_8 (abfd, where);
+ break;
+ case 1:
+ insn = bfd_get_16 (abfd, where);
+ break;
+ case 2:
+ insn = bfd_get_32 (abfd, where);
+ break;
+ default:
+ abort ();
+ }
+
+ val = (insn & howto->dst_mask) >> howto->bitpos << howto->rightshift;
+ /* We should really be testing for signed addends here, but we don't
+ have that info directly in the howto. */
+ if (howto->pc_relative)
+ {
+ bfd_vma sign;
+ sign = howto->dst_mask & (~howto->dst_mask >> 1 | ~(-(bfd_vma) 1 >> 1));
+ sign = sign >> howto->bitpos << howto->rightshift;
+ val = (val ^ sign) - sign;
+ }
+ return val;
+}
+
+static void
+insert_rel_addend (abfd, where, howto, addend)
+ bfd *abfd;
+ bfd_byte *where;
+ reloc_howto_type *howto;
+ bfd_vma addend;
+{
+ bfd_vma insn;
+
+ addend = (addend >> howto->rightshift << howto->bitpos) & howto->dst_mask;
+ insn = ~howto->dst_mask;
+ switch (howto->size)
+ {
+ case 0:
+ insn &= bfd_get_8 (abfd, where);
+ insn |= addend;
+ bfd_put_8 (abfd, insn, where);
+ break;
+ case 1:
+ insn &= bfd_get_16 (abfd, where);
+ insn |= addend;
+ bfd_put_16 (abfd, insn, where);
+ break;
+ case 2:
+ insn &= bfd_get_32 (abfd, where);
+ insn |= addend;
+ bfd_put_32 (abfd, insn, where);
+ break;
+ default:
+ abort ();
+ }
+}
+
/* Relocate a D10V ELF section. */
static bfd_boolean
elf32_d10v_relocate_section (output_bfd, info, input_bfd, input_section,
@@ -391,20 +464,28 @@ elf32_d10v_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->relocatable)
{
+ bfd_vma val;
+ bfd_byte *where;
+
/* This is a relocatable link. We don't have to change
anything, unless the reloc is against a section symbol,
in which case we have to adjust according to where the
section symbol winds up in the output section. */
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sec = local_sections[r_symndx];
- rel->r_addend += sec->output_offset + sym->st_value;
- }
- }
+ if (r_symndx >= symtab_hdr->sh_info)
+ continue;
+ sym = local_syms + r_symndx;
+ if (ELF_ST_TYPE (sym->st_info) != STT_SECTION)
+ continue;
+
+ sec = local_sections[r_symndx];
+ val = sec->output_offset;
+ if (val == 0)
+ continue;
+
+ where = contents + rel->r_offset;
+ val += extract_rel_addend (input_bfd, where, howto);
+ insert_rel_addend (input_bfd, where, howto, val);
continue;
}
@@ -416,7 +497,23 @@ elf32_d10v_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = (sec->output_section->vma
+ + sec->output_offset
+ + sym->st_value);
+ if ((sec->flags & SEC_MERGE)
+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ {
+ asection *msec;
+ bfd_vma addend;
+ bfd_byte *where = contents + rel->r_offset;
+
+ addend = extract_rel_addend (input_bfd, where, howto);
+ msec = sec;
+ addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend);
+ addend -= relocation;
+ addend += msec->output_section->vma + msec->output_offset;
+ insert_rel_addend (input_bfd, where, howto, addend);
+ }
}
else
{
@@ -456,7 +553,7 @@ elf32_d10v_relocate_section (output_bfd, info, input_bfd, input_section,
r = _bfd_final_link_relocate (howto, input_bfd, input_section,
contents, rel->r_offset,
- relocation, rel->r_addend);
+ relocation, (bfd_vma) 0);
if (r != bfd_reloc_ok)
{
diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c
index c4e2290..472a07a 100644
--- a/bfd/elf32-fr30.c
+++ b/bfd/elf32-fr30.c
@@ -552,7 +552,7 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections [r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c
index faa1401..5157f40 100644
--- a/bfd/elf32-frv.c
+++ b/bfd/elf32-frv.c
@@ -111,7 +111,7 @@ static reloc_howto_type elf32_frv_howto_table [] =
/* A 16 bit pc-relative relocation. */
HOWTO (R_FRV_LABEL16, /* type */
- 0, /* rightshift */
+ 2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
TRUE, /* pc_relative */
@@ -724,7 +724,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections [r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
@@ -997,6 +997,7 @@ elf32_frv_machine (abfd)
switch (elf_elfheader (abfd)->e_flags & EF_FRV_CPU_MASK)
{
default: break;
+ case EF_FRV_CPU_FR550: return bfd_mach_fr550;
case EF_FRV_CPU_FR500: return bfd_mach_fr500;
case EF_FRV_CPU_FR400: return bfd_mach_fr400;
case EF_FRV_CPU_FR300: return bfd_mach_fr300;
@@ -1245,6 +1246,7 @@ frv_elf_merge_private_bfd_data (ibfd, obfd)
default: strcat (new_opt, " -mcpu=?"); break;
case EF_FRV_CPU_GENERIC: strcat (new_opt, " -mcpu=frv"); break;
case EF_FRV_CPU_SIMPLE: strcat (new_opt, " -mcpu=simple"); break;
+ case EF_FRV_CPU_FR550: strcat (new_opt, " -mcpu=fr550"); break;
case EF_FRV_CPU_FR500: strcat (new_opt, " -mcpu=fr500"); break;
case EF_FRV_CPU_FR400: strcat (new_opt, " -mcpu=fr400"); break;
case EF_FRV_CPU_FR300: strcat (new_opt, " -mcpu=fr300"); break;
@@ -1256,6 +1258,7 @@ frv_elf_merge_private_bfd_data (ibfd, obfd)
default: strcat (old_opt, " -mcpu=?"); break;
case EF_FRV_CPU_GENERIC: strcat (old_opt, " -mcpu=frv"); break;
case EF_FRV_CPU_SIMPLE: strcat (old_opt, " -mcpu=simple"); break;
+ case EF_FRV_CPU_FR550: strcat (old_opt, " -mcpu=fr550"); break;
case EF_FRV_CPU_FR500: strcat (old_opt, " -mcpu=fr500"); break;
case EF_FRV_CPU_FR400: strcat (old_opt, " -mcpu=fr400"); break;
case EF_FRV_CPU_FR300: strcat (old_opt, " -mcpu=fr300"); break;
@@ -1322,6 +1325,7 @@ frv_elf_print_private_bfd_data (abfd, ptr)
{
default: break;
case EF_FRV_CPU_SIMPLE: fprintf (file, " -mcpu=simple"); break;
+ case EF_FRV_CPU_FR550: fprintf (file, " -mcpu=fr550"); break;
case EF_FRV_CPU_FR500: fprintf (file, " -mcpu=fr500"); break;
case EF_FRV_CPU_FR400: fprintf (file, " -mcpu=fr400"); break;
case EF_FRV_CPU_FR300: fprintf (file, " -mcpu=fr300"); break;
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index efd14bb..452db27 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -225,7 +225,7 @@ struct elf_reloc_map {
unsigned char howto_index;
};
-/* An array mapping BFD reloc codes to SH ELF relocs. */
+/* An array mapping BFD reloc codes to H8 ELF relocs. */
static const struct elf_reloc_map h8_reloc_map[] = {
{ BFD_RELOC_NONE, R_H8_NONE_X },
@@ -435,7 +435,7 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else
{
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index be0727f..c2e2f70 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -141,6 +141,12 @@ static const bfd_byte plt_stub[] =
#define IS_ABSOLUTE_RELOC(r_type) 1
#endif
+/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
+ copying dynamic variables from a shared lib into an app's dynbss
+ section, and instead use a dynamic relocation to point into the
+ shared lib. */
+#define ELIMINATE_COPY_RELOCS 1
+
enum elf32_hppa_stub_type {
hppa_stub_long_branch,
hppa_stub_long_branch_shared,
@@ -1003,7 +1009,18 @@ elf32_hppa_copy_indirect_symbol (const struct elf_backend_data *bed,
eind->dyn_relocs = NULL;
}
- _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
+ if (ELIMINATE_COPY_RELOCS
+ && ind->root.type != bfd_link_hash_indirect
+ && (dir->elf_link_hash_flags & ELF_LINK_HASH_DYNAMIC_ADJUSTED) != 0)
+ /* If called to transfer flags for a weakdef during processing
+ of elf_adjust_dynamic_symbol, don't copy ELF_LINK_NON_GOT_REF.
+ We clear it ourselves for ELIMINATE_COPY_RELOCS. */
+ dir->elf_link_hash_flags |=
+ (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
+ | ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK));
+ else
+ _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
}
/* Look through the relocs for a section during the first phase, and
@@ -1332,7 +1349,8 @@ elf32_hppa_check_relocs (bfd *abfd,
|| h->elf.root.type == bfd_link_hash_defweak
|| (h->elf.elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))))
- || (!info->shared
+ || (ELIMINATE_COPY_RELOCS
+ && !info->shared
&& (sec->flags & SEC_ALLOC) != 0
&& h != NULL
&& (h->elf.root.type == bfd_link_hash_defweak
@@ -1623,8 +1641,6 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
struct elf_link_hash_entry *h)
{
struct elf32_hppa_link_hash_table *htab;
- struct elf32_hppa_link_hash_entry *eh;
- struct elf32_hppa_dyn_reloc_entry *p;
asection *s;
unsigned int power_of_two;
@@ -1666,6 +1682,10 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
abort ();
h->root.u.def.section = h->weakdef->root.u.def.section;
h->root.u.def.value = h->weakdef->root.u.def.value;
+ if (ELIMINATE_COPY_RELOCS)
+ h->elf_link_hash_flags
+ = ((h->elf_link_hash_flags & ~ELF_LINK_NON_GOT_REF)
+ | (h->weakdef->elf_link_hash_flags & ELF_LINK_NON_GOT_REF));
return TRUE;
}
@@ -1684,20 +1704,26 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info,
if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0)
return TRUE;
- eh = (struct elf32_hppa_link_hash_entry *) h;
- for (p = eh->dyn_relocs; p != NULL; p = p->next)
+ if (ELIMINATE_COPY_RELOCS)
{
- s = p->sec->output_section;
- if (s != NULL && (s->flags & SEC_READONLY) != 0)
- break;
- }
+ struct elf32_hppa_link_hash_entry *eh;
+ struct elf32_hppa_dyn_reloc_entry *p;
- /* If we didn't find any dynamic relocs in read-only sections, then
- we'll be keeping the dynamic relocs and avoiding the copy reloc. */
- if (p == NULL)
- {
- h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
- return TRUE;
+ eh = (struct elf32_hppa_link_hash_entry *) h;
+ for (p = eh->dyn_relocs; p != NULL; p = p->next)
+ {
+ s = p->sec->output_section;
+ if (s != NULL && (s->flags & SEC_READONLY) != 0)
+ break;
+ }
+
+ /* If we didn't find any dynamic relocs in read-only sections, then
+ we'll be keeping the dynamic relocs and avoiding the copy reloc. */
+ if (p == NULL)
+ {
+ h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
+ return TRUE;
+ }
}
/* We must allocate the symbol in our .dynbss section, which will
@@ -1883,9 +1909,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
if (info->shared)
{
#if RELATIVE_DYNRELOCS
- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
- && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
- || info->symbolic))
+ if (SYMBOL_CALLS_LOCAL (info, h))
{
struct elf32_hppa_dyn_reloc_entry **pp;
@@ -1900,6 +1924,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
}
}
#endif
+
+ /* Also discard relocs on undefined weak syms with non-default
+ visibility. */
+ if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
+ && h->root.type == bfd_link_hash_undefweak)
+ eh->dyn_relocs = NULL;
}
else
{
@@ -1907,7 +1937,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
symbols which turn out to need copy relocs or are not
dynamic. */
if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && ((ELIMINATE_COPY_RELOCS
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
|| (htab->elf.dynamic_sections_created
&& (h->root.type == bfd_link_hash_undefweak
@@ -2016,7 +2047,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
if (htab->elf.dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
@@ -3067,17 +3098,17 @@ final_link_relocate (asection *input_section,
if (!info->shared)
{
switch (r_type)
- {
- case R_PARISC_DLTIND21L:
- r_type = R_PARISC_DPREL21L;
+ {
+ case R_PARISC_DLTIND21L:
+ r_type = R_PARISC_DPREL21L;
break;
- case R_PARISC_DLTIND14R:
- r_type = R_PARISC_DPREL14R;
+ case R_PARISC_DLTIND14R:
+ r_type = R_PARISC_DPREL14R;
break;
- case R_PARISC_DLTIND14F:
- r_type = R_PARISC_DPREL14F;
+ case R_PARISC_DLTIND14F:
+ r_type = R_PARISC_DPREL14F;
break;
}
}
@@ -3155,7 +3186,7 @@ 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"),
+ (_("%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,
(long) rel->r_offset,
@@ -3408,7 +3439,7 @@ elf32_hppa_relocate_section (bfd *output_bfd,
/* This is a local symbol, h defaults to NULL. */
sym = local_syms + r_symndx;
sym_sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sym_sec, rel);
}
else
{
@@ -3423,7 +3454,7 @@ elf32_hppa_relocate_section (bfd *output_bfd,
&& hh->root.type != bfd_link_hash_defined
&& hh->root.type != bfd_link_hash_defweak
&& hh->root.type != bfd_link_hash_undefweak)
- {
+ {
if (!info->executable
&& info->unresolved_syms_in_objects == RM_IGNORE
&& ELF_ST_VISIBILITY (hh->other) == STV_DEFAULT
@@ -3671,18 +3702,18 @@ elf32_hppa_relocate_section (bfd *output_bfd,
Conversely, DEF_DYNAMIC can't be used in check_relocs as
there all files have not been loaded. */
if ((info->shared
+ && (h == NULL
+ || ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
+ || h->elf.root.type != bfd_link_hash_undefweak)
&& (IS_ABSOLUTE_RELOC (r_type)
- || (h != NULL
- && h->elf.dynindx != -1
- && (!info->symbolic
- || (h->elf.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ || !SYMBOL_CALLS_LOCAL (info, &h->elf)))
|| (!info->shared
&& h != NULL
&& h->elf.dynindx != -1
&& (h->elf.elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
- && (((h->elf.elf_link_hash_flags
- & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && ((ELIMINATE_COPY_RELOCS
+ && (h->elf.elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0
&& (h->elf.elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0)
|| h->elf.root.type == bfd_link_hash_undefweak
@@ -3739,6 +3770,11 @@ elf32_hppa_relocate_section (bfd *output_bfd,
&& sym_sec->output_section != NULL
&& ! bfd_is_abs_section (sym_sec))
{
+ /* Skip this relocation if the output section has
+ been discarded. */
+ if (bfd_is_abs_section (sym_sec->output_section))
+ break;
+
indx = elf_section_data (sym_sec->output_section)->dynindx;
/* We are turning this relocation into one
against a section symbol, so subtract out the
diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c
index 4a06ac0..83783ae 100644
--- a/bfd/elf32-i370.c
+++ b/bfd/elf32-i370.c
@@ -653,7 +653,7 @@ i370_elf_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -1210,7 +1210,7 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
sec = local_sections[r_symndx];
sym_name = "<local symbol>";
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
addend = rel->r_addend;
}
else
@@ -1363,16 +1363,7 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
long indx;
- if (h == NULL)
- sec = local_sections[r_symndx];
- else
- {
- BFD_ASSERT (h->root.type == bfd_link_hash_defined
- || (h->root.type
- == bfd_link_hash_defweak));
- sec = h->root.u.def.section;
- }
- if (sec != NULL && bfd_is_abs_section (sec))
+ if (bfd_is_abs_section (sec))
indx = 0;
else if (sec == NULL || sec->owner == NULL)
{
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 11fadab..ff8aab4 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1953,10 +1953,10 @@ elf_i386_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
static bfd_vma
dtpoff_base (struct bfd_link_info *info)
{
- /* If tls_segment is NULL, we should have signalled an error already. */
- if (elf_hash_table (info)->tls_segment == NULL)
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (elf_hash_table (info)->tls_sec == NULL)
return 0;
- return elf_hash_table (info)->tls_segment->start;
+ return elf_hash_table (info)->tls_sec->vma;
}
/* Return the relocation value for @tpoff relocation
@@ -1965,14 +1965,12 @@ dtpoff_base (struct bfd_link_info *info)
static bfd_vma
tpoff (struct bfd_link_info *info, bfd_vma address)
{
- struct elf_link_tls_segment *tls_segment
- = elf_hash_table (info)->tls_segment;
+ struct elf_link_hash_table *htab = elf_hash_table (info);
- /* If tls_segment is NULL, we should have signalled an error already. */
- if (tls_segment == NULL)
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (htab->tls_sec == NULL)
return 0;
- return (align_power (tls_segment->size, tls_segment->align)
- + tls_segment->start - address);
+ return htab->tls_size + htab->tls_sec->vma - address;
}
/* Relocate an i386 ELF section. */
@@ -3240,7 +3238,6 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 12
-#define elf_backend_plt_header_size PLT_ENTRY_SIZE
/* Support RELA for objdump of prelink objects. */
#define elf_info_to_howto elf_i386_info_to_howto_rel
diff --git a/bfd/elf32-i860.c b/bfd/elf32-i860.c
index 209cbe6..8ab3c92 100644
--- a/bfd/elf32-i860.c
+++ b/bfd/elf32-i860.c
@@ -1104,7 +1104,7 @@ elf32_i860_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
{
sym = local_syms + r_symndx;
sec = local_sections [r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index 7e955e9..7500f56 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -1107,7 +1107,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
sec = local_sections[r_symndx];
sym_name = "<local symbol>";
#if !USE_REL
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
addend = rel->r_addend;
#else
/* FIXME: This won't handle local relocations against SEC_MERGE
@@ -2094,12 +2094,9 @@ m32r_elf_check_relocs (abfd, info, sec, relocs)
static struct bfd_elf_special_section const m32r_elf_special_sections[]=
{
- { ".sdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".sbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
#define ELF_ARCH bfd_arch_m32r
diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c
index 2844b48..4d8f6b5 100644
--- a/bfd/elf32-m68hc11.c
+++ b/bfd/elf32-m68hc11.c
@@ -30,27 +30,26 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Relocation functions. */
static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
+ (bfd *, bfd_reloc_code_real_type);
static void m68hc11_info_to_howto_rel
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+ (bfd *, arelent *, Elf_Internal_Rela *);
/* Trampoline generation. */
static bfd_boolean m68hc11_elf_size_one_stub
- PARAMS((struct bfd_hash_entry *gen_entry, PTR in_arg));
+ (struct bfd_hash_entry *gen_entry, void *in_arg);
static bfd_boolean m68hc11_elf_build_one_stub
- PARAMS((struct bfd_hash_entry *gen_entry, PTR in_arg));
+ (struct bfd_hash_entry *gen_entry, void *in_arg);
static struct bfd_link_hash_table* m68hc11_elf_bfd_link_hash_table_create
- PARAMS ((bfd* abfd));
+ (bfd* abfd);
/* Linker relaxation. */
static bfd_boolean m68hc11_elf_relax_section
- PARAMS ((bfd *, asection *, struct bfd_link_info *, bfd_boolean *));
+ (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
static void m68hc11_elf_relax_delete_bytes
- PARAMS ((bfd *, asection *, bfd_vma, int));
+ (bfd *, asection *, bfd_vma, int);
static void m68hc11_relax_group
- PARAMS ((bfd *, asection *, bfd_byte *, unsigned,
- unsigned long, unsigned long));
-static int compare_reloc PARAMS ((const void *, const void *));
+ (bfd *, asection *, bfd_byte *, unsigned, unsigned long, unsigned long);
+static int compare_reloc (const void *, const void *);
/* Use REL instead of RELA to save space */
#define USE_REL 1
@@ -342,9 +341,8 @@ static const struct m68hc11_reloc_map m68hc11_reloc_map[] = {
};
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;
@@ -362,10 +360,8 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code)
/* Set the howto pointer for an M68HC11 ELF reloc. */
static void
-m68hc11_info_to_howto_rel (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
+m68hc11_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *cache_ptr, Elf_Internal_Rela *dst)
{
unsigned int r_type;
@@ -379,9 +375,7 @@ m68hc11_info_to_howto_rel (abfd, cache_ptr, dst)
/* Build a 68HC11 trampoline stub. */
static bfd_boolean
-m68hc11_elf_build_one_stub (gen_entry, in_arg)
- struct bfd_hash_entry *gen_entry;
- PTR in_arg;
+m68hc11_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
{
struct elf32_m68hc11_stub_hash_entry *stub_entry;
struct bfd_link_info *info;
@@ -443,9 +437,8 @@ m68hc11_elf_build_one_stub (gen_entry, in_arg)
we know stub section sizes. */
static bfd_boolean
-m68hc11_elf_size_one_stub (gen_entry, in_arg)
- struct bfd_hash_entry *gen_entry;
- PTR in_arg ATTRIBUTE_UNUSED;
+m68hc11_elf_size_one_stub (struct bfd_hash_entry *gen_entry,
+ void *in_arg ATTRIBUTE_UNUSED)
{
struct elf32_m68hc11_stub_hash_entry *stub_entry;
@@ -459,8 +452,7 @@ m68hc11_elf_size_one_stub (gen_entry, in_arg)
/* Create a 68HC11 ELF linker hash table. */
static struct bfd_link_hash_table *
-m68hc11_elf_bfd_link_hash_table_create (abfd)
- bfd *abfd;
+m68hc11_elf_bfd_link_hash_table_create (bfd *abfd)
{
struct m68hc11_elf_link_hash_table *ret;
@@ -533,9 +525,7 @@ find_relaxable_insn (unsigned char code)
}
static int
-compare_reloc (e1, e2)
- const void *e1;
- const void *e2;
+compare_reloc (const void *e1, const void *e2)
{
const Elf_Internal_Rela *i1 = (const Elf_Internal_Rela *) e1;
const Elf_Internal_Rela *i2 = (const Elf_Internal_Rela *) e2;
@@ -549,13 +539,9 @@ compare_reloc (e1, e2)
#define M6811_OP_LDX_IMMEDIATE (0xCE)
static void
-m68hc11_relax_group (abfd, sec, contents, value, offset, end_group)
- bfd *abfd;
- asection *sec;
- bfd_byte *contents;
- unsigned value;
- unsigned long offset;
- unsigned long end_group;
+m68hc11_relax_group (bfd *abfd, asection *sec, bfd_byte *contents,
+ unsigned value, unsigned long offset,
+ unsigned long end_group)
{
unsigned char code;
unsigned long start_offset;
@@ -665,11 +651,8 @@ m68hc11_relax_group (abfd, sec, contents, value, offset, end_group)
and somewhat more difficult to support. */
static bfd_boolean
-m68hc11_elf_relax_section (abfd, sec, link_info, again)
- bfd *abfd;
- asection *sec;
- struct bfd_link_info *link_info;
- bfd_boolean *again;
+m68hc11_elf_relax_section (bfd *abfd, asection *sec,
+ struct bfd_link_info *link_info, bfd_boolean *again)
{
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Shdr *shndx_hdr;
@@ -1121,11 +1104,8 @@ m68hc11_elf_relax_section (abfd, sec, link_info, again)
/* Delete some bytes from a section while relaxing. */
static void
-m68hc11_elf_relax_delete_bytes (abfd, sec, addr, count)
- bfd *abfd;
- asection *sec;
- bfd_vma addr;
- int count;
+m68hc11_elf_relax_delete_bytes (bfd *abfd, asection *sec,
+ bfd_vma addr, int count)
{
Elf_Internal_Shdr *symtab_hdr;
unsigned int sec_shndx;
@@ -1289,16 +1269,11 @@ m68hc11_elf_relax_delete_bytes (abfd, sec, addr, count)
vectors. */
static struct bfd_elf_special_section const elf32_m68hc11_special_sections[]=
{
- { ".eeprom", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".softregs", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".page0", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".vectors", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".eeprom", 7, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".softregs", 9, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".page0", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".vectors", 8, 0, SHT_PROGBITS, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
#define ELF_ARCH bfd_arch_m68hc11
diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c
index 3074935..cfc265e 100644
--- a/bfd/elf32-m68hc12.c
+++ b/bfd/elf32-m68hc12.c
@@ -30,17 +30,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Relocation functions. */
static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
+ (bfd *, bfd_reloc_code_real_type);
static void m68hc11_info_to_howto_rel
- PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+ (bfd *, arelent *, Elf_Internal_Rela *);
/* Trampoline generation. */
static bfd_boolean m68hc12_elf_size_one_stub
- PARAMS((struct bfd_hash_entry *gen_entry, PTR in_arg));
+ (struct bfd_hash_entry *gen_entry, void *in_arg);
static bfd_boolean m68hc12_elf_build_one_stub
- PARAMS((struct bfd_hash_entry *gen_entry, PTR in_arg));
+ (struct bfd_hash_entry *gen_entry, void *in_arg);
static struct bfd_link_hash_table* m68hc12_elf_bfd_link_hash_table_create
- PARAMS((bfd*));
+ (bfd*);
static bfd_boolean m68hc12_elf_set_mach_from_flags PARAMS ((bfd *));
@@ -390,9 +390,8 @@ static const struct m68hc11_reloc_map m68hc11_reloc_map[] = {
};
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;
@@ -410,10 +409,8 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code)
/* Set the howto pointer for an M68HC11 ELF reloc. */
static void
-m68hc11_info_to_howto_rel (abfd, cache_ptr, dst)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *cache_ptr;
- Elf_Internal_Rela *dst;
+m68hc11_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *cache_ptr, Elf_Internal_Rela *dst)
{
unsigned int r_type;
@@ -427,9 +424,7 @@ m68hc11_info_to_howto_rel (abfd, cache_ptr, dst)
/* Build a 68HC12 trampoline stub. */
static bfd_boolean
-m68hc12_elf_build_one_stub (gen_entry, in_arg)
- struct bfd_hash_entry *gen_entry;
- PTR in_arg;
+m68hc12_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
{
struct elf32_m68hc11_stub_hash_entry *stub_entry;
struct bfd_link_info *info;
@@ -483,9 +478,8 @@ m68hc12_elf_build_one_stub (gen_entry, in_arg)
we know stub section sizes. */
static bfd_boolean
-m68hc12_elf_size_one_stub (gen_entry, in_arg)
- struct bfd_hash_entry *gen_entry;
- PTR in_arg ATTRIBUTE_UNUSED;
+m68hc12_elf_size_one_stub (struct bfd_hash_entry *gen_entry,
+ void *in_arg ATTRIBUTE_UNUSED)
{
struct elf32_m68hc11_stub_hash_entry *stub_entry;
@@ -499,8 +493,7 @@ m68hc12_elf_size_one_stub (gen_entry, in_arg)
/* Create a 68HC12 ELF linker hash table. */
static struct bfd_link_hash_table *
-m68hc12_elf_bfd_link_hash_table_create (abfd)
- bfd *abfd;
+m68hc12_elf_bfd_link_hash_table_create (bfd *abfd)
{
struct m68hc11_elf_link_hash_table *ret;
@@ -515,8 +508,7 @@ m68hc12_elf_bfd_link_hash_table_create (abfd)
}
static bfd_boolean
-m68hc12_elf_set_mach_from_flags (abfd)
- bfd *abfd;
+m68hc12_elf_set_mach_from_flags (bfd *abfd)
{
flagword flags = elf_elfheader (abfd)->e_flags;
@@ -545,16 +537,11 @@ m68hc12_elf_set_mach_from_flags (abfd)
vectors. */
static struct bfd_elf_special_section const elf32_m68hc12_special_sections[]=
{
- { ".eeprom", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".softregs", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".page0", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".vectors", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".eeprom", 7, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".softregs", 9, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".page0", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".vectors", 8, 0, SHT_PROGBITS, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
#define ELF_ARCH bfd_arch_m68hc12
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 8d71cb6..709b8f4 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -33,31 +33,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
bfd_hash_lookup ((table), (string), (create), (copy)))
static struct elf32_m68hc11_stub_hash_entry* m68hc12_add_stub
- PARAMS((const char *stub_name,
- asection *section,
- struct m68hc11_elf_link_hash_table *htab));
+ (const char *stub_name,
+ asection *section,
+ struct m68hc11_elf_link_hash_table *htab);
static struct bfd_hash_entry *stub_hash_newfunc
- PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+ (struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
-static void m68hc11_elf_set_symbol
- PARAMS ((bfd* abfd, struct bfd_link_info *info,
- const char* name, bfd_vma value, asection* sec));
+static void m68hc11_elf_set_symbol (bfd* abfd, struct bfd_link_info *info,
+ const char* name, bfd_vma value,
+ asection* sec);
static bfd_boolean m68hc11_elf_export_one_stub
- PARAMS((struct bfd_hash_entry *gen_entry, PTR in_arg));
+ (struct bfd_hash_entry *gen_entry, void *in_arg);
static bfd_boolean m68hc11_get_relocation_value
- PARAMS ((bfd* abfd,
- struct bfd_link_info* info,
- asection **local_sections,
- Elf_Internal_Sym* local_syms,
- Elf_Internal_Rela* rel,
- const char** name,
- bfd_vma* relocation,
- bfd_boolean* is_far));
+ (bfd* abfd,
+ struct bfd_link_info* info,
+ asection **local_sections,
+ Elf_Internal_Sym* local_syms,
+ Elf_Internal_Rela* rel,
+ const char** name,
+ bfd_vma* relocation,
+ bfd_boolean* is_far);
-static void scan_sections_for_abi PARAMS ((bfd*, asection*, PTR));
+static void scan_sections_for_abi (bfd*, asection*, PTR);
struct m68hc11_scan_param
{
@@ -69,8 +69,7 @@ struct m68hc11_scan_param
/* Create a 68HC11/68HC12 ELF linker hash table. */
struct m68hc11_elf_link_hash_table*
-m68hc11_elf_hash_table_create (abfd)
- bfd *abfd;
+m68hc11_elf_hash_table_create (bfd *abfd)
{
struct m68hc11_elf_link_hash_table *ret;
bfd_size_type amt = sizeof (struct m68hc11_elf_link_hash_table);
@@ -109,8 +108,7 @@ m68hc11_elf_hash_table_create (abfd)
/* Free the derived linker hash table. */
void
-m68hc11_elf_bfd_link_hash_table_free (hash)
- struct bfd_link_hash_table *hash;
+m68hc11_elf_bfd_link_hash_table_free (struct bfd_link_hash_table *hash)
{
struct m68hc11_elf_link_hash_table *ret
= (struct m68hc11_elf_link_hash_table *) hash;
@@ -125,10 +123,8 @@ m68hc11_elf_bfd_link_hash_table_free (hash)
/* Initialize an entry in the stub hash table. */
static struct bfd_hash_entry *
-stub_hash_newfunc (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
+stub_hash_newfunc (struct bfd_hash_entry *entry, struct bfd_hash_table *table,
+ const char *string)
{
/* Allocate the structure if it has not already been allocated by a
subclass. */
@@ -161,10 +157,8 @@ stub_hash_newfunc (entry, table, string)
stub entry are initialised. */
static struct elf32_m68hc11_stub_hash_entry *
-m68hc12_add_stub (stub_name, section, htab)
- const char *stub_name;
- asection *section;
- struct m68hc11_elf_link_hash_table *htab;
+m68hc12_add_stub (const char *stub_name, asection *section,
+ struct m68hc11_elf_link_hash_table *htab)
{
struct elf32_m68hc11_stub_hash_entry *stub_entry;
@@ -195,14 +189,12 @@ m68hc12_add_stub (stub_name, section, htab)
the trampoline handler. */
bfd_boolean
-elf32_m68hc11_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
- bfd *abfd;
- struct bfd_link_info *info;
- const Elf_Internal_Sym *sym;
- const char **namep ATTRIBUTE_UNUSED;
- flagword *flagsp ATTRIBUTE_UNUSED;
- asection **secp ATTRIBUTE_UNUSED;
- bfd_vma *valp ATTRIBUTE_UNUSED;
+elf32_m68hc11_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
+ const Elf_Internal_Sym *sym,
+ const char **namep ATTRIBUTE_UNUSED,
+ flagword *flagsp ATTRIBUTE_UNUSED,
+ asection **secp ATTRIBUTE_UNUSED,
+ bfd_vma *valp ATTRIBUTE_UNUSED)
{
if (sym->st_other & STO_M68HC12_FAR)
{
@@ -234,9 +226,7 @@ elf32_m68hc11_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
0 when no stubs will be needed, and 1 on success. */
int
-elf32_m68hc11_setup_section_lists (output_bfd, info)
- bfd *output_bfd;
- struct bfd_link_info *info;
+elf32_m68hc11_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info)
{
bfd *input_bfd;
unsigned int bfd_count;
@@ -326,11 +316,9 @@ elf32_m68hc11_setup_section_lists (output_bfd, info)
instruction. */
bfd_boolean
-elf32_m68hc11_size_stubs (output_bfd, stub_bfd, info, add_stub_section)
- bfd *output_bfd;
- bfd *stub_bfd;
- struct bfd_link_info *info;
- asection * (*add_stub_section) PARAMS ((const char *, asection *));
+elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd,
+ struct bfd_link_info *info,
+ asection * (*add_stub_section) (const char*, asection*))
{
bfd *input_bfd;
asection *section;
@@ -571,9 +559,7 @@ elf32_m68hc11_size_stubs (output_bfd, stub_bfd, info, add_stub_section)
/* Export the trampoline addresses in the symbol table. */
static bfd_boolean
-m68hc11_elf_export_one_stub (gen_entry, in_arg)
- struct bfd_hash_entry *gen_entry;
- PTR in_arg;
+m68hc11_elf_export_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
{
struct bfd_link_info *info;
struct m68hc11_elf_link_hash_table *htab;
@@ -603,12 +589,8 @@ m68hc11_elf_export_one_stub (gen_entry, in_arg)
/* Export a symbol or set its value and section. */
static void
-m68hc11_elf_set_symbol (abfd, info, name, value, sec)
- bfd* abfd;
- struct bfd_link_info *info;
- const char* name;
- bfd_vma value;
- asection* sec;
+m68hc11_elf_set_symbol (bfd *abfd, struct bfd_link_info *info,
+ const char *name, bfd_vma value, asection *sec)
{
struct elf_link_hash_entry *h;
@@ -639,9 +621,7 @@ m68hc11_elf_set_symbol (abfd, info, name, value, sec)
linker. */
bfd_boolean
-elf32_m68hc11_build_stubs (abfd, info)
- bfd* abfd;
- struct bfd_link_info *info;
+elf32_m68hc11_build_stubs (bfd *abfd, struct bfd_link_info *info)
{
asection *stub_sec;
struct bfd_hash_table *table;
@@ -694,8 +674,7 @@ elf32_m68hc11_build_stubs (abfd, info)
}
void
-m68hc11_elf_get_bank_parameters (info)
- struct bfd_link_info *info;
+m68hc11_elf_get_bank_parameters (struct bfd_link_info *info)
{
unsigned i;
struct m68hc11_page_info *pinfo;
@@ -755,9 +734,7 @@ m68hc11_elf_get_bank_parameters (info)
/* Return 1 if the address is in banked memory.
This can be applied to a virtual address and to a physical address. */
int
-m68hc11_addr_is_banked (pinfo, addr)
- struct m68hc11_page_info *pinfo;
- bfd_vma addr;
+m68hc11_addr_is_banked (struct m68hc11_page_info *pinfo, bfd_vma addr)
{
if (addr >= pinfo->bank_virtual)
return 1;
@@ -771,9 +748,7 @@ m68hc11_addr_is_banked (pinfo, addr)
/* Return the physical address seen by the processor, taking
into account banked memory. */
bfd_vma
-m68hc11_phys_addr (pinfo, addr)
- struct m68hc11_page_info *pinfo;
- bfd_vma addr;
+m68hc11_phys_addr (struct m68hc11_page_info *pinfo, bfd_vma addr)
{
if (addr < pinfo->bank_virtual)
return addr;
@@ -787,9 +762,7 @@ m68hc11_phys_addr (pinfo, addr)
/* Return the page number corresponding to an address in banked memory. */
bfd_vma
-m68hc11_phys_page (pinfo, addr)
- struct m68hc11_page_info *pinfo;
- bfd_vma addr;
+m68hc11_phys_page (struct m68hc11_page_info *pinfo, bfd_vma addr)
{
if (addr < pinfo->bank_virtual)
return 0;
@@ -805,15 +778,13 @@ m68hc11_phys_page (pinfo, addr)
which the linker should otherwise ignore. */
bfd_reloc_status_type
-m68hc11_elf_ignore_reloc (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+m68hc11_elf_ignore_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void *data ATTRIBUTE_UNUSED,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
if (output_bfd != NULL)
reloc_entry->address += input_section->output_offset;
@@ -821,15 +792,13 @@ m68hc11_elf_ignore_reloc (abfd, reloc_entry, symbol, data, input_section,
}
bfd_reloc_status_type
-m68hc11_elf_special_reloc (abfd, reloc_entry, symbol, data, input_section,
- output_bfd, error_message)
- bfd *abfd ATTRIBUTE_UNUSED;
- arelent *reloc_entry;
- asymbol *symbol;
- PTR data ATTRIBUTE_UNUSED;
- asection *input_section;
- bfd *output_bfd;
- char **error_message ATTRIBUTE_UNUSED;
+m68hc11_elf_special_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void *data ATTRIBUTE_UNUSED,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message ATTRIBUTE_UNUSED)
{
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
@@ -850,12 +819,11 @@ m68hc11_elf_special_reloc (abfd, reloc_entry, symbol, data, input_section,
}
asection *
-elf32_m68hc11_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_m68hc11_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)
{
@@ -883,11 +851,10 @@ elf32_m68hc11_gc_mark_hook (sec, info, rel, h, sym)
}
bfd_boolean
-elf32_m68hc11_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_m68hc11_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 68hc11/68hc12. */
return TRUE;
@@ -898,11 +865,8 @@ elf32_m68hc11_gc_sweep_hook (abfd, info, sec, relocs)
virtual table relocs for gc. */
bfd_boolean
-elf32_m68hc11_check_relocs (abfd, info, sec, relocs)
- bfd * abfd;
- struct bfd_link_info * info;
- asection * sec;
- const Elf_Internal_Rela * relocs;
+elf32_m68hc11_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;
@@ -955,17 +919,12 @@ elf32_m68hc11_check_relocs (abfd, info, sec, relocs)
}
static bfd_boolean
-m68hc11_get_relocation_value (abfd, info, local_sections, local_syms,
- rel, name,
- relocation, is_far)
- bfd *abfd;
- struct bfd_link_info *info;
- asection **local_sections;
- Elf_Internal_Sym* local_syms;
- Elf_Internal_Rela* rel;
- const char** name;
- bfd_vma* relocation;
- bfd_boolean* is_far;
+m68hc11_get_relocation_value (bfd *abfd, struct bfd_link_info *info,
+ asection **local_sections,
+ Elf_Internal_Sym *local_syms,
+ Elf_Internal_Rela *rel,
+ const char **name,
+ bfd_vma *relocation, bfd_boolean *is_far)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -1056,16 +1015,12 @@ m68hc11_get_relocation_value (abfd, info, local_sections, local_syms,
/* Relocate a 68hc11/68hc12 ELF section. */
bfd_boolean
-elf32_m68hc11_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_m68hc11_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;
@@ -1289,9 +1244,7 @@ elf32_m68hc11_relocate_section (output_bfd, info, input_bfd, input_section,
/* Set and control ELF flags in ELF header. */
bfd_boolean
-_bfd_m68hc11_elf_set_private_flags (abfd, flags)
- bfd *abfd;
- flagword flags;
+_bfd_m68hc11_elf_set_private_flags (bfd *abfd, flagword flags)
{
BFD_ASSERT (!elf_flags_init (abfd)
|| elf_elfheader (abfd)->e_flags == flags);
@@ -1305,9 +1258,7 @@ _bfd_m68hc11_elf_set_private_flags (abfd, flags)
object file when linking. */
bfd_boolean
-_bfd_m68hc11_elf_merge_private_bfd_data (ibfd, obfd)
- bfd *ibfd;
- bfd *obfd;
+_bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
{
flagword old_flags;
flagword new_flags;
@@ -1375,8 +1326,8 @@ _bfd_m68hc11_elf_merge_private_bfd_data (ibfd, obfd)
elf_elfheader (obfd)->e_flags = new_flags;
- new_flags &= ~EF_M68HC11_ABI;
- old_flags &= ~EF_M68HC11_ABI;
+ new_flags &= ~(EF_M68HC11_ABI | EF_M68HC11_MACH_MASK);
+ old_flags &= ~(EF_M68HC11_ABI | EF_M68HC11_MACH_MASK);
/* Warn about any other mismatches */
if (new_flags != old_flags)
@@ -1398,9 +1349,7 @@ _bfd_m68hc11_elf_merge_private_bfd_data (ibfd, obfd)
}
bfd_boolean
-_bfd_m68hc11_elf_print_private_bfd_data (abfd, ptr)
- bfd *abfd;
- PTR ptr;
+_bfd_m68hc11_elf_print_private_bfd_data (bfd *abfd, void *ptr)
{
FILE *file = (FILE *) ptr;
@@ -1439,10 +1388,8 @@ _bfd_m68hc11_elf_print_private_bfd_data (abfd, ptr)
return TRUE;
}
-static void scan_sections_for_abi (abfd, asect, arg)
- bfd* abfd ATTRIBUTE_UNUSED;
- asection* asect;
- PTR arg;
+static void scan_sections_for_abi (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *asect, void *arg)
{
struct m68hc11_scan_param* p = (struct m68hc11_scan_param*) arg;
@@ -1453,9 +1400,7 @@ static void scan_sections_for_abi (abfd, asect, arg)
/* Tweak the OSABI field of the elf header. */
void
-elf32_m68hc11_post_process_headers (abfd, link_info)
- bfd *abfd;
- struct bfd_link_info *link_info;
+elf32_m68hc11_post_process_headers (bfd *abfd, struct bfd_link_info *link_info)
{
struct m68hc11_scan_param param;
diff --git a/bfd/elf32-m68hc1x.h b/bfd/elf32-m68hc1x.h
index c5e9372..5964023 100644
--- a/bfd/elf32-m68hc1x.h
+++ b/bfd/elf32-m68hc1x.h
@@ -32,9 +32,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define BFD_M68HC11_BANK_VIRTUAL_NAME "__bank_virtual"
/* Set and control ELF flags in ELF header. */
-extern bfd_boolean _bfd_m68hc11_elf_merge_private_bfd_data PARAMS ((bfd*,bfd*));
-extern bfd_boolean _bfd_m68hc11_elf_set_private_flags PARAMS ((bfd*,flagword));
-extern bfd_boolean _bfd_m68hc11_elf_print_private_bfd_data PARAMS ((bfd*,PTR));
+extern bfd_boolean _bfd_m68hc11_elf_merge_private_bfd_data (bfd*,bfd*);
+extern bfd_boolean _bfd_m68hc11_elf_set_private_flags (bfd*,flagword);
+extern bfd_boolean _bfd_m68hc11_elf_print_private_bfd_data (bfd*, void*);
/* This hash entry is used to record a trampoline that must be generated
to call a far function using a normal calling convention ('jsr').
@@ -122,8 +122,8 @@ struct m68hc11_elf_link_hash_table
/* Small local sym to section mapping cache. */
struct sym_sec_cache sym_sec;
- bfd_boolean (* size_one_stub) PARAMS((struct bfd_hash_entry*, PTR));
- bfd_boolean (* build_one_stub) PARAMS((struct bfd_hash_entry*, PTR));
+ bfd_boolean (* size_one_stub) PARAMS((struct bfd_hash_entry*, void*));
+ bfd_boolean (* build_one_stub) PARAMS((struct bfd_hash_entry*, void*));
};
/* Get the Sparc64 ELF linker hash table from a link_info structure. */
@@ -134,71 +134,63 @@ struct m68hc11_elf_link_hash_table
/* Create a 68HC11/68HC12 ELF linker hash table. */
extern struct m68hc11_elf_link_hash_table* m68hc11_elf_hash_table_create
- PARAMS ((bfd*));
-extern void m68hc11_elf_bfd_link_hash_table_free
- PARAMS ((struct bfd_link_hash_table*));
+ (bfd*);
+extern void m68hc11_elf_bfd_link_hash_table_free (struct bfd_link_hash_table*);
-extern void m68hc11_elf_get_bank_parameters
- PARAMS ((struct bfd_link_info*));
+extern void m68hc11_elf_get_bank_parameters (struct bfd_link_info*);
/* Return 1 if the address is in banked memory.
This can be applied to a virtual address and to a physical address. */
-extern int m68hc11_addr_is_banked
- PARAMS ((struct m68hc11_page_info*, bfd_vma));
+extern int m68hc11_addr_is_banked (struct m68hc11_page_info*, bfd_vma);
/* Return the physical address seen by the processor, taking
into account banked memory. */
-extern bfd_vma m68hc11_phys_addr
- PARAMS ((struct m68hc11_page_info*, bfd_vma));
+extern bfd_vma m68hc11_phys_addr (struct m68hc11_page_info*, bfd_vma);
/* Return the page number corresponding to an address in banked memory. */
-extern bfd_vma m68hc11_phys_page
- PARAMS ((struct m68hc11_page_info*, bfd_vma));
+extern bfd_vma m68hc11_phys_page (struct m68hc11_page_info*, bfd_vma);
bfd_reloc_status_type m68hc11_elf_ignore_reloc
- PARAMS ((bfd *abfd, arelent *reloc_entry,
- asymbol *symbol, PTR data, asection *input_section,
- bfd *output_bfd, char **error_message));
+ (bfd *abfd, arelent *reloc_entry,
+ asymbol *symbol, void *data, asection *input_section,
+ bfd *output_bfd, char **error_message);
bfd_reloc_status_type m68hc11_elf_special_reloc
- PARAMS ((bfd *abfd, arelent *reloc_entry,
- asymbol *symbol, PTR data, asection *input_section,
- bfd *output_bfd, char **error_message));
+ (bfd *abfd, arelent *reloc_entry,
+ asymbol *symbol, void *data, asection *input_section,
+ bfd *output_bfd, char **error_message);
/* GC mark and sweep. */
asection *elf32_m68hc11_gc_mark_hook
- PARAMS ((asection *sec, struct bfd_link_info *info,
- Elf_Internal_Rela *rel, struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym));
+ (asection *sec, struct bfd_link_info *info,
+ Elf_Internal_Rela *rel, struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym);
bfd_boolean elf32_m68hc11_gc_sweep_hook
- PARAMS ((bfd *abfd, struct bfd_link_info *info,
- asection *sec, const Elf_Internal_Rela *relocs));
+ (bfd *abfd, struct bfd_link_info *info,
+ asection *sec, const Elf_Internal_Rela *relocs);
bfd_boolean elf32_m68hc11_check_relocs
- PARAMS ((bfd * abfd, struct bfd_link_info * info,
- asection * sec, const Elf_Internal_Rela * relocs));
+ (bfd * abfd, struct bfd_link_info * info,
+ asection * sec, const Elf_Internal_Rela * relocs);
bfd_boolean elf32_m68hc11_relocate_section
- PARAMS ((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));
+ (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);
bfd_boolean elf32_m68hc11_add_symbol_hook
- PARAMS ((bfd *abfd, struct bfd_link_info *info,
- const Elf_Internal_Sym *sym, const char **namep,
- flagword *flagsp, asection **secp,
- bfd_vma *valp));
+ (bfd *abfd, struct bfd_link_info *info,
+ const Elf_Internal_Sym *sym, const char **namep,
+ flagword *flagsp, asection **secp,
+ bfd_vma *valp);
/* Tweak the OSABI field of the elf header. */
-extern void elf32_m68hc11_post_process_headers
- PARAMS ((bfd*, struct bfd_link_info*));
+extern void elf32_m68hc11_post_process_headers (bfd*, struct bfd_link_info*);
-int elf32_m68hc11_setup_section_lists
- PARAMS ((bfd *, struct bfd_link_info *));
+int elf32_m68hc11_setup_section_lists (bfd *, struct bfd_link_info *);
bfd_boolean elf32_m68hc11_size_stubs
- PARAMS ((bfd *, bfd *, struct bfd_link_info *,
- asection * (*) PARAMS ((const char *, asection *))));
+ (bfd *, bfd *, struct bfd_link_info *,
+ asection * (*) (const char *, asection *));
-bfd_boolean elf32_m68hc11_build_stubs
- PARAMS ((bfd* abfd, struct bfd_link_info *));
+bfd_boolean elf32_m68hc11_build_stubs (bfd* abfd, struct bfd_link_info *);
#endif
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 7688bfd..90609c5 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -1127,7 +1127,7 @@ elf_m68k_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (!info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -1403,7 +1403,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else
{
@@ -1657,16 +1657,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
{
long indx;
- if (h == NULL)
- sec = local_sections[r_symndx];
- else
- {
- BFD_ASSERT (h->root.type == bfd_link_hash_defined
- || (h->root.type
- == bfd_link_hash_defweak));
- sec = h->root.u.def.section;
- }
- if (sec != NULL && bfd_is_abs_section (sec))
+ if (bfd_is_abs_section (sec))
indx = 0;
else if (sec == NULL || sec->owner == NULL)
{
diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c
index 3f878cf..6992a3d 100644
--- a/bfd/elf32-mcore.c
+++ b/bfd/elf32-mcore.c
@@ -467,7 +467,7 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections [r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
addend = rel->r_addend;
}
else
@@ -683,12 +683,9 @@ mcore_elf_check_relocs (abfd, info, sec, relocs)
static struct bfd_elf_special_section const mcore_elf_special_sections[]=
{
- { ".ctors", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".dtors", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".ctors", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".dtors", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
#define TARGET_BIG_SYM bfd_elf32_mcore_big_vec
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index e495cc4..b17008e 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -1940,7 +1940,6 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
#define elf_backend_ecoff_debug_swap &mips_elf32_ecoff_debug_swap
#define elf_backend_got_header_size (4 * MIPS_RESERVED_GOTNO)
-#define elf_backend_plt_header_size 0
#define elf_backend_may_use_rel_p 1
#define elf_backend_may_use_rela_p 0
#define elf_backend_default_use_rela_p 0
diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c
index b09ef87..306a798 100644
--- a/bfd/elf32-msp430.c
+++ b/bfd/elf32-msp430.c
@@ -449,7 +449,7 @@ elf32_msp430_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
diff --git a/bfd/elf32-openrisc.c b/bfd/elf32-openrisc.c
index a9b6d1d..62f86d4 100644
--- a/bfd/elf32-openrisc.c
+++ b/bfd/elf32-openrisc.c
@@ -375,7 +375,7 @@ openrisc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 3bffc70..e2de01e 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -205,9 +205,6 @@ struct ppc_elf_link_hash_table
elf_linker_section_t *sdata2;
asection *sbss;
- /* Short-cut to first output tls section. */
- asection *tls_sec;
-
/* Shortcut to .__tls_get_addr. */
struct elf_link_hash_entry *tls_get_addr;
@@ -1534,19 +1531,33 @@ static reloc_howto_type ppc_elf_howto_raw[] = {
0xffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* Phony reloc to handle branch stubs. */
- HOWTO (R_PPC_RELAX32, /* type */
- 0, /* rightshift */
- 0, /* size */
+ /* Phony relocs to handle branch stubs. */
+ HOWTO (R_PPC_RELAX32, /* type */
+ 0, /* rightshift */
+ 0, /* size */
0, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_dont, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "R_PPC_RELAX32", /* name */
+ "R_PPC_RELAX32", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0, /* dst_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_PPC_RELAX32PC, /* type */
+ 0, /* rightshift */
+ 0, /* size */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC_RELAX32PC", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
FALSE), /* pcrel_offset */
/* GNU extension to record C++ vtable hierarchy. */
@@ -1614,90 +1625,26 @@ ppc_elf_howto_init (void)
}
}
-static bfd_reloc_status_type
-ppc_elf_install_value (bfd *abfd,
- bfd_byte *hit_addr,
- bfd_vma v,
- unsigned int r_type)
-{
- bfd_vma t0, t1;
-#ifdef BFD_HOST_U_64_BIT
- BFD_HOST_U_64_BIT val = (BFD_HOST_U_64_BIT) v;
-#else
- bfd_vma val = v;
-#endif
-
- switch (r_type)
- {
- case R_PPC_RELAX32:
- /* Do stuff here. */
- t0 = bfd_get_32 (abfd, hit_addr);
- t1 = bfd_get_32 (abfd, hit_addr + 4);
-
- /* We're clearing the bits for R_PPC_ADDR16_HA
- and R_PPC_ADDR16_LO here. */
- t0 &= ~0xffff;
- t1 &= ~0xffff;
-
- /* t0 is HA, t1 is lo */
- t0 |= ((val + 0x8000) >> 16) & 0xffff;
- t1 |= val & 0xffff;
-
- bfd_put_32 (abfd, t0, hit_addr);
- bfd_put_32 (abfd, t1, hit_addr + 4);
- break;
-
- case R_PPC_REL24:
- t0 = bfd_get_32 (abfd, hit_addr);
- t0 &= ~0x3fffffc;
- t0 |= val & 0x3fffffc;
- bfd_put_32 (abfd, t0, hit_addr);
- break;
-
- case R_PPC_REL14:
- case R_PPC_REL14_BRTAKEN:
- case R_PPC_REL14_BRNTAKEN:
- t0 = bfd_get_32 (abfd, hit_addr);
- t0 &= ~0xfffc;
- t0 |= val & 0xfffc;
- bfd_put_32 (abfd, t0, hit_addr);
- break;
-
- case R_PPC_LOCAL24PC:
- case R_PPC_PLTREL24:
- t0 = bfd_get_32 (abfd, hit_addr);
- t0 &= ~0x3fffffc;
- t0 |= val & 0x3fffffc;
- bfd_put_32 (abfd, t0, hit_addr);
- break;
-
- default:
- return bfd_reloc_notsupported;
- }
-
- return bfd_reloc_ok;
-}
+#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
-static const bfd_byte shared_stub_entry[] =
+static const int shared_stub_entry[] =
{
- 0x48, 0x00, 0x00, 0x24, /* b .+36 */
- 0x7c, 0x08, 0x02, 0xa6, /* mflr 0 */
- 0x42, 0x9f, 0x00, 0x05, /* bcl 20, 31, .Lxxx */
- 0x7d, 0x68, 0x02, 0xa6, /* mflr 11 */
- 0x3d, 0x60, 0x00, 0x00, /* addis 11, 11, (xxx-.Lxxx)@ha */
- 0x39, 0x6b, 0x00, 0x18, /* addi 11, 11, (xxx-.Lxxx)@l */
- 0x7c, 0x08, 0x03, 0xa6, /* mtlr 0 */
- 0x7d, 0x69, 0x03, 0xa6, /* mtctr 11 */
- 0x4e, 0x80, 0x04, 0x20, /* bctr */
+ 0x7c0802a6, /* mflr 0 */
+ 0x429f0005, /* bcl 20, 31, .Lxxx */
+ 0x7d6802a6, /* mflr 11 */
+ 0x3d6b0000, /* addis 11, 11, (xxx-.Lxxx)@ha */
+ 0x396b0018, /* addi 11, 11, (xxx-.Lxxx)@l */
+ 0x7c0803a6, /* mtlr 0 */
+ 0x7d6903a6, /* mtctr 11 */
+ 0x4e800420, /* bctr */
};
-static const bfd_byte stub_entry[] =
+static const int stub_entry[] =
{
- 0x48, 0x00, 0x00, 0x14, /* b .+20 */
- 0x3d, 0x60, 0x00, 0x00, /* lis 11,xxx@ha */
- 0x39, 0x6b, 0x00, 0x00, /* addi 11,11,xxx@l */
- 0x7d, 0x69, 0x03, 0xa6, /* mtctr 11 */
- 0x4e, 0x80, 0x04, 0x20, /* bctr */
+ 0x3d600000, /* lis 11,xxx@ha */
+ 0x396b0000, /* addi 11,11,xxx@l */
+ 0x7d6903a6, /* mtctr 11 */
+ 0x4e800420, /* bctr */
};
@@ -1721,9 +1668,9 @@ ppc_elf_relax_section (bfd *abfd,
Elf_Internal_Rela *internal_relocs = NULL;
Elf_Internal_Rela *irel, *irelend;
struct one_fixup *fixups = NULL;
- bfd_boolean changed_contents = FALSE;
- bfd_boolean changed_relocs = FALSE;
+ bfd_boolean changed;
struct ppc_elf_link_hash_table *ppc_info;
+ bfd_size_type trampoff;
*again = FALSE;
@@ -1738,6 +1685,10 @@ ppc_elf_relax_section (bfd *abfd,
if (isec->_cooked_size == 0)
isec->_cooked_size = isec->_raw_size;
+ trampoff = (isec->_cooked_size + 3) & (bfd_vma) -4;
+ /* Space for a branch around any trampolines. */
+ trampoff += 4;
+
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* Get a copy of the native relocations. */
@@ -1767,21 +1718,26 @@ ppc_elf_relax_section (bfd *abfd,
for (irel = internal_relocs; irel < irelend; irel++)
{
unsigned long r_type = ELF32_R_TYPE (irel->r_info);
- bfd_vma symaddr, reladdr, trampoff, toff, roff;
+ bfd_vma symaddr, reladdr, toff, roff;
asection *tsec;
- bfd_size_type amt;
struct one_fixup *f;
size_t insn_offset = 0;
- bfd_vma max_branch_offset;
+ bfd_vma max_branch_offset, val;
+ bfd_byte *hit_addr;
+ unsigned long t0;
switch (r_type)
{
case R_PPC_REL24:
case R_PPC_LOCAL24PC:
+ case R_PPC_PLTREL24:
+ max_branch_offset = 1 << 25;
+ break;
+
case R_PPC_REL14:
case R_PPC_REL14_BRTAKEN:
case R_PPC_REL14_BRNTAKEN:
- case R_PPC_PLTREL24:
+ max_branch_offset = 1 << 15;
break;
default:
@@ -1819,7 +1775,7 @@ ppc_elf_relax_section (bfd *abfd,
}
else
{
- /* Need dynamic symbol handling. */
+ /* Global symbol handling. */
unsigned long indx;
struct elf_link_hash_entry *h;
@@ -1830,62 +1786,34 @@ ppc_elf_relax_section (bfd *abfd,
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if (r_type == R_PPC_PLTREL24)
+ if (r_type == R_PPC_PLTREL24
+ && ppc_info->plt != NULL
+ && h->plt.offset != (bfd_vma) -1)
{
- Elf_Internal_Sym *isym;
-
- if (h->plt.offset == (bfd_vma) -1
- || ppc_info->plt == NULL)
- {
-
- /* Read this BFD's local symbols. */
- if (isymbuf == NULL)
- {
- 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 == 0)
- goto error_return;
- }
- isym = isymbuf + ELF32_R_SYM (irel->r_info);
-
- if (isym->st_shndx == SHN_UNDEF)
- /* We can't do anthing with undefined symbols. */
- continue;
- else if (isym->st_shndx == SHN_ABS)
- tsec = bfd_abs_section_ptr;
- else if (isym->st_shndx == SHN_COMMON)
- tsec = bfd_com_section_ptr;
- else
- tsec = h->root.u.def.section;
-
- toff = h->root.u.def.value;
- }
- else
- {
- tsec = ppc_info->plt;
- toff = h->plt.offset;
- }
+ tsec = ppc_info->plt;
+ toff = h->plt.offset;
}
- else if (h->root.type == bfd_link_hash_undefined
- || h->root.type == bfd_link_hash_undefweak)
- continue;
-
- else
+ else if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
{
tsec = h->root.u.def.section;
toff = h->root.u.def.value;
}
+ else
+ continue;
}
+ /* If the branch and target are in the same section, you have
+ no hope of adding stubs. We'll error out later should the
+ branch overflow. */
+ 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 + irel->r_addend, 0);
- else
- toff += irel->r_addend;
+ toff, 0);
symaddr = tsec->output_section->vma + tsec->output_offset + toff;
@@ -1893,22 +1821,10 @@ ppc_elf_relax_section (bfd *abfd,
reladdr = (isec->output_section->vma
+ isec->output_offset
- + roff) & (bfd_vma) -4;
+ + roff);
/* If the branch is in range, no need to do anything. */
- max_branch_offset = 1 << 25;
- if (r_type != R_PPC_REL24
- && r_type != R_PPC_LOCAL24PC
- && r_type != R_PPC_PLTREL24)
- max_branch_offset = 1 << 15;
-
- if ((bfd_vma) (symaddr - reladdr) + max_branch_offset
- <= 2 * max_branch_offset)
- continue;
-
- /* If the branch and target are in the same section, you have
- no hope. We'll error out later. */
- if (tsec == isec)
+ if (symaddr - reladdr + max_branch_offset < 2 * max_branch_offset)
continue;
/* Look for an existing fixup to this address. */
@@ -1919,40 +1835,31 @@ ppc_elf_relax_section (bfd *abfd,
if (f == NULL)
{
size_t size;
+ unsigned long stub_rtype;
+
+ val = trampoff - roff;
+ if (val >= max_branch_offset)
+ /* Oh dear, we can't reach a trampoline. Don't try to add
+ one. We'll report an error later. */
+ continue;
- if (link_info->shared
- || tsec == ppc_info->plt
- || r_type == R_PPC_LOCAL24PC)
+ if (link_info->shared)
{
- size = sizeof (shared_stub_entry);
- insn_offset = 16;
+ size = 4 * ARRAY_SIZE (shared_stub_entry);
+ insn_offset = 12;
+ stub_rtype = R_PPC_RELAX32PC;
}
else
{
- size = sizeof (stub_entry);
- insn_offset = 4;
+ size = 4 * ARRAY_SIZE (stub_entry);
+ insn_offset = 0;
+ stub_rtype = R_PPC_RELAX32;
}
- /* Resize the current section to make room for the new branch. */
- trampoff = (isec->_cooked_size + 3) & (bfd_vma) - 4;
- amt = trampoff + size;
- contents = bfd_realloc (contents, amt);
- if (contents == NULL)
- abort ();
-
- isec->_cooked_size = amt;
-
- if (link_info->shared
- || tsec == ppc_info->plt
- || r_type == R_PPC_LOCAL24PC)
- memcpy (contents + trampoff, shared_stub_entry, size);
- else
- memcpy (contents + trampoff, stub_entry, size);
-
/* Hijack the old relocation. Since we need two
relocations for this use a "composite" reloc. */
irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
- R_PPC_RELAX32);
+ stub_rtype);
irel->r_offset = trampoff + insn_offset;
/* Record the fixup so we don't do it again this section. */
@@ -1962,31 +1869,95 @@ ppc_elf_relax_section (bfd *abfd,
f->toff = toff;
f->trampoff = trampoff;
fixups = f;
+
+ trampoff += size;
}
else
{
+ val = f->trampoff - roff;
+ if (val >= max_branch_offset)
+ continue;
+
/* Nop out the reloc, since we're finalizing things here. */
irel->r_info = ELF32_R_INFO (0, R_PPC_NONE);
}
- /* Fix up the existing branch to hit the trampoline. Hope like
- hell this doesn't overflow too. */
- if (ppc_elf_install_value (abfd, contents + roff,
- f->trampoff - (roff & (bfd_vma) -3) + 4,
- r_type) != bfd_reloc_ok)
- abort ();
+ /* Fix up the existing branch to hit the trampoline. */
+ hit_addr = contents + roff;
+ switch (r_type)
+ {
+ case R_PPC_REL24:
+ case R_PPC_LOCAL24PC:
+ case R_PPC_PLTREL24:
+ t0 = bfd_get_32 (abfd, hit_addr);
+ t0 &= ~0x3fffffc;
+ t0 |= val & 0x3fffffc;
+ bfd_put_32 (abfd, t0, hit_addr);
+ break;
- changed_contents = TRUE;
- changed_relocs = TRUE;
+ case R_PPC_REL14:
+ case R_PPC_REL14_BRTAKEN:
+ case R_PPC_REL14_BRNTAKEN:
+ t0 = bfd_get_32 (abfd, hit_addr);
+ t0 &= ~0xfffc;
+ t0 |= val & 0xfffc;
+ bfd_put_32 (abfd, t0, hit_addr);
+ break;
+ }
}
- /* Clean up. */
- while (fixups)
+ /* Write out the trampolines. */
+ changed = fixups != NULL;
+ if (fixups != NULL)
{
- struct one_fixup *f = fixups;
- fixups = fixups->next;
- free (f);
+ const int *stub;
+ bfd_byte *dest;
+ bfd_vma val;
+ int i, size;
+
+ do
+ {
+ struct one_fixup *f = fixups;
+ fixups = fixups->next;
+ free (f);
+ }
+ while (fixups);
+
+ contents = bfd_realloc (contents, trampoff);
+ if (contents == NULL)
+ goto error_return;
+
+ isec->_cooked_size = (isec->_cooked_size + 3) & (bfd_vma) -4;
+ /* Branch around the trampolines. */
+ val = trampoff - isec->_cooked_size + 0x48000000;
+ dest = contents + isec->_cooked_size;
+ isec->_cooked_size = trampoff;
+ bfd_put_32 (abfd, val, dest);
+ dest += 4;
+
+ if (link_info->shared)
+ {
+ stub = shared_stub_entry;
+ size = ARRAY_SIZE (shared_stub_entry);
+ }
+ else
+ {
+ stub = stub_entry;
+ size = ARRAY_SIZE (stub_entry);
+ }
+
+ i = 0;
+ while (dest < contents + trampoff)
+ {
+ bfd_put_32 (abfd, stub[i], dest);
+ i++;
+ if (i == size)
+ i = 0;
+ dest += 4;
+ }
+ BFD_ASSERT (i == 0);
}
+
if (isymbuf != NULL
&& symtab_hdr->contents != (unsigned char *) isymbuf)
{
@@ -2002,7 +1973,7 @@ ppc_elf_relax_section (bfd *abfd,
if (contents != NULL
&& elf_section_data (isec)->this_hdr.contents != contents)
{
- if (!changed_contents && !link_info->keep_memory)
+ if (!changed && !link_info->keep_memory)
free (contents);
else
{
@@ -2013,13 +1984,13 @@ ppc_elf_relax_section (bfd *abfd,
if (elf_section_data (isec)->relocs != internal_relocs)
{
- if (!changed_relocs)
+ if (!changed)
free (internal_relocs);
else
elf_section_data (isec)->relocs = internal_relocs;
}
- *again = changed_contents || changed_relocs;
+ *again = changed;
return TRUE;
error_return:
@@ -4184,25 +4155,18 @@ ppc_elf_gc_sweep_hook (bfd *abfd,
return TRUE;
}
-/* Set htab->tls_sec and htab->tls_get_addr. */
+/* Set htab->tls_get_addr and call the generic ELF tls_setup function. */
-bfd_boolean
+asection *
ppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info)
{
- asection *tls;
struct ppc_elf_link_hash_table *htab;
htab = ppc_elf_hash_table (info);
htab->tls_get_addr = elf_link_hash_lookup (&htab->elf, "__tls_get_addr",
FALSE, FALSE, TRUE);
- for (tls = obfd->sections; tls != NULL; tls = tls->next)
- if ((tls->flags & (SEC_THREAD_LOCAL | SEC_LOAD))
- == (SEC_THREAD_LOCAL | SEC_LOAD))
- break;
- htab->tls_sec = tls;
-
- return tls != NULL;
+ return _bfd_elf_tls_setup (obfd, info);
}
/* Run through all the TLS relocs looking for optimization
@@ -4725,7 +4689,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
sec = local_sections[r_symndx];
sym_name = bfd_elf_local_sym_name (input_bfd, sym);
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else
{
@@ -4733,7 +4697,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
symtab_hdr, relocation, sec,
unresolved_reloc, info,
warned);
-
+
sym_name = h->root.root.string;
}
@@ -4917,8 +4881,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
{
/* Was an LD reloc. */
r_symndx = 0;
- rel->r_addend = htab->tls_sec->vma + DTP_OFFSET;
- rel[1].r_addend = htab->tls_sec->vma + DTP_OFFSET;
+ rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET;
+ rel[1].r_addend = htab->elf.tls_sec->vma + DTP_OFFSET;
}
r_type = R_PPC_TPREL16_HA;
rel->r_info = ELF32_R_INFO (r_symndx, r_type);
@@ -5156,7 +5120,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
{
outrel.r_addend += relocation;
if (tls_ty & (TLS_GD | TLS_DTPREL | TLS_TPREL))
- outrel.r_addend -= htab->tls_sec->vma;
+ outrel.r_addend -= htab->elf.tls_sec->vma;
}
loc = htab->relgot->contents;
loc += (htab->relgot->reloc_count++
@@ -5174,7 +5138,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
value = 1;
else if (tls_ty != 0)
{
- value -= htab->tls_sec->vma + DTP_OFFSET;
+ value -= htab->elf.tls_sec->vma + DTP_OFFSET;
if (tls_ty == (TLS_TLS | TLS_TPREL))
value += DTP_OFFSET - TP_OFFSET;
@@ -5262,7 +5226,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
case R_PPC_DTPREL16_LO:
case R_PPC_DTPREL16_HI:
case R_PPC_DTPREL16_HA:
- addend -= htab->tls_sec->vma + DTP_OFFSET;
+ addend -= htab->elf.tls_sec->vma + DTP_OFFSET;
break;
/* Relocations that may need to be propagated if this is a shared
@@ -5271,18 +5235,18 @@ ppc_elf_relocate_section (bfd *output_bfd,
case R_PPC_TPREL16_LO:
case R_PPC_TPREL16_HI:
case R_PPC_TPREL16_HA:
- addend -= htab->tls_sec->vma + TP_OFFSET;
+ addend -= htab->elf.tls_sec->vma + TP_OFFSET;
/* The TPREL16 relocs shouldn't really be used in shared
libs as they will result in DT_TEXTREL being set, but
support them anyway. */
goto dodyn;
case R_PPC_TPREL32:
- addend -= htab->tls_sec->vma + TP_OFFSET;
+ addend -= htab->elf.tls_sec->vma + TP_OFFSET;
goto dodyn;
case R_PPC_DTPREL32:
- addend -= htab->tls_sec->vma + DTP_OFFSET;
+ addend -= htab->elf.tls_sec->vma + DTP_OFFSET;
goto dodyn;
case R_PPC_DTPMOD32:
@@ -5450,45 +5414,33 @@ ppc_elf_relocate_section (bfd *output_bfd,
}
break;
+ case R_PPC_RELAX32PC:
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset - 4);
+ /* Fall thru */
case R_PPC_RELAX32:
{
- unsigned long r_symndx;
- Elf_Internal_Sym *sym;
- asection *sym_sec;
- bfd_byte *hit_addr = 0;
- bfd_vma value = 0;
+ unsigned long t0;
+ unsigned long t1;
- r_symndx = ELF32_R_SYM (rel->r_info);
+ t0 = bfd_get_32 (output_bfd, contents + rel->r_offset);
+ t1 = bfd_get_32 (output_bfd, contents + rel->r_offset + 4);
- if (r_symndx < symtab_hdr->sh_info)
- {
- sym = local_syms + r_symndx;
- sym_sec = local_sections[r_symndx];
+ /* We're clearing the bits for R_PPC_ADDR16_HA
+ and R_PPC_ADDR16_LO here. */
+ t0 &= ~0xffff;
+ t1 &= ~0xffff;
- value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
- }
- else
- {
- bfd_boolean warned;
- bfd_boolean unresolved_reloc;
-
- RELOC_FOR_GLOBAL_SYMBOL (h, elf_sym_hashes (input_bfd),
- r_symndx, symtab_hdr,
- value, sym_sec,
- unresolved_reloc, info,
- warned);
- if (warned)
- continue;
- }
- hit_addr = contents + rel->r_offset;
- value += rel->r_addend;
+ /* t0 is HA, t1 is LO */
+ relocation += addend;
+ t0 |= ((relocation + 0x8000) >> 16) & 0xffff;
+ t1 |= relocation & 0xffff;
- r = ppc_elf_install_value (output_bfd, hit_addr, value, r_type);
- if (r != bfd_reloc_ok)
- break;
- else
- continue;
+ bfd_put_32 (output_bfd, t0, contents + rel->r_offset);
+ bfd_put_32 (output_bfd, t1, contents + rel->r_offset + 4);
}
+ continue;
/* Indirect .sdata relocation. */
case R_PPC_EMB_SDAI16:
@@ -6186,26 +6138,16 @@ ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED)
static struct bfd_elf_special_section const ppc_elf_special_sections[]=
{
- { ".tags", 0, NULL, 0,
- SHT_ORDERED, SHF_ALLOC },
- { ".sdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".sbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".sdata2", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { ".sbss2", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { ".PPC.EMB.apuinfo", 0, NULL, 0,
- SHT_NOTE, 0 },
- { ".PPC.EMB.sdata0", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { ".PPC.EMB.sbss0", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC },
- { ".plt", 0, NULL, 0,
- SHT_NOBITS, 0 },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".tags", 5, 0, SHT_ORDERED, SHF_ALLOC },
+ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".sdata2", 7, -2, SHT_PROGBITS, SHF_ALLOC },
+ { ".sbss2", 6, -2, SHT_PROGBITS, SHF_ALLOC },
+ { ".PPC.EMB.apuinfo", 16, 0, SHT_NOTE, 0 },
+ { ".PPC.EMB.sdata0", 15, 0, SHT_PROGBITS, SHF_ALLOC },
+ { ".PPC.EMB.sbss0", 14, 0, SHT_PROGBITS, SHF_ALLOC },
+ { ".plt", 4, 0, SHT_NOBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { NULL, 0, 0, 0, 0 }
};
#define TARGET_LITTLE_SYM bfd_elf32_powerpcle_vec
@@ -6234,7 +6176,6 @@ static struct bfd_elf_special_section const ppc_elf_special_sections[]=
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
#define elf_backend_got_header_size 12
-#define elf_backend_plt_header_size PLT_INITIAL_ENTRY_SIZE
#define elf_backend_rela_normal 1
#define bfd_elf32_mkobject ppc_elf_mkobject
diff --git a/bfd/elf32-ppc.h b/bfd/elf32-ppc.h
index 72be813..fa2c585 100644
--- a/bfd/elf32-ppc.h
+++ b/bfd/elf32-ppc.h
@@ -17,5 +17,5 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-bfd_boolean ppc_elf_tls_setup (bfd *, struct bfd_link_info *);
+asection *ppc_elf_tls_setup (bfd *, struct bfd_link_info *);
bfd_boolean ppc_elf_tls_optimize (bfd *, struct bfd_link_info *);
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 5b07ab0..80a753a 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -2216,10 +2216,10 @@ static bfd_vma
dtpoff_base (info)
struct bfd_link_info *info;
{
- /* If tls_segment is NULL, we should have signalled an error already. */
- if (elf_hash_table (info)->tls_segment == NULL)
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (elf_hash_table (info)->tls_sec == NULL)
return 0;
- return elf_hash_table (info)->tls_segment->start;
+ return elf_hash_table (info)->tls_sec->vma;
}
/* Return the relocation value for @tpoff relocation
@@ -2230,14 +2230,12 @@ tpoff (info, address)
struct bfd_link_info *info;
bfd_vma address;
{
- struct elf_link_tls_segment *tls_segment
- = elf_hash_table (info)->tls_segment;
+ struct elf_link_hash_table *htab = elf_hash_table (info);
- /* If tls_segment is NULL, we should have signalled an error already. */
- if (tls_segment == NULL)
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (htab->tls_sec == NULL)
return 0;
- return (align_power (tls_segment->size, tls_segment->align)
- + tls_segment->start - address);
+ return htab->tls_size + htab->tls_sec->vma - address;
}
/* Complain if TLS instruction relocation is against an invalid
@@ -2327,7 +2325,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else
{
@@ -3463,7 +3461,6 @@ elf_s390_grok_prstatus (abfd, note)
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 12
-#define elf_backend_plt_header_size PLT_ENTRY_SIZE
#define elf_backend_rela_normal 1
#define elf_info_to_howto elf_s390_info_to_howto
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 368bbca..9ffd05b 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -276,8 +276,36 @@ static reloc_howto_type sh_elf_howto_table[] =
0xff, /* dst_mask */
TRUE), /* pcrel_offset */
- EMPTY_HOWTO (10),
- EMPTY_HOWTO (11),
+ /* 8 bit PC relative divided by 2 - but specified in a very odd way. */
+ HOWTO (R_SH_LOOP_START, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_LOOP_START", /* name */
+ TRUE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* 8 bit PC relative divided by 2 - but specified in a very odd way. */
+ HOWTO (R_SH_LOOP_END, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_LOOP_END", /* name */
+ TRUE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
EMPTY_HOWTO (12),
EMPTY_HOWTO (13),
EMPTY_HOWTO (14),
@@ -288,15 +316,59 @@ static reloc_howto_type sh_elf_howto_table[] =
EMPTY_HOWTO (19),
EMPTY_HOWTO (20),
EMPTY_HOWTO (21),
- EMPTY_HOWTO (22),
- EMPTY_HOWTO (23),
- EMPTY_HOWTO (24),
/* The remaining relocs are a GNU extension used for relaxing. The
final pass of the linker never needs to do anything with any of
these relocs. Any required operations are handled by the
relaxation code. */
+ /* GNU extension to record C++ vtable hierarchy */
+ HOWTO (R_SH_GNU_VTINHERIT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ NULL, /* special_function */
+ "R_SH_GNU_VTINHERIT", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* GNU extension to record C++ vtable member usage */
+ HOWTO (R_SH_GNU_VTENTRY, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_elf_rel_vtable_reloc_fn, /* special_function */
+ "R_SH_GNU_VTENTRY", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* An 8 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_SH_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 */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_SWITCH8", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* 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. */
@@ -434,90 +506,174 @@ static reloc_howto_type sh_elf_howto_table[] =
0, /* dst_mask */
TRUE), /* pcrel_offset */
- /* An 8 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_SH_SWITCH8, /* type */
+ /* The next 12 are only supported via linking in SHC-generated objects. */
+ HOWTO (R_SH_DIR16, /* type */
+ 0, /* rightshift */
+ 1, /* 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_SH_DIR16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR8, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR8", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR8UL, /* type */
+ 2, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
complain_overflow_unsigned, /* complain_on_overflow */
- sh_elf_ignore_reloc, /* special_function */
- "R_SH_SWITCH8", /* name */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR8UL", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0, /* dst_mask */
- TRUE), /* pcrel_offset */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
- /* GNU extension to record C++ vtable hierarchy */
- HOWTO (R_SH_GNU_VTINHERIT, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
+ HOWTO (R_SH_DIR8UW, /* type */
+ 1, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- NULL, /* special_function */
- "R_SH_GNU_VTINHERIT", /* name */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR8UW", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0, /* dst_mask */
+ 0xff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* GNU extension to record C++ vtable member usage */
- HOWTO (R_SH_GNU_VTENTRY, /* type */
+ HOWTO (R_SH_DIR8U, /* type */
0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 0, /* bitsize */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
- complain_overflow_dont, /* complain_on_overflow */
- _bfd_elf_rel_vtable_reloc_fn, /* special_function */
- "R_SH_GNU_VTENTRY", /* name */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR8U", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0, /* dst_mask */
+ 0xff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* 8 bit PC relative divided by 2 - but specified in a very odd way. */
- HOWTO (R_SH_LOOP_START, /* type */
+ HOWTO (R_SH_DIR8SW, /* type */
1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- sh_elf_ignore_reloc, /* special_function */
- "R_SH_LOOP_START", /* name */
- TRUE, /* partial_inplace */
- 0xff, /* src_mask */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR8SW", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
0xff, /* dst_mask */
- TRUE), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
- /* 8 bit PC relative divided by 2 - but specified in a very odd way. */
- HOWTO (R_SH_LOOP_END, /* type */
- 1, /* rightshift */
- 1, /* size (0 = byte, 1 = short, 2 = long) */
+ HOWTO (R_SH_DIR8S, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
8, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- sh_elf_ignore_reloc, /* special_function */
- "R_SH_LOOP_END", /* name */
- TRUE, /* partial_inplace */
- 0xff, /* src_mask */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR8S", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
0xff, /* dst_mask */
- TRUE), /* pcrel_offset */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR4UL, /* type */
+ 2, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 4, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR4UL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x0f, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR4UW, /* type */
+ 1, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 4, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR4UW", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x0f, /* dst_mask */
+ FALSE), /* pcrel_offset */
- EMPTY_HOWTO (38),
- EMPTY_HOWTO (39),
- EMPTY_HOWTO (40),
- EMPTY_HOWTO (41),
- EMPTY_HOWTO (42),
- EMPTY_HOWTO (43),
- EMPTY_HOWTO (44),
+ HOWTO (R_SH_DIR4U, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 4, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR4U", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x0f, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_PSHA, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 7, /* bitsize */
+ FALSE, /* pc_relative */
+ 4, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_PSHA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x0f, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_PSHL, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 7, /* bitsize */
+ FALSE, /* pc_relative */
+ 4, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_PSHL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x0f, /* dst_mask */
+ FALSE), /* pcrel_offset */
#ifdef INCLUDE_SHMEDIA
/* Used in SHLLI.L and SHLRI.L. */
@@ -636,7 +792,21 @@ static reloc_howto_type sh_elf_howto_table[] =
#endif
EMPTY_HOWTO (52),
- EMPTY_HOWTO (53),
+
+ HOWTO (R_SH_DIR16S, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR16S", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
EMPTY_HOWTO (54),
EMPTY_HOWTO (55),
EMPTY_HOWTO (56),
@@ -1861,6 +2031,8 @@ static const struct elf_reloc_map sh_reloc_map[] =
{
{ BFD_RELOC_NONE, R_SH_NONE },
{ BFD_RELOC_32, R_SH_DIR32 },
+ { BFD_RELOC_16, R_SH_DIR16 },
+ { BFD_RELOC_8, R_SH_DIR8 },
{ BFD_RELOC_CTOR, R_SH_DIR32 },
{ BFD_RELOC_32_PCREL, R_SH_REL32 },
{ BFD_RELOC_SH_PCDISP8BY2, R_SH_DIR8WPN },
@@ -4546,8 +4718,8 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* Many of the relocs are only used for relaxing, and are
handled entirely by the relaxation code. */
- if (r_type > (int) R_SH_LAST_INVALID_RELOC
- && r_type < (int) R_SH_LOOP_START)
+ if (r_type >= (int) R_SH_GNU_VTINHERIT
+ && r_type <= (int) R_SH_LABEL)
continue;
if (r_type == (int) R_SH_NONE)
continue;
@@ -4633,7 +4805,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
else if (! howto->partial_inplace)
{
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
addend = rel->r_addend;
}
else if ((sec->flags & SEC_MERGE)
@@ -4843,15 +5015,85 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
bfd_set_error (bfd_error_bad_value);
return FALSE;
+ case R_SH_DIR16:
+ case R_SH_DIR8:
+ case R_SH_DIR8U:
+ case R_SH_DIR8S:
+ case R_SH_DIR4U:
+ goto final_link_relocate;
+
+ case R_SH_DIR8UL:
+ case R_SH_DIR4UL:
+ if (relocation & 3)
+ {
+ ((*_bfd_error_handler)
+ (_("%s: 0x%lx: fatal: unaligned %s relocation 0x%lx"),
+ bfd_archive_filename (input_section->owner),
+ (unsigned long) rel->r_offset, howto->name,
+ (unsigned long)relocation));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ goto final_link_relocate;
+
+ case R_SH_DIR8UW:
+ case R_SH_DIR8SW:
+ case R_SH_DIR4UW:
+ if (relocation & 1)
+ {
+ ((*_bfd_error_handler)
+ (_("%s: 0x%lx: fatal: unaligned %s relocation 0x%lx"),
+ bfd_archive_filename (input_section->owner),
+ (unsigned long) rel->r_offset, howto->name,
+ (unsigned long)relocation));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ goto final_link_relocate;
+
+ case R_SH_PSHA:
+ if ((signed int)relocation < -32
+ || (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),
+ (unsigned long) rel->r_offset,
+ (unsigned long)relocation));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ goto final_link_relocate;
+
+ case R_SH_PSHL:
+ if ((signed int)relocation < -16
+ || (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),
+ (unsigned long) rel->r_offset,
+ (unsigned long)relocation));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ goto final_link_relocate;
+
case R_SH_DIR32:
case R_SH_REL32:
+#ifdef INCLUDE_SHMEDIA
+ case R_SH_IMM_LOW16_PCREL:
+ case R_SH_IMM_MEDLOW16_PCREL:
+ case R_SH_IMM_MEDHI16_PCREL:
+ case R_SH_IMM_HI16_PCREL:
+#endif
if (info->shared
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
|| h->root.type != bfd_link_hash_undefweak)
&& r_symndx != 0
&& (input_section->flags & SEC_ALLOC) != 0
- && (r_type != R_SH_REL32
+ && (r_type == R_SH_DIR32
|| !SYMBOL_CALLS_LOCAL (info, h)))
{
Elf_Internal_Rela outrel;
@@ -4904,6 +5146,17 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
outrel.r_addend
= bfd_get_32 (input_bfd, contents + rel->r_offset);
}
+#ifdef INCLUDE_SHMEDIA
+ else if (r_type == R_SH_IMM_LOW16_PCREL
+ || r_type == R_SH_IMM_MEDLOW16_PCREL
+ || r_type == R_SH_IMM_MEDHI16_PCREL
+ || r_type == R_SH_IMM_HI16_PCREL)
+ {
+ BFD_ASSERT (h != NULL && h->dynindx != -1);
+ outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
+ outrel.r_addend = addend;
+ }
+#endif
else
{
/* h->dynindx may be -1 if this symbol was marked to
@@ -5768,10 +6021,10 @@ sh_elf_get_relocated_section_contents (bfd *output_bfd,
static bfd_vma
dtpoff_base (struct bfd_link_info *info)
{
- /* If tls_segment is NULL, we should have signalled an error already. */
- if (elf_hash_table (info)->tls_segment == NULL)
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (elf_hash_table (info)->tls_sec == NULL)
return 0;
- return elf_hash_table (info)->tls_segment->start;
+ return elf_hash_table (info)->tls_sec->vma;
}
/* Return the relocation value for R_SH_TLS_TPOFF32.. */
@@ -5779,12 +6032,12 @@ dtpoff_base (struct bfd_link_info *info)
static bfd_vma
tpoff (struct bfd_link_info *info, bfd_vma address)
{
- /* If tls_segment is NULL, we should have signalled an error already. */
- if (elf_hash_table (info)->tls_segment == NULL)
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (elf_hash_table (info)->tls_sec == NULL)
return 0;
/* SH TLS ABI is variant I and static TLS block start just after tcbhead
structure which has 2 pointer fields. */
- return (address - dtpoff_base (info) + 8);
+ return address - elf_hash_table (info)->tls_sec->vma + 8;
}
static asection *
@@ -6419,6 +6672,12 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
case R_SH_DIR32:
case R_SH_REL32:
+#ifdef INCLUDE_SHMEDIA
+ case R_SH_IMM_LOW16_PCREL:
+ case R_SH_IMM_MEDLOW16_PCREL:
+ case R_SH_IMM_MEDHI16_PCREL:
+ case R_SH_IMM_HI16_PCREL:
+#endif
if (h != NULL && ! info->shared)
{
h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
@@ -6536,7 +6795,14 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
}
p->count += 1;
- if (r_type == R_SH_REL32)
+ if (r_type == R_SH_REL32
+#ifdef INCLUDE_SHMEDIA
+ || r_type == R_SH_IMM_LOW16_PCREL
+ || r_type == R_SH_IMM_MEDLOW16_PCREL
+ || r_type == R_SH_IMM_MEDHI16_PCREL
+ || r_type == R_SH_IMM_HI16_PCREL
+#endif
+ )
p->pc_count += 1;
}
@@ -6597,6 +6863,18 @@ sh_elf_set_mach_from_flags (bfd *abfd)
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;
default:
return FALSE;
}
@@ -7277,7 +7555,6 @@ elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 12
-#define elf_backend_plt_header_size PLT_ENTRY_SIZE
#ifndef INCLUDE_SHMEDIA
diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c
index 396fedf..c3be09f 100644
--- a/bfd/elf32-sh64.c
+++ b/bfd/elf32-sh64.c
@@ -85,6 +85,7 @@ static void sh64_find_section_for_address
#define elf_backend_add_symbol_hook sh64_elf_add_symbol_hook
#define elf_backend_link_output_symbol_hook \
sh64_elf_link_output_symbol_hook
+#define elf_backend_merge_symbol_attribute sh64_elf_merge_symbol_attribute
#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
@@ -735,12 +736,31 @@ sh64_elf_final_write_processing (bfd *abfd,
}
}
+/* Merge non visibility st_other attribute when the symbol comes from
+ a dynamic object. */
+static void
+sh64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
+ const Elf_Internal_Sym *isym,
+ bfd_boolean definition,
+ bfd_boolean dynamic)
+{
+ if (isym->st_other != 0 && dynamic)
+ {
+ unsigned char other;
+
+ /* Take the balance of OTHER from the definition. */
+ other = (definition ? isym->st_other : h->other);
+ other &= ~ ELF_ST_VISIBILITY (-1);
+ h->other = other | ELF_ST_VISIBILITY (h->other);
+ }
+
+ return;
+}
+
static struct bfd_elf_special_section const sh64_elf_special_sections[]=
{
- { ".cranges", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".cranges", 8, 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
};
#undef TARGET_BIG_SYM
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 50d968e..ea3a9b1 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -2082,10 +2082,10 @@ static bfd_vma
dtpoff_base (info)
struct bfd_link_info *info;
{
- /* If tls_segment is NULL, we should have signalled an error already. */
- if (elf_hash_table (info)->tls_segment == NULL)
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (elf_hash_table (info)->tls_sec == NULL)
return 0;
- return elf_hash_table (info)->tls_segment->start;
+ return elf_hash_table (info)->tls_sec->vma;
}
/* Return the relocation value for @tpoff relocation
@@ -2096,14 +2096,12 @@ tpoff (info, address)
struct bfd_link_info *info;
bfd_vma address;
{
- struct elf_link_tls_segment *tls_segment
- = elf_hash_table (info)->tls_segment;
+ struct elf_link_hash_table *htab = elf_hash_table (info);
- /* If tls_segment is NULL, we should have signalled an error already. */
- if (tls_segment == NULL)
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (htab->tls_sec == NULL)
return 0;
- return -(align_power (tls_segment->size, tls_segment->align)
- + tls_segment->start - address);
+ return address - htab->tls_size - htab->tls_sec->vma;
}
/* Relocate a SPARC ELF section. */
@@ -2182,7 +2180,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else
{
@@ -2459,16 +2457,8 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
if (is_plt)
sec = htab->splt;
- else if (h == NULL)
- sec = local_sections[r_symndx];
- else
- {
- BFD_ASSERT (h->root.type == bfd_link_hash_defined
- || (h->root.type
- == bfd_link_hash_defweak));
- sec = h->root.u.def.section;
- }
- if (sec != NULL && bfd_is_abs_section (sec))
+
+ if (bfd_is_abs_section (sec))
indx = 0;
else if (sec == NULL || sec->owner == NULL)
{
@@ -3478,7 +3468,6 @@ elf32_sparc_reloc_type_class (rela)
#define elf_backend_plt_readonly 0
#define elf_backend_want_plt_sym 1
#define elf_backend_got_header_size 4
-#define elf_backend_plt_header_size (4*PLT_ENTRY_SIZE)
#define elf_backend_rela_normal 1
#include "elf32-target.h"
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 0dc6542..fb290eb 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -1681,7 +1681,7 @@ v850_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
#if 0
{
char * name;
@@ -3163,34 +3163,33 @@ v850_elf_relax_section (abfd, sec, link_info, again)
static struct bfd_elf_special_section const v850_elf_special_sections[]=
{
- { ".sdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL },
- { ".rosdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_V850_GPREL },
- { ".sbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL },
- { ".scommon", 0, NULL, 0,
- SHT_V850_SCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL },
- { ".tdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_EPREL },
- { ".tbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_EPREL },
- { ".tcommon", 0, NULL, 0,
- SHT_V850_TCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
- { ".zdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
- { ".rozdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_V850_R0REL },
- { ".zbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
- { ".zcommon", 0, NULL, 0,
- SHT_V850_ZCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
- { ".call_table_data", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".call_table_text", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_EXECINSTR },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".sdata", 6, -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_GPREL) },
+ { ".rosdata", 8, -2, SHT_PROGBITS, (SHF_ALLOC
+ + SHF_V850_GPREL) },
+ { ".sbss", 5, -2, SHT_NOBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_GPREL) },
+ { ".scommon", 8, -2, SHT_V850_SCOMMON, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_GPREL) },
+ { ".tdata", 6, -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_EPREL) },
+ { ".tbss", 5, -2, SHT_NOBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_EPREL) },
+ { ".tcommon", 8, -2, SHT_V850_TCOMMON, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_R0REL) },
+ { ".zdata", 6, -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_R0REL) },
+ { ".rozdata", 8, -2, SHT_PROGBITS, (SHF_ALLOC
+ + SHF_V850_R0REL) },
+ { ".zbss", 5, -2, SHT_NOBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_R0REL) },
+ { ".zcommon", 8, -2, SHT_V850_ZCOMMON, (SHF_ALLOC + SHF_WRITE
+ + SHF_V850_R0REL) },
+ { ".call_table_data", 16, 0, SHT_PROGBITS, (SHF_ALLOC
+ + SHF_WRITE) },
+ { ".call_table_text", 16, 0, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE
+ + SHF_EXECINSTR) },
+ { NULL, 0, 0, 0, 0 }
};
#define TARGET_LITTLE_SYM bfd_elf32_v850_vec
diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c
index 7d78e0f..21fdd9d 100644
--- a/bfd/elf32-vax.c
+++ b/bfd/elf32-vax.c
@@ -1149,7 +1149,7 @@ elf_vax_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (!info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -1483,7 +1483,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else
{
@@ -1737,16 +1737,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
{
long indx;
- if (h == NULL)
- sec = local_sections[r_symndx];
- else
- {
- BFD_ASSERT (h->root.type == bfd_link_hash_defined
- || (h->root.type
- == bfd_link_hash_defweak));
- sec = h->root.u.def.section;
- }
- if (sec != NULL && bfd_is_abs_section (sec))
+ if (bfd_is_abs_section (sec))
indx = 0;
else if (sec == NULL || sec->owner == NULL)
{
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index af9a048..1377ff2 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -845,7 +845,7 @@ xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections [r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 251c332..e8c276b 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -212,10 +212,8 @@ static bfd_boolean is_literal_section
PARAMS ((asection *));
static int internal_reloc_compare
PARAMS ((const PTR, const PTR));
-static bfd_boolean get_is_linkonce_section
- PARAMS ((bfd *, asection *));
extern char *xtensa_get_property_section_name
- PARAMS ((bfd *, asection *, const char *));
+ PARAMS ((asection *, const char *));
/* Other functions called directly by the linker. */
@@ -504,8 +502,9 @@ xtensa_read_table_entries (abfd, section, table_p, sec_name)
Elf_Internal_Rela *internal_relocs;
table_section_name =
- xtensa_get_property_section_name (abfd, section, sec_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);
@@ -515,7 +514,7 @@ xtensa_read_table_entries (abfd, section, table_p, sec_name)
return 0;
}
- num_records = table_size / sizeof (property_table_entry);
+ num_records = table_size / 8;
table_data = retrieve_contents (abfd, table_section, TRUE);
blocks = (property_table_entry *)
bfd_malloc (num_records * sizeof (property_table_entry));
@@ -557,7 +556,7 @@ xtensa_read_table_entries (abfd, section, table_p, sec_name)
and the addresses are already in the table. */
bfd_vma off;
- for (off = 0; off < table_size; off += sizeof (property_table_entry))
+ for (off = 0; off < table_size; off += 8)
{
bfd_vma address = bfd_get_32 (abfd, table_data + off);
@@ -1177,7 +1176,7 @@ elf_xtensa_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
if (s == NULL)
@@ -2005,7 +2004,7 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else
{
@@ -2081,8 +2080,8 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
memset (&outrel, 0, sizeof outrel);
else
{
- outrel.r_offset = (input_section->output_section->vma
- + input_section->output_offset);
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
if (dynamic_symbol)
{
@@ -2314,6 +2313,7 @@ elf_xtensa_combine_prop_entries (output_bfd, sxtlit, sgotloc)
memcpy (sgotloc->contents, contents, section_size);
free (contents);
+ free (table);
return num;
}
@@ -5605,25 +5605,25 @@ pcrel_reloc_fits (opnd, self_address, dest_address)
}
+static int linkonce_len = sizeof (".gnu.linkonce.") - 1;
+static int insn_sec_len = sizeof (XTENSA_INSN_SEC_NAME) - 1;
+static int lit_sec_len = sizeof (XTENSA_LIT_SEC_NAME) - 1;
+
+
static bfd_boolean
xtensa_is_property_section (sec)
asection *sec;
{
- static int linkonce_len = sizeof (".gnu.linkonce.") - 1;
+ if (strncmp (XTENSA_INSN_SEC_NAME, sec->name, insn_sec_len) == 0
+ || strncmp (XTENSA_LIT_SEC_NAME, sec->name, lit_sec_len) == 0)
+ return TRUE;
- if (strncmp (".xt.insn", sec->name, 8) == 0
- || strncmp (".xt.lit", sec->name, 7) == 0)
+ if (strncmp (".gnu.linkonce.", sec->name, linkonce_len) == 0
+ && (sec->name[linkonce_len] == 'x'
+ || sec->name[linkonce_len] == 'p')
+ && sec->name[linkonce_len + 1] == '.')
return TRUE;
- if (strncmp (".gnu.linkonce.", sec->name, linkonce_len) == 0)
- {
- if (strncmp ("x.", sec->name + linkonce_len, 2) == 0
- || strncmp ("p.", sec->name + linkonce_len, 2) == 0)
- return TRUE;
- if (strstr (sec->name + linkonce_len, ".xt.insn") != NULL
- || strstr (sec->name + linkonce_len, ".xt.lit") != NULL)
- return TRUE;
- }
return FALSE;
}
@@ -5632,18 +5632,14 @@ static bfd_boolean
xtensa_is_littable_section (sec)
asection *sec;
{
- static int linkonce_len = sizeof (".gnu.linkonce.") - 1;
+ if (strncmp (XTENSA_LIT_SEC_NAME, sec->name, lit_sec_len) == 0)
+ return TRUE;
- if (strncmp (".xt.lit", sec->name, 7) == 0)
+ if (strncmp (".gnu.linkonce.", sec->name, linkonce_len) == 0
+ && sec->name[linkonce_len] == 'p'
+ && sec->name[linkonce_len + 1] == '.')
return TRUE;
- if (strncmp (".gnu.linkonce.", sec->name, linkonce_len) == 0)
- {
- if (strncmp ("p.", sec->name + linkonce_len, 2) == 0)
- return TRUE;
- if (strstr (sec->name + linkonce_len, ".xt.lit") != NULL)
- return TRUE;
- }
return FALSE;
}
@@ -5671,78 +5667,42 @@ internal_reloc_compare (ap, bp)
}
-static bfd_boolean
-get_is_linkonce_section (abfd, sec)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec;
-{
- flagword flags, link_once_flags;
- bfd_boolean is_linkonce = FALSE;;
-
- flags = bfd_get_section_flags (abfd, sec);
- link_once_flags = (flags & SEC_LINK_ONCE);
- if (link_once_flags != 0)
- is_linkonce = TRUE;
-
- /* In order for this to be useful to the assembler
- before the linkonce flag is set we need to
- check for the GNU extension name. */
- if (!is_linkonce &&
- strncmp (sec->name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
- is_linkonce = TRUE;
-
- return is_linkonce;
-}
-
-
char *
-xtensa_get_property_section_name (abfd, sec, base_name)
- bfd *abfd;
+xtensa_get_property_section_name (sec, base_name)
asection *sec;
- const char * base_name;
+ const char *base_name;
{
- char *table_sec_name = NULL;
- bfd_boolean is_linkonce;
-
- is_linkonce = get_is_linkonce_section (abfd, sec);
-
- if (!is_linkonce)
+ if (strncmp (sec->name, ".gnu.linkonce.", linkonce_len) == 0)
{
- table_sec_name = strdup (base_name);
- }
- else
- {
- static size_t prefix_len = sizeof (".gnu.linkonce.t.") - 1;
- size_t len = strlen (sec->name) + 1;
- char repl_char = '\0';
- const char *segname = sec->name;
-
- if (strncmp (segname, ".gnu.linkonce.t.", prefix_len) == 0)
- {
- if (strcmp (base_name, ".xt.insn") == 0)
- repl_char = 'x';
- else if (strcmp (base_name, ".xt.lit") == 0)
- repl_char = 'p';
- }
-
- if (repl_char != '\0')
- {
- char *name = (char *) bfd_malloc (len);
- memcpy (name, sec->name, len);
- name[prefix_len - 2] = repl_char;
- table_sec_name = name;
- }
+ char *prop_sec_name;
+ const char *suffix;
+ char linkonce_kind = 0;
+
+ if (strcmp (base_name, XTENSA_INSN_SEC_NAME) == 0)
+ linkonce_kind = 'x';
+ else if (strcmp (base_name, XTENSA_LIT_SEC_NAME) == 0)
+ linkonce_kind = 'p';
else
+ abort ();
+
+ prop_sec_name = (char *) bfd_malloc (strlen (sec->name) + 1);
+ memcpy (prop_sec_name, ".gnu.linkonce.", linkonce_len);
+ prop_sec_name[linkonce_len] = linkonce_kind;
+ prop_sec_name[linkonce_len + 1] = '.';
+
+ suffix = sec->name + linkonce_len;
+ while (*suffix)
{
- size_t base_len = strlen (base_name) + 1;
- char *name = (char *) bfd_malloc (len + base_len);
- memcpy (name, sec->name, len - 1);
- memcpy (name + len - 1, base_name, base_len);
- table_sec_name = name;
+ suffix += 1;
+ if (suffix[-1] == '.')
+ break;
}
+ strcpy (prop_sec_name + linkonce_len + 2, suffix);
+
+ return prop_sec_name;
}
- return table_sec_name;
+ return strdup (base_name);
}
@@ -5841,14 +5801,10 @@ xtensa_callback_required_dependence (abfd, sec, link_info, callback, closure)
module loader so that the literals are not placed after the text. */
static struct bfd_elf_special_section const elf_xtensa_special_sections[]=
{
- { ".literal", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".init.literal", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".fini.literal", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".literal", 8, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { ".init.literal", 13, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { ".fini.literal", 13, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { NULL, 0, 0, 0, 0 }
};
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 0b64bd3..ac16fb5 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -1158,13 +1158,15 @@ elf64_alpha_info_to_howto (abfd, cache_ptr, dst)
(r_type == R_ALPHA_TLSGD || r_type == R_ALPHA_TLSLDM ? 16 : 8)
/* This is PT_TLS segment p_vaddr. */
-#define alpha_get_dtprel_base(tlss) \
- ((tlss)->start)
+#define alpha_get_dtprel_base(info) \
+ (elf_hash_table (info)->tls_sec->vma)
/* Main program TLS (whose template starts at PT_TLS p_vaddr)
is assigned offset round(16, PT_TLS p_align). */
-#define alpha_get_tprel_base(tlss) \
- ((tlss)->start - align_power ((bfd_vma) 16, (tlss)->align))
+#define alpha_get_tprel_base(info) \
+ (elf_hash_table (info)->tls_sec->vma \
+ - align_power ((bfd_vma) 16, \
+ elf_hash_table (info)->tls_sec->alignment_power))
/* These functions do relaxation for Alpha ELF.
@@ -1198,7 +1200,6 @@ struct alpha_relax_info
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *relocs, *relend;
struct bfd_link_info *link_info;
- struct elf_link_tls_segment *tls_segment;
bfd_vma gp;
bfd *gotobj;
asection *tsec;
@@ -1224,8 +1225,6 @@ static bfd_boolean elf64_alpha_relax_gprelhilo
static bfd_boolean elf64_alpha_relax_tls_get_addr
PARAMS((struct alpha_relax_info *info, bfd_vma symval,
Elf_Internal_Rela *irel, bfd_boolean));
-static struct elf_link_tls_segment *elf64_alpha_relax_find_tls_segment
- PARAMS((struct alpha_relax_info *, struct elf_link_tls_segment *));
static bfd_boolean elf64_alpha_relax_section
PARAMS((bfd *abfd, asection *sec, struct bfd_link_info *link_info,
bfd_boolean *again));
@@ -1598,9 +1597,9 @@ elf64_alpha_relax_got_load (info, symval, irel, r_type)
{
bfd_vma dtp_base, tp_base;
- BFD_ASSERT (info->tls_segment != NULL);
- dtp_base = alpha_get_dtprel_base (info->tls_segment);
- tp_base = alpha_get_tprel_base (info->tls_segment);
+ BFD_ASSERT (elf_hash_table (info->link_info)->tls_sec != NULL);
+ dtp_base = alpha_get_dtprel_base (info->link_info);
+ tp_base = alpha_get_tprel_base (info->link_info);
disp = symval - (r_type == R_ALPHA_GOTDTPREL ? dtp_base : tp_base);
}
@@ -1845,8 +1844,8 @@ elf64_alpha_relax_tls_get_addr (info, symval, irel, is_gd)
bfd_vma tp_base;
bfd_signed_vma disp;
- BFD_ASSERT (info->tls_segment != NULL);
- tp_base = alpha_get_tprel_base (info->tls_segment);
+ BFD_ASSERT (elf_hash_table (info->link_info)->tls_sec != NULL);
+ tp_base = alpha_get_tprel_base (info->link_info);
disp = symval - tp_base;
if (disp >= -0x8000 && disp < 0x8000)
@@ -1961,53 +1960,6 @@ elf64_alpha_relax_tls_get_addr (info, symval, irel, is_gd)
return TRUE;
}
-static struct elf_link_tls_segment *
-elf64_alpha_relax_find_tls_segment (info, seg)
- struct alpha_relax_info *info;
- struct elf_link_tls_segment *seg;
-{
- bfd *output_bfd = info->sec->output_section->owner;
- asection *o;
- unsigned int align;
- bfd_vma base, end;
-
- for (o = output_bfd->sections; o ; o = o->next)
- if ((o->flags & SEC_THREAD_LOCAL) != 0
- && (o->flags & SEC_LOAD) != 0)
- break;
- if (!o)
- return NULL;
-
- base = o->vma;
- align = 0;
-
- do
- {
- bfd_vma size;
-
- if (bfd_get_section_alignment (output_bfd, o) > align)
- align = bfd_get_section_alignment (output_bfd, o);
-
- size = o->_raw_size;
- if (size == 0 && (o->flags & SEC_HAS_CONTENTS) == 0)
- {
- struct bfd_link_order *lo;
- for (lo = o->link_order_head; lo ; lo = lo->next)
- if (size < lo->offset + lo->size)
- size = lo->offset + lo->size;
- }
- end = o->vma + size;
- o = o->next;
- }
- while (o && (o->flags & SEC_THREAD_LOCAL));
-
- seg->start = base;
- seg->size = end - base;
- seg->align = align;
-
- return seg;
-}
-
static bfd_boolean
elf64_alpha_relax_section (abfd, sec, link_info, again)
bfd *abfd;
@@ -2021,7 +1973,6 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
Elf_Internal_Sym *isymbuf = NULL;
struct alpha_elf_got_entry **local_got_entries;
struct alpha_relax_info info;
- struct elf_link_tls_segment tls_segment;
/* We are not currently changing any sizes, so only one pass. */
*again = FALSE;
@@ -2079,11 +2030,6 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
goto error_return;
}
- /* Compute the TLS segment information. The version normally found in
- elf_hash_table (link_info)->tls_segment isn't built until final_link.
- ??? Probably should look into extracting this into a common function. */
- info.tls_segment = elf64_alpha_relax_find_tls_segment (&info, &tls_segment);
-
for (irel = internal_relocs; irel < irelend; irel++)
{
bfd_vma symval;
@@ -2137,7 +2083,7 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
if (r_type == R_ALPHA_TLSLDM)
{
info.tsec = bfd_abs_section_ptr;
- symval = alpha_get_tprel_base (info.tls_segment);
+ symval = alpha_get_tprel_base (info.link_info);
}
else
{
@@ -2467,8 +2413,13 @@ elf64_alpha_create_got_section(abfd, info)
{
asection *s;
- if (bfd_get_section_by_name (abfd, ".got"))
- return TRUE;
+ if ((s = bfd_get_section_by_name (abfd, ".got")))
+ {
+ /* Check for a non-linker created .got? */
+ if (alpha_elf_tdata (abfd)->got == NULL)
+ alpha_elf_tdata (abfd)->got = s;
+ return TRUE;
+ }
s = bfd_make_section (abfd, ".got");
if (s == NULL
@@ -4289,7 +4240,6 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- struct elf_link_tls_segment *tls_segment;
asection *sgot, *srel, *srelgot;
bfd *dynobj, *gotobj;
bfd_vma gp, tp_base, dtp_base;
@@ -4343,11 +4293,10 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
local_got_entries = alpha_elf_tdata(input_bfd)->local_got_entries;
- tls_segment = elf_hash_table (info)->tls_segment;
- if (tls_segment)
+ if (elf_hash_table (info)->tls_sec != NULL)
{
- dtp_base = alpha_get_dtprel_base (tls_segment);
- tp_base = alpha_get_tprel_base (tls_segment);
+ dtp_base = alpha_get_dtprel_base (info);
+ tp_base = alpha_get_tprel_base (info);
}
else
dtp_base = tp_base = 0;
@@ -4389,9 +4338,11 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_symndx < symtab_hdr->sh_info)
{
+ asection *msec;
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- value = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ msec = sec;
+ value = _bfd_elf_rela_local_sym (output_bfd, sym, &msec, rel);
/* If this is a tp-relative relocation against sym 0,
this is hackery from relax_section. Force the value to
@@ -4419,7 +4370,6 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
&& !gotent->reloc_xlated)
{
struct alpha_elf_got_entry *ent;
- asection *msec;
for (ent = gotent; ent; ent = ent->next)
{
@@ -4669,13 +4619,13 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (r_type == R_ALPHA_DTPREL64)
{
- BFD_ASSERT(tls_segment != NULL);
+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
value -= dtp_base;
goto default_reloc;
}
else if (r_type == R_ALPHA_TPREL64)
{
- BFD_ASSERT(tls_segment != NULL);
+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
if (!info->shared)
{
value -= tp_base;
@@ -4755,7 +4705,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
value = 0;
else
{
- BFD_ASSERT(tls_segment != NULL);
+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
value -= dtp_base;
}
bfd_put_64 (output_bfd, value,
@@ -4778,7 +4728,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_archive_filename (input_bfd), h->root.root.root.string);
ret_val = FALSE;
}
- BFD_ASSERT(tls_segment != NULL);
+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
value -= dtp_base;
if (r_type == R_ALPHA_DTPRELHI)
value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1);
@@ -4801,7 +4751,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_archive_filename (input_bfd), h->root.root.root.string);
ret_val = FALSE;
}
- BFD_ASSERT(tls_segment != NULL);
+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
value -= tp_base;
if (r_type == R_ALPHA_TPRELHI)
value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1);
@@ -4822,7 +4772,7 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
value = 0;
else
{
- BFD_ASSERT(tls_segment != NULL);
+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
if (r_type == R_ALPHA_GOTDTPREL)
value -= dtp_base;
else if (!info->shared)
@@ -5444,12 +5394,9 @@ elf64_alpha_reloc_type_class (rela)
static struct bfd_elf_special_section const elf64_alpha_special_sections[]=
{
- { ".sdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
- { ".sbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+ { NULL, 0, 0, 0, 0 }
};
/* ECOFF swapping routines. These are used when dealing with the
@@ -5598,7 +5545,6 @@ static const struct elf_size_info alpha_elf_size_info =
#define elf_backend_plt_readonly 0
#define elf_backend_want_plt_sym 1
#define elf_backend_got_header_size 0
-#define elf_backend_plt_header_size PLT_HEADER_SIZE
#include "elf64-target.h"
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 88403f5..294d643 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -1642,7 +1642,7 @@ elf64_hppa_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -2675,12 +2675,9 @@ elf64_hppa_elf_get_symbol_type (elf_sym, type)
static struct bfd_elf_special_section const elf64_hppa_special_sections[]=
{
- { ".fini", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".init", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".fini", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".init", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
/* The hash bucket size is the standard one, namely 4. */
@@ -2775,7 +2772,6 @@ const struct elf_size_info hppa64_elf_size_info =
#define elf_backend_plt_readonly 0
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 0
-#define elf_backend_plt_header_size 0
#define elf_backend_type_change_ok TRUE
#define elf_backend_get_symbol_type elf64_hppa_elf_get_symbol_type
#define elf_backend_reloc_type_class elf64_hppa_reloc_type_class
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index 3a874d8..11d0565 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -2913,7 +2913,6 @@ const struct elf_size_info mips_elf64_size_info =
#define elf_backend_grok_psinfo elf64_mips_grok_psinfo
#define elf_backend_got_header_size (4 * MIPS_RESERVED_GOTNO)
-#define elf_backend_plt_header_size 0
/* MIPS ELF64 can use a mixture of REL and RELA, but some Relocations
work better/work only in RELA, so we default to this. */
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index 54c4ca8..6440dcb 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -21,7 +21,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* No specific ABI or "processor-specific supplement" defined. */
/* TODO:
- - Linker relaxation. */
+ - "Traditional" linker relaxation (shrinking whole sections).
+ - Merge reloc stubs jumping to same location.
+ - GETA stub relaxation (call a stub for out of range new
+ R_MMIX_GETA_STUBBABLE). */
#include "bfd.h"
#include "sysdep.h"
@@ -32,6 +35,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define MINUS_ONE (((bfd_vma) 0) - 1)
+#define MAX_PUSHJ_STUB_SIZE (5 * 4)
+
/* Put these everywhere in new code. */
#define FATAL_DEBUG \
_bfd_abort (__FILE__, __LINE__, \
@@ -49,6 +54,24 @@ struct _mmix_elf_section_data
struct bpo_reloc_section_info *reloc;
struct bpo_greg_section_info *greg;
} bpo;
+
+ struct pushj_stub_info
+ {
+ /* Maximum number of stubs needed for this section. */
+ bfd_size_type n_pushj_relocs;
+
+ /* Size of stubs after a mmix_elf_relax_section round. */
+ bfd_size_type stubs_size_sum;
+
+ /* Per-reloc stubs_size_sum information. The stubs_size_sum member is the sum
+ of these. Allocated in mmix_elf_check_common_relocs. */
+ bfd_size_type *stub_size;
+
+ /* Offset of next stub during relocation. Somewhat redundant with the
+ above: error coverage is easier and we don't have to reset the
+ stubs_size_sum for relocation. */
+ bfd_size_type stub_offset;
+ } pjs;
};
#define mmix_elf_section_data(sec) \
@@ -119,9 +142,9 @@ struct bpo_greg_section_info
size_t n_remaining_bpo_relocs_this_relaxation_round;
/* The number of linker-allocated GREGs resulting from BPO relocs.
- This is an approximation after _bfd_mmix_allocated_gregs_init and
- supposedly accurate after mmix_elf_relax_section is called for all
- incoming non-collected sections. */
+ This is an approximation after _bfd_mmix_before_linker_allocation
+ and supposedly accurate after mmix_elf_relax_section is called for
+ all incoming non-collected sections. */
size_t n_allocated_bpo_gregs;
/* Index into reloc_request[], sorted on increasing "value", secondary
@@ -202,6 +225,15 @@ extern void mmix_elf_symbol_processing PARAMS ((bfd *, asymbol *));
extern void mmix_dump_bpo_gregs
PARAMS ((struct bfd_link_info *, bfd_error_handler_type));
+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. */
static reloc_howto_type elf_mmix_howto_table[] =
@@ -538,7 +570,8 @@ static reloc_howto_type elf_mmix_howto_table[] =
/* The PUSHJ instruction can reach any (code) address, as long as it's
the beginning of a function (no usable restriction). It can silently
expand to a 64-bit operand, but will emit an error if any of the two
- least significant bits are set. The howto members reflect a simple
+ least significant bits are set. It can also expand into a call to a
+ stub; see R_MMIX_PUSHJ_STUBBABLE. The howto members reflect a simple
PUSHJ. */
HOWTO (R_MMIX_PUSHJ, /* type */
2, /* rightshift */
@@ -754,6 +787,20 @@ static reloc_howto_type elf_mmix_howto_table[] =
0, /* src_mask */
0, /* dst_mask */
FALSE), /* pcrel_offset */
+
+ HOWTO (R_MMIX_PUSHJ_STUBBABLE, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 19, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ mmix_elf_reloc, /* special_function */
+ "R_MMIX_PUSHJ_STUBBABLE", /* name */
+ FALSE, /* partial_inplace */
+ ~0x0100ffff, /* src_mask */
+ 0x0100ffff, /* dst_mask */
+ TRUE) /* pcrel_offset */
};
@@ -790,7 +837,8 @@ static const struct mmix_reloc_map mmix_reloc_map[] =
{BFD_RELOC_MMIX_REG_OR_BYTE, R_MMIX_REG_OR_BYTE},
{BFD_RELOC_MMIX_REG, R_MMIX_REG},
{BFD_RELOC_MMIX_BASE_PLUS_OFFSET, R_MMIX_BASE_PLUS_OFFSET},
- {BFD_RELOC_MMIX_LOCAL, R_MMIX_LOCAL}
+ {BFD_RELOC_MMIX_LOCAL, R_MMIX_LOCAL},
+ {BFD_RELOC_MMIX_PUSHJ_STUBBABLE, R_MMIX_PUSHJ_STUBBABLE}
};
static reloc_howto_type *
@@ -880,7 +928,7 @@ mmix_elf_perform_relocation (isec, howto, datap, addr, value)
asection *isec;
reloc_howto_type *howto;
PTR datap;
- bfd_vma addr ATTRIBUTE_UNUSED;
+ bfd_vma addr;
bfd_vma value;
{
bfd *abfd = isec->owner;
@@ -931,6 +979,96 @@ mmix_elf_perform_relocation (isec, howto, datap, addr, value)
}
break;
+ case R_MMIX_PUSHJ_STUBBABLE:
+ /* If the address fits, we're fine. */
+ if ((value & 3) == 0
+ /* Note rightshift 0; see R_MMIX_JMP case below. */
+ && (r = bfd_check_overflow (complain_overflow_signed,
+ howto->bitsize,
+ 0,
+ bfd_arch_bits_per_address (abfd),
+ value)) == bfd_reloc_ok)
+ 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);
+
+ /* We have the bytes at the PUSHJ insn and need to get the
+ position for the stub. There's supposed to be room allocated
+ for the stub. */
+ bfd_byte *stubcontents
+ = ((char *) datap
+ - (addr - (isec->output_section->vma + isec->output_offset))
+ + raw_size
+ + mmix_elf_section_data (isec)->pjs.stub_offset);
+ bfd_vma stubaddr;
+
+ /* The address doesn't fit, so redirect the PUSHJ to the
+ location of the stub. */
+ r = mmix_elf_perform_relocation (isec,
+ &elf_mmix_howto_table
+ [R_MMIX_ADDR19],
+ datap,
+ addr,
+ isec->output_section->vma
+ + isec->output_offset
+ + raw_size
+ + (mmix_elf_section_data (isec)
+ ->pjs.stub_offset)
+ - addr);
+ if (r != bfd_reloc_ok)
+ return r;
+
+ stubaddr
+ = (isec->output_section->vma
+ + isec->output_offset
+ + raw_size
+ + mmix_elf_section_data (isec)->pjs.stub_offset);
+
+ /* We generate a simple JMP if that suffices, else the whole 5
+ insn stub. */
+ if (bfd_check_overflow (complain_overflow_signed,
+ elf_mmix_howto_table[R_MMIX_ADDR27].bitsize,
+ 0,
+ bfd_arch_bits_per_address (abfd),
+ addr + value - stubaddr) == bfd_reloc_ok)
+ {
+ bfd_put_32 (abfd, JMP_INSN_BYTE << 24, stubcontents);
+ r = mmix_elf_perform_relocation (isec,
+ &elf_mmix_howto_table
+ [R_MMIX_ADDR27],
+ stubcontents,
+ stubaddr,
+ 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)
+ abort ();
+
+ return r;
+ }
+ else
+ {
+ /* Put a "GO $255,0" after the common sequence. */
+ bfd_put_32 (abfd,
+ ((GO_INSN_BYTE | IMM_OFFSET_BIT) << 24)
+ | 0xff00, (bfd_byte *) stubcontents + 16);
+
+ /* Prepare for the general code to set the first part of the
+ linker stub, and */
+ value += addr;
+ datap = stubcontents;
+ mmix_elf_section_data (isec)->pjs.stub_offset
+ += MAX_PUSHJ_STUB_SIZE;
+ }
+ }
+ break;
+
case R_MMIX_PUSHJ:
{
int inreg = bfd_get_8 (abfd, (bfd_byte *) datap + 1);
@@ -978,6 +1116,7 @@ mmix_elf_perform_relocation (isec, howto, datap, addr, value)
/* FALLTHROUGH. */
case R_MMIX_ADDR19:
case R_MMIX_ADDR27:
+ pcrel_mmix_reloc_fits:
/* These must be in range, or else we emit an error. */
if ((value & 3) == 0
/* Note rightshift 0; see above. */
@@ -993,7 +1132,7 @@ mmix_elf_perform_relocation (isec, howto, datap, addr, value)
if ((bfd_signed_vma) value < 0)
{
- highbit = (1 << 24);
+ highbit = 1 << 24;
value += (1 << (howto->bitsize - 1));
}
else
@@ -1203,6 +1342,11 @@ 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);
+ size_t pjsno = 0;
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
@@ -1231,10 +1375,10 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->relocatable)
{
- /* This is a relocatable link. We don't have to change
- anything, unless the reloc is against a section symbol,
- in which case we have to adjust according to where the
- section symbol winds up in the output section. */
+ /* This is a relocatable link. For most relocs we don't have to
+ change anything, unless the reloc is against a section
+ symbol, in which case we have to adjust according to where
+ the section symbol winds up in the output section. */
if (r_symndx < symtab_hdr->sh_info)
{
sym = local_syms + r_symndx;
@@ -1246,6 +1390,75 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
}
+ /* For PUSHJ stub relocs however, we may need to change the
+ reloc and the section contents, if the reloc doesn't reach
+ beyond the end of the output section and previous stubs.
+ Then we change the section contents to be a PUSHJ to the end
+ of the input section plus stubs (we can do that without using
+ a reloc), and then we change the reloc to be a R_MMIX_PUSHJ
+ at the stub location. */
+ if (r_type == R_MMIX_PUSHJ_STUBBABLE)
+ {
+ /* We've already checked whether we need a stub; use that
+ knowledge. */
+ if (mmix_elf_section_data (input_section)->pjs.stub_size[pjsno]
+ != 0)
+ {
+ Elf_Internal_Rela relcpy;
+
+ if (mmix_elf_section_data (input_section)
+ ->pjs.stub_size[pjsno] != MAX_PUSHJ_STUB_SIZE)
+ abort ();
+
+ /* There's already a PUSHJ insn there, so just fill in
+ the offset bits to the stub. */
+ if (mmix_final_link_relocate (elf_mmix_howto_table
+ + R_MMIX_ADDR19,
+ input_section,
+ contents,
+ rel->r_offset,
+ 0,
+ input_section
+ ->output_section->vma
+ + input_section->output_offset
+ + raw_size
+ + mmix_elf_section_data (input_section)
+ ->pjs.stub_offset,
+ NULL, NULL) != bfd_reloc_ok)
+ return FALSE;
+
+ /* Put a JMP insn at the stub; it goes with the
+ R_MMIX_JMP reloc. */
+ bfd_put_32 (output_bfd, JMP_INSN_BYTE << 24,
+ contents
+ + raw_size
+ + mmix_elf_section_data (input_section)
+ ->pjs.stub_offset);
+
+ /* Change the reloc to be at the stub, and to a full
+ R_MMIX_JMP reloc. */
+ rel->r_info = ELF64_R_INFO (r_symndx, R_MMIX_JMP);
+ rel->r_offset
+ = (raw_size
+ + mmix_elf_section_data (input_section)
+ ->pjs.stub_offset);
+
+ mmix_elf_section_data (input_section)->pjs.stub_offset
+ += MAX_PUSHJ_STUB_SIZE;
+
+ /* Shift this reloc to the end of the relocs to maintain
+ the r_offset sorted reloc order. */
+ relcpy = *rel;
+ memmove (rel, rel + 1, (char *) relend - (char *) rel);
+ relend[-1] = relcpy;
+
+ /* Back up one reloc, or else we'd skip the next reloc
+ in turn. */
+ rel--;
+ }
+
+ pjsno++;
+ }
continue;
}
@@ -1259,7 +1472,7 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections [r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
name = bfd_elf_string_from_elf_section
(input_bfd, symtab_hdr->sh_link, sym->st_name);
@@ -1383,6 +1596,7 @@ mmix_final_link_relocate (howto, input_section, contents,
switch (howto->type)
{
/* All these are PC-relative. */
+ case R_MMIX_PUSHJ_STUBBABLE:
case R_MMIX_PUSHJ:
case R_MMIX_CBRANCH:
case R_MMIX_ADDR19:
@@ -1669,9 +1883,6 @@ mmix_elf_check_common_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocatable)
- return TRUE;
-
/* We currently have to abuse this COFF-specific member, since there's
no target-machine-dedicated member. There's no alternative outside
the bfd_link_info struct; we can't specialize a hash-table since
@@ -1689,6 +1900,10 @@ mmix_elf_check_common_relocs (abfd, info, sec, relocs)
the ELF dynobj for this, since the ELF bits assume lots of
DSO-related stuff if that member is non-NULL. */
case R_MMIX_BASE_PLUS_OFFSET:
+ /* We don't do anything with this reloc for a relocatable link. */
+ if (info->relocatable)
+ break;
+
if (bpo_greg_owner == NULL)
{
bpo_greg_owner = abfd;
@@ -1756,13 +1971,34 @@ mmix_elf_check_common_relocs (abfd, info, sec, relocs)
gregdata->n_max_bpo_relocs++;
/* We don't get another chance to set this before GC; we've not
- set up set up any hook that runs before GC. */
+ set up any hook that runs before GC. */
gregdata->n_bpo_relocs
= gregdata->n_max_bpo_relocs;
break;
+
+ case R_MMIX_PUSHJ_STUBBABLE:
+ mmix_elf_section_data (sec)->pjs.n_pushj_relocs++;
+ break;
}
}
+ /* Allocate per-reloc stub storage and initialize it to the max stub
+ size. */
+ if (mmix_elf_section_data (sec)->pjs.n_pushj_relocs != 0)
+ {
+ size_t i;
+
+ mmix_elf_section_data (sec)->pjs.stub_size
+ = bfd_alloc (abfd, mmix_elf_section_data (sec)->pjs.n_pushj_relocs
+ * sizeof (mmix_elf_section_data (sec)
+ ->pjs.stub_size[0]));
+ if (mmix_elf_section_data (sec)->pjs.stub_size == NULL)
+ return FALSE;
+
+ for (i = 0; i < mmix_elf_section_data (sec)->pjs.n_pushj_relocs; i++)
+ mmix_elf_section_data (sec)->pjs.stub_size[i] = MAX_PUSHJ_STUB_SIZE;
+ }
+
return TRUE;
}
@@ -1780,9 +2016,6 @@ mmix_elf_check_relocs (abfd, info, sec, relocs)
const Elf_Internal_Rela *rel;
const Elf_Internal_Rela *rel_end;
- if (info->relocatable)
- return TRUE;
-
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
sym_hashes_end = sym_hashes + symtab_hdr->sh_size/sizeof(Elf64_External_Sym);
@@ -1798,6 +2031,9 @@ mmix_elf_check_relocs (abfd, info, sec, relocs)
if (!mmix_elf_check_common_relocs (abfd, info, sec, relocs))
return FALSE;
+ if (info->relocatable)
+ return TRUE;
+
rel_end = relocs + sec->reloc_count;
for (rel = relocs; rel < rel_end; rel++)
{
@@ -1904,8 +2140,7 @@ static asection mmix_elf_reg_section;
static asymbol mmix_elf_reg_section_symbol;
static asymbol *mmix_elf_reg_section_symbol_ptr;
-/* Handle the special MIPS section numbers that a symbol may use.
- This is used for both the 32-bit and the 64-bit ABI. */
+/* Handle the special section numbers that a symbol may use. */
void
mmix_elf_symbol_processing (abfd, asym)
@@ -2082,11 +2317,49 @@ mmix_elf_final_link (abfd, info)
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. */
+
+static void
+mmix_set_relaxable_size (abfd, sec, ptr)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ void *ptr;
+{
+ struct bfd_link_info *info = ptr;
+
+ /* Make sure we only do this for section where we know we want this,
+ otherwise we might end up resetting the size of COMMONs. */
+ 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;
+
+ /* For use in relocatable link, we start with a max stubs size. See
+ mmix_elf_relax_section. */
+ if (info->relocatable && sec->output_section)
+ mmix_elf_section_data (sec->output_section)->pjs.stubs_size_sum
+ += (mmix_elf_section_data (sec)->pjs.n_pushj_relocs
+ * MAX_PUSHJ_STUB_SIZE);
+}
+
/* Initialize stuff for the linker-generated GREGs to match
R_MMIX_BASE_PLUS_OFFSET relocs seen by the linker. */
bfd_boolean
-_bfd_mmix_prepare_linker_allocated_gregs (abfd, info)
+_bfd_mmix_before_linker_allocation (abfd, info)
bfd *abfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
{
@@ -2097,6 +2370,11 @@ _bfd_mmix_prepare_linker_allocated_gregs (abfd, info)
bfd_vma gregs_size;
size_t i;
size_t *bpo_reloc_indexes;
+ bfd *ibfd;
+
+ /* Set the initial size of sections. */
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ bfd_map_over_sections (ibfd, mmix_set_relaxable_size, info);
/* The bpo_greg_owner bfd is supposed to have been set by
mmix_elf_check_relocs when the first R_MMIX_BASE_PLUS_OFFSET is seen.
@@ -2160,7 +2438,7 @@ _bfd_mmix_prepare_linker_allocated_gregs (abfd, info)
calculated at this point; we just move the contents into place here. */
bfd_boolean
-_bfd_mmix_finalize_linker_allocated_gregs (abfd, link_info)
+_bfd_mmix_after_linker_allocation (abfd, link_info)
bfd *abfd ATTRIBUTE_UNUSED;
struct bfd_link_info *link_info;
{
@@ -2324,6 +2602,8 @@ mmix_dump_bpo_gregs (link_info, pf)
from the first allocated register number) and offsets for use in real
relocation.
+ PUSHJ stub accounting is also done here.
+
Symbol- and reloc-reading infrastructure copied from elf-m10200.c. */
static bfd_boolean
@@ -2340,37 +2620,51 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
struct bpo_greg_section_info *gregdata;
struct bpo_reloc_section_info *bpodata
= mmix_elf_section_data (sec)->bpo.reloc;
- size_t bpono;
+ /* The initialization is to quiet compiler warnings. The value is to
+ spot a missing actual initialization. */
+ size_t bpono = (size_t) -1;
+ 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);
+
+ 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->_cooked_size = sec->_raw_size;
-
- /* 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
+ 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
|| sec->reloc_count == 0
|| (sec->flags & SEC_CODE) == 0
|| (sec->flags & SEC_LINKER_CREATED) != 0
- /* If no R_MMIX_BASE_PLUS_OFFSET relocs, then nothing to do. */
- || bpodata == NULL)
+ /* If no R_MMIX_BASE_PLUS_OFFSET relocs and no PUSHJ-stub relocs,
+ then nothing to do. */
+ || (bpodata == NULL
+ && mmix_elf_section_data (sec)->pjs.n_pushj_relocs == 0))
return TRUE;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
bpo_greg_owner = (bfd *) link_info->base_file;
- bpo_gregs_section = bpodata->bpo_greg_section;
- gregdata = mmix_elf_section_data (bpo_gregs_section)->bpo.greg;
- bpono = bpodata->first_base_plus_offset_reloc;
+ if (bpodata != NULL)
+ {
+ bpo_gregs_section = bpodata->bpo_greg_section;
+ gregdata = mmix_elf_section_data (bpo_gregs_section)->bpo.greg;
+ bpono = bpodata->first_base_plus_offset_reloc;
+ }
+ else
+ gregdata = NULL;
/* Get a copy of the native relocations. */
internal_relocs
@@ -2385,10 +2679,61 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
for (irel = internal_relocs; irel < irelend; irel++)
{
bfd_vma symval;
+ struct elf_link_hash_entry *h = NULL;
- if (ELF64_R_TYPE (irel->r_info) != (int) R_MMIX_BASE_PLUS_OFFSET)
+ /* We only process two relocs. */
+ if (ELF64_R_TYPE (irel->r_info) != (int) R_MMIX_BASE_PLUS_OFFSET
+ && ELF64_R_TYPE (irel->r_info) != (int) R_MMIX_PUSHJ_STUBBABLE)
continue;
+ /* We process relocs in a distinctly different way when this is a
+ relocatable link (for one, we don't look at symbols), so we avoid
+ mixing its code with that for the "normal" relaxation. */
+ if (link_info->relocatable)
+ {
+ /* The only transformation in a relocatable link is to generate
+ a full stub at the location of the stub calculated for the
+ input section, if the relocated stub location, the end of the
+ output section plus earlier stubs, cannot be reached. Thus
+ relocatable linking can only lead to worse code, but it still
+ works. */
+ if (ELF64_R_TYPE (irel->r_info) == R_MMIX_PUSHJ_STUBBABLE)
+ {
+ /* If we can reach the end of the output-section and beyond
+ any current stubs, then we don't need a stub for this
+ reloc. The relaxed order of output stub allocation may
+ not exactly match the straightforward order, so we always
+ assume presence of output stubs, which will allow
+ relaxation only on relocations indifferent to the
+ presence of output stub allocations for other relocations
+ and thus the order of output stub allocation. */
+ if (bfd_check_overflow (complain_overflow_signed,
+ 19,
+ 0,
+ bfd_arch_bits_per_address (abfd),
+ /* Output-stub location. */
+ sec->output_section->_cooked_size
+ + (mmix_elf_section_data (sec
+ ->output_section)
+ ->pjs.stubs_size_sum)
+ /* Location of this PUSHJ reloc. */
+ - (sec->output_offset + irel->r_offset)
+ /* Don't count *this* stub twice. */
+ - (mmix_elf_section_data (sec)
+ ->pjs.stub_size[pjsno]
+ + MAX_PUSHJ_STUB_SIZE))
+ == bfd_reloc_ok)
+ mmix_elf_section_data (sec)->pjs.stub_size[pjsno] = 0;
+
+ mmix_elf_section_data (sec)->pjs.stubs_size_sum
+ += mmix_elf_section_data (sec)->pjs.stub_size[pjsno];
+
+ pjsno++;
+ }
+
+ continue;
+ }
+
/* Get the value of the symbol referred to by the reloc. */
if (ELF64_R_SYM (irel->r_info) < symtab_hdr->sh_info)
{
@@ -2424,7 +2769,6 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
else
{
unsigned long indx;
- struct elf_link_hash_entry *h;
/* An external symbol. */
indx = ELF64_R_SYM (irel->r_info) - symtab_hdr->sh_info;
@@ -2433,12 +2777,16 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
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. We need to keep BPO reloc accounting
- consistent, though. */
- gregdata->n_remaining_bpo_relocs_this_relaxation_round--;
- bpono++;
+ /* This appears to be a reference to an undefined symbol. Just
+ ignore it--it will be caught by the regular reloc processing.
+ We need to keep BPO reloc accounting consistent, though
+ else we'll abort instead of emitting an error message. */
+ if (ELF64_R_TYPE (irel->r_info) == R_MMIX_BASE_PLUS_OFFSET
+ && gregdata != NULL)
+ {
+ gregdata->n_remaining_bpo_relocs_this_relaxation_round--;
+ bpono++;
+ }
continue;
}
@@ -2447,6 +2795,62 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
+ h->root.u.def.section->output_offset);
}
+ if (ELF64_R_TYPE (irel->r_info) == (int) R_MMIX_PUSHJ_STUBBABLE)
+ {
+ bfd_vma value = symval + irel->r_addend;
+ bfd_vma dot
+ = (sec->output_section->vma
+ + sec->output_offset
+ + irel->r_offset);
+ bfd_vma stubaddr
+ = (sec->output_section->vma
+ + sec->output_offset
+ + raw_size
+ + mmix_elf_section_data (sec)->pjs.stubs_size_sum);
+
+ if ((value & 3) == 0
+ && bfd_check_overflow (complain_overflow_signed,
+ 19,
+ 0,
+ bfd_arch_bits_per_address (abfd),
+ value - dot
+ - (value > dot
+ ? mmix_elf_section_data (sec)
+ ->pjs.stub_size[pjsno]
+ : 0))
+ == bfd_reloc_ok)
+ /* If the reloc fits, no stub is needed. */
+ mmix_elf_section_data (sec)->pjs.stub_size[pjsno] = 0;
+ else
+ /* Maybe we can get away with just a JMP insn? */
+ if ((value & 3) == 0
+ && bfd_check_overflow (complain_overflow_signed,
+ 27,
+ 0,
+ bfd_arch_bits_per_address (abfd),
+ value - stubaddr
+ - (value > dot
+ ? mmix_elf_section_data (sec)
+ ->pjs.stub_size[pjsno] - 4
+ : 0))
+ == bfd_reloc_ok)
+ /* Yep, account for a stub consisting of a single JMP insn. */
+ mmix_elf_section_data (sec)->pjs.stub_size[pjsno] = 4;
+ else
+ /* Nope, go for the full insn stub. It doesn't seem useful to
+ emit the intermediate sizes; those will only be useful for
+ a >64M program assuming contiguous code. */
+ mmix_elf_section_data (sec)->pjs.stub_size[pjsno]
+ = MAX_PUSHJ_STUB_SIZE;
+
+ mmix_elf_section_data (sec)->pjs.stubs_size_sum
+ += mmix_elf_section_data (sec)->pjs.stub_size[pjsno];
+ pjsno++;
+ continue;
+ }
+
+ /* We're looking at a R_MMIX_BASE_PLUS_OFFSET reloc. */
+
gregdata->reloc_request[gregdata->bpo_reloc_indexes[bpono]].value
= symval + irel->r_addend;
gregdata->reloc_request[gregdata->bpo_reloc_indexes[bpono++]].valid = TRUE;
@@ -2457,7 +2861,8 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
calculate how many registers we need to cover them. Set the size of
the linker gregs, and if the number of registers changed, indicate
that we need to relax some more because we have more work to do. */
- if (gregdata->n_remaining_bpo_relocs_this_relaxation_round == 0)
+ if (gregdata != NULL
+ && gregdata->n_remaining_bpo_relocs_this_relaxation_round == 0)
{
size_t i;
bfd_vma prev_base;
@@ -2529,6 +2934,18 @@ 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)
+ abort ();
+
+ if (sec->_cooked_size
+ > raw_size + mmix_elf_section_data (sec)->pjs.stubs_size_sum)
+ {
+ sec->_cooked_size
+ = raw_size + mmix_elf_section_data (sec)->pjs.stubs_size_sum;
+ *again = TRUE;
+ }
+
return TRUE;
error_return:
@@ -2539,6 +2956,53 @@ 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
@@ -2587,5 +3051,6 @@ mmix_elf_relax_section (abfd, sec, link_info, again)
#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 2042e6a..8ae3f12 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -2,6 +2,7 @@
Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Linus Nordberg, Swox AB <info@swox.com>,
based on elf32-ppc.c by Ian Lance Taylor.
+ Largely rewritten by Alan Modra <amodra@bigpond.net.au>
This file is part of BFD, the Binary File Descriptor library.
@@ -64,7 +65,6 @@ static bfd_reloc_status_type ppc64_elf_unhandled_reloc
#define elf_backend_plt_not_loaded 1
#define elf_backend_got_symbol_offset 0
#define elf_backend_got_header_size 8
-#define elf_backend_plt_header_size PLT_INITIAL_ENTRY_SIZE
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
#define elf_backend_rela_normal 1
@@ -77,6 +77,8 @@ static bfd_reloc_status_type ppc64_elf_unhandled_reloc
#define bfd_elf64_bfd_link_hash_table_free ppc64_elf_link_hash_table_free
#define elf_backend_object_p ppc64_elf_object_p
+#define elf_backend_grok_prstatus ppc64_elf_grok_prstatus
+#define elf_backend_grok_psinfo ppc64_elf_grok_psinfo
#define elf_backend_create_dynamic_sections ppc64_elf_create_dynamic_sections
#define elf_backend_copy_indirect_symbol ppc64_elf_copy_indirect_symbol
#define elf_backend_check_relocs ppc64_elf_check_relocs
@@ -2372,6 +2374,45 @@ ppc64_elf_object_p (bfd *abfd)
return TRUE;
}
+/* Support for core dump NOTE sections. */
+
+static bfd_boolean
+ppc64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
+{
+ size_t offset, raw_size;
+
+ if (note->descsz != 504)
+ return FALSE;
+
+ /* pr_cursig */
+ elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
+
+ /* pr_pid */
+ elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 32);
+
+ /* pr_reg */
+ offset = 112;
+ raw_size = 384;
+
+ /* Make a ".reg/999" section. */
+ return _bfd_elfcore_make_pseudosection (abfd, ".reg",
+ raw_size, note->descpos + offset);
+}
+
+static bfd_boolean
+ppc64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+ if (note->descsz != 136)
+ return FALSE;
+
+ elf_tdata (abfd)->core_program
+ = _bfd_elfcore_strndup (abfd, note->descdata + 40, 16);
+ elf_tdata (abfd)->core_command
+ = _bfd_elfcore_strndup (abfd, note->descdata + 56, 80);
+
+ return TRUE;
+}
+
/* Merge backend specific data from an object file to the output
object file when linking. */
@@ -2405,20 +2446,13 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
static struct bfd_elf_special_section const ppc64_elf_special_sections[]=
{
- { ".sdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".sbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".plt", 0, NULL, 0,
- SHT_NOBITS, 0 },
- { ".toc", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".toc1", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".tocbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".plt", 4, 0, SHT_NOBITS, 0 },
+ { ".toc", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".toc1", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".tocbss", 7, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
struct _ppc64_elf_section_data
@@ -2803,9 +2837,6 @@ struct ppc_link_hash_table
asection *brlt;
asection *relbrlt;
- /* Short-cut to first output tls section. */
- asection *tls_sec;
-
/* Shortcut to .__tls_get_addr. */
struct elf_link_hash_entry *tls_get_addr;
@@ -4798,11 +4829,12 @@ get_sym_h (struct elf_link_hash_entry **hp, Elf_Internal_Sym **symp,
type suitable for optimization, and 1 otherwise. */
static int
-get_tls_mask (char **tls_maskp, Elf_Internal_Sym **locsymsp,
+get_tls_mask (char **tls_maskp, unsigned long *toc_symndx,
+ Elf_Internal_Sym **locsymsp,
const Elf_Internal_Rela *rel, bfd *ibfd)
{
unsigned long r_symndx;
- unsigned int next_r;
+ int next_r;
struct elf_link_hash_entry *h;
Elf_Internal_Sym *sym;
asection *sec;
@@ -4831,17 +4863,14 @@ get_tls_mask (char **tls_maskp, Elf_Internal_Sym **locsymsp,
next_r = ppc64_elf_section_data (sec)->t_symndx[off / 8 + 1];
if (!get_sym_h (&h, &sym, &sec, tls_maskp, locsymsp, r_symndx, ibfd))
return 0;
- if (h == NULL
- || h->root.type == bfd_link_hash_defined
- || h->root.type == bfd_link_hash_defweak)
- {
- if (next_r == (unsigned) -1)
- return 2;
- if (next_r == (unsigned) -2
- && (h == NULL
- || !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)))
- return 3;
- }
+ if (toc_symndx != NULL)
+ *toc_symndx = r_symndx;
+ if ((h == NULL
+ || ((h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && !(h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC)))
+ && (next_r == -1 || next_r == -2))
+ return 1 - next_r;
return 1;
}
@@ -5021,7 +5050,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
r_symndx = ELF64_R_SYM (rel->r_info);
if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms,
- r_symndx, ibfd))
+ r_symndx, ibfd))
goto error_ret;
if (rel->r_offset == offset)
@@ -5097,7 +5126,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
{
p->count -= 1;
if (p->count == 0)
- *pp = p->next;
+ *pp = p->next;
break;
}
pp = &p->next;
@@ -5140,22 +5169,14 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info)
return TRUE;
}
-/* Set htab->tls_sec. */
+/* Set htab->tls_get_addr and call the generic ELF tls_setup function. */
-bfd_boolean
+asection *
ppc64_elf_tls_setup (bfd *obfd, struct bfd_link_info *info)
{
- asection *tls;
struct ppc_link_hash_table *htab;
- for (tls = obfd->sections; tls != NULL; tls = tls->next)
- if ((tls->flags & (SEC_THREAD_LOCAL | SEC_LOAD))
- == (SEC_THREAD_LOCAL | SEC_LOAD))
- break;
-
htab = ppc_hash_table (info);
- htab->tls_sec = tls;
-
if (htab->tls_get_addr != NULL)
{
struct elf_link_hash_entry *h = htab->tls_get_addr;
@@ -5167,7 +5188,7 @@ ppc64_elf_tls_setup (bfd *obfd, struct bfd_link_info *info)
htab->tls_get_addr = h;
}
- return tls != NULL;
+ return _bfd_elf_tls_setup (obfd, info);
}
/* Run through all the TLS relocs looking for optimization
@@ -5250,7 +5271,7 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
is_local = TRUE;
value += sym_sec->output_offset;
value += sym_sec->output_section->vma;
- value -= htab->tls_sec->vma;
+ value -= htab->elf.tls_sec->vma;
ok_tprel = (value + TP_OFFSET + ((bfd_vma) 1 << 31)
< (bfd_vma) 1 << 32);
}
@@ -5325,7 +5346,7 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
char *toc_tls;
int retval;
- retval = get_tls_mask (&toc_tls, &locsyms,
+ retval = get_tls_mask (&toc_tls, NULL, &locsyms,
rel - 1, ibfd);
if (retval == 0)
goto err_free_rel;
@@ -6333,13 +6354,16 @@ static bfd_boolean
ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
{
struct ppc_stub_hash_entry *stub_entry;
+ struct bfd_link_info *info;
struct ppc_link_hash_table *htab;
bfd_vma off;
int size;
/* Massage our args to the form they really have. */
stub_entry = (struct ppc_stub_hash_entry *) gen_entry;
- htab = in_arg;
+ info = in_arg;
+
+ htab = ppc_hash_table (info);
if (stub_entry->stub_type == ppc_stub_plt_call)
{
@@ -6406,6 +6430,9 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
br_entry->iter = htab->stub_iteration;
br_entry->offset = htab->brlt->_raw_size;
htab->brlt->_raw_size += 8;
+
+ if (info->shared)
+ htab->relbrlt->_raw_size += sizeof (Elf64_External_Rela);
}
stub_entry->stub_type += ppc_stub_plt_branch - ppc_stub_long_branch;
@@ -6909,7 +6936,7 @@ ppc64_elf_size_stubs (bfd *output_bfd,
/* Get tls info. */
char *tls_mask;
- if (!get_tls_mask (&tls_mask, &local_syms,
+ if (!get_tls_mask (&tls_mask, NULL, &local_syms,
irela - 1, input_bfd))
goto error_ret_free_internal;
if (*tls_mask != 0)
@@ -6986,8 +7013,13 @@ ppc64_elf_size_stubs (bfd *output_bfd,
}
htab->brlt->_raw_size = 0;
htab->brlt->_cooked_size = 0;
+ if (info->shared)
+ {
+ htab->relbrlt->_raw_size = 0;
+ htab->relbrlt->_cooked_size = 0;
+ }
- bfd_hash_traverse (&htab->stub_hash_table, ppc_size_one_stub, htab);
+ bfd_hash_traverse (&htab->stub_hash_table, ppc_size_one_stub, info);
/* Ask the linker to do its stuff. */
(*htab->layout_sections_again) ();
@@ -7190,6 +7222,13 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
if (htab->brlt->contents == NULL)
return FALSE;
}
+ if (info->shared && htab->relbrlt->_raw_size != 0)
+ {
+ htab->relbrlt->contents = bfd_zalloc (htab->relbrlt->owner,
+ htab->relbrlt->_raw_size);
+ if (htab->relbrlt->contents == NULL)
+ return FALSE;
+ }
/* Build the stubs as directed by the stub hash table. */
bfd_hash_traverse (&htab->stub_hash_table, ppc_build_one_stub, info);
@@ -7315,8 +7354,9 @@ ppc64_elf_relocate_section (bfd *output_bfd,
struct elf_link_hash_entry *h;
struct elf_link_hash_entry *fdh;
const char *sym_name;
- unsigned long r_symndx;
+ unsigned long r_symndx, toc_symndx;
char tls_mask, tls_gd, tls_type;
+ char sym_type;
bfd_vma relocation;
bfd_boolean unresolved_reloc;
bfd_boolean warned;
@@ -7350,7 +7390,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
sym_name = bfd_elf_local_sym_name (input_bfd, sym);
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ 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)
{
long *opd_sym_adjust;
@@ -7367,6 +7408,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
unresolved_reloc, info,
warned);
sym_name = h->root.root.string;
+ sym_type = h->type;
}
/* TLS optimizations. Replace instruction sequences and relocs
@@ -7375,6 +7417,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
for the final instruction stream. */
tls_mask = 0;
tls_gd = 0;
+ toc_symndx = 0;
if (IS_PPC64_TLS_RELOC (r_type))
{
if (h != NULL)
@@ -7385,6 +7428,42 @@ ppc64_elf_relocate_section (bfd *output_bfd,
lgot_masks = (char *) (local_got_ents + symtab_hdr->sh_info);
tls_mask = lgot_masks[r_symndx];
}
+ if (tls_mask == 0 && r_type == R_PPC64_TLS)
+ {
+ /* Check for toc tls entries. */
+ char *toc_tls;
+
+ if (!get_tls_mask (&toc_tls, &toc_symndx, &local_syms,
+ rel, input_bfd))
+ return FALSE;
+
+ if (toc_tls)
+ tls_mask = *toc_tls;
+ }
+ }
+
+ /* Check that tls relocs are used with tls syms, and non-tls
+ relocs are used with non-tls syms. */
+ 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)
+ && IS_PPC64_TLS_RELOC (r_type) != (sym_type == STT_TLS))
+ {
+ if (r_type == R_PPC64_TLS && tls_mask != 0)
+ /* R_PPC64_TLS is OK against a symbol in the TOC. */
+ ;
+ 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,
+ (long) rel->r_offset,
+ ppc64_elf_howto_table[r_type]->name,
+ sym_name);
}
/* Ensure reloc mapping code below stays sane. */
@@ -7399,6 +7478,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
|| (R_PPC64_GOT_TLSLD16_HI & 3) != (R_PPC64_GOT_TPREL16_HI & 3)
|| (R_PPC64_GOT_TLSLD16_HA & 3) != (R_PPC64_GOT_TPREL16_HA & 3))
abort ();
+
switch (r_type)
{
default:
@@ -7413,7 +7493,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
char *toc_tls;
int retval;
- retval = get_tls_mask (&toc_tls, &local_syms, rel, input_bfd);
+ retval = get_tls_mask (&toc_tls, &toc_symndx, &local_syms,
+ rel, input_bfd);
if (retval == 0)
return FALSE;
@@ -7458,22 +7539,20 @@ ppc64_elf_relocate_section (bfd *output_bfd,
insn |= 0x3c0d0000; /* addis 0,13,0 */
bfd_put_32 (output_bfd, insn, contents + rel->r_offset - 2);
r_type = R_PPC64_TPREL16_HA;
- rel->r_info = ELF64_R_INFO (r_symndx, r_type);
+ if (toc_symndx != 0)
+ {
+ rel->r_info = ELF64_R_INFO (toc_symndx, r_type);
+ /* We changed the symbol. Start over in order to
+ get h, sym, sec etc. right. */
+ rel--;
+ continue;
+ }
+ else
+ rel->r_info = ELF64_R_INFO (r_symndx, r_type);
}
break;
case R_PPC64_TLS:
- if (tls_mask == 0)
- {
- /* Check for toc tls entries. */
- char *toc_tls;
-
- if (!get_tls_mask (&toc_tls, &local_syms, rel, input_bfd))
- return FALSE;
-
- if (toc_tls)
- tls_mask = *toc_tls;
- }
if (tls_mask != 0
&& (tls_mask & TLS_TPREL) == 0)
{
@@ -7509,11 +7588,20 @@ ppc64_elf_relocate_section (bfd *output_bfd,
abort ();
insn |= rtra;
bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
- r_type = R_PPC64_TPREL16_LO;
- rel->r_info = ELF64_R_INFO (r_symndx, r_type);
/* Was PPC64_TLS which sits on insn boundary, now
PPC64_TPREL16_LO which is at insn+2. */
rel->r_offset += 2;
+ r_type = R_PPC64_TPREL16_LO;
+ if (toc_symndx != 0)
+ {
+ rel->r_info = ELF64_R_INFO (toc_symndx, r_type);
+ /* We changed the symbol. Start over in order to
+ get h, sym, sec etc. right. */
+ rel--;
+ continue;
+ }
+ else
+ rel->r_info = ELF64_R_INFO (r_symndx, r_type);
}
break;
@@ -7609,9 +7697,11 @@ ppc64_elf_relocate_section (bfd *output_bfd,
{
/* Was an LD reloc. */
r_symndx = 0;
- rel->r_addend = htab->tls_sec->vma + DTP_OFFSET;
- rel[1].r_addend = htab->tls_sec->vma + DTP_OFFSET;
+ rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET;
+ rel[1].r_addend = htab->elf.tls_sec->vma + DTP_OFFSET;
}
+ else if (toc_symndx != 0)
+ r_symndx = toc_symndx;
r_type = R_PPC64_TPREL16_HA;
rel->r_info = ELF64_R_INFO (r_symndx, r_type);
rel[1].r_info = ELF64_R_INFO (r_symndx,
@@ -7628,10 +7718,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
bfd_put_32 (output_bfd, insn1, contents + rel->r_offset - 2);
bfd_put_32 (output_bfd, insn2, contents + offset);
bfd_put_32 (output_bfd, insn3, contents + offset + 4);
- if (tls_gd == 0)
+ if (tls_gd == 0 || toc_symndx != 0)
{
- /* We changed the symbol on an LD reloc. Start over
- in order to get h, sym, sec etc. right. */
+ /* We changed the symbol. Start over in order
+ to get h, sym, sec etc. right. */
rel--;
continue;
}
@@ -8013,7 +8103,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
{
outrel.r_addend += relocation;
if (tls_type & (TLS_GD | TLS_DTPREL | TLS_TPREL))
- outrel.r_addend -= htab->tls_sec->vma;
+ outrel.r_addend -= htab->elf.tls_sec->vma;
}
loc = relgot->contents;
loc += (relgot->reloc_count++
@@ -8030,7 +8120,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
relocation = 1;
else if (tls_type != 0)
{
- relocation -= htab->tls_sec->vma + DTP_OFFSET;
+ relocation -= htab->elf.tls_sec->vma + DTP_OFFSET;
if (tls_type == (TLS_TLS | TLS_TPREL))
relocation += DTP_OFFSET - TP_OFFSET;
@@ -8094,7 +8184,9 @@ ppc64_elf_relocate_section (bfd *output_bfd,
relocation = TOCstart;
if (r_symndx == 0)
relocation += htab->stub_group[input_section->id].toc_off;
- else if (sec != NULL && !unresolved_reloc)
+ else if (unresolved_reloc)
+ ;
+ else if (sec != NULL && sec->id <= htab->top_id)
relocation += htab->stub_group[sec->id].toc_off;
else
unresolved_reloc = TRUE;
@@ -8140,7 +8232,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
case R_PPC64_TPREL16_HIGHERA:
case R_PPC64_TPREL16_HIGHEST:
case R_PPC64_TPREL16_HIGHESTA:
- addend -= htab->tls_sec->vma + TP_OFFSET;
+ addend -= htab->elf.tls_sec->vma + TP_OFFSET;
if (info->shared)
/* The TPREL16 relocs shouldn't really be used in shared
libs as they will result in DT_TEXTREL being set, but
@@ -8158,7 +8250,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
case R_PPC64_DTPREL16_HIGHERA:
case R_PPC64_DTPREL16_HIGHEST:
case R_PPC64_DTPREL16_HIGHESTA:
- addend -= htab->tls_sec->vma + DTP_OFFSET;
+ addend -= htab->elf.tls_sec->vma + DTP_OFFSET;
break;
case R_PPC64_DTPMOD64:
@@ -8167,11 +8259,11 @@ ppc64_elf_relocate_section (bfd *output_bfd,
goto dodyn;
case R_PPC64_TPREL64:
- addend -= htab->tls_sec->vma + TP_OFFSET;
+ addend -= htab->elf.tls_sec->vma + TP_OFFSET;
goto dodyn;
case R_PPC64_DTPREL64:
- addend -= htab->tls_sec->vma + DTP_OFFSET;
+ addend -= htab->elf.tls_sec->vma + DTP_OFFSET;
/* Fall thru */
/* Relocations that may need to be propagated if this is a
diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h
index c26df82..998e7e1 100644
--- a/bfd/elf64-ppc.h
+++ b/bfd/elf64-ppc.h
@@ -23,7 +23,7 @@ bfd_boolean ppc64_elf_mark_entry_syms
(struct bfd_link_info *);
bfd_boolean ppc64_elf_edit_opd
(bfd *, struct bfd_link_info *);
-bfd_boolean ppc64_elf_tls_setup
+asection *ppc64_elf_tls_setup
(bfd *, struct bfd_link_info *);
bfd_boolean ppc64_elf_tls_optimize
(bfd *, struct bfd_link_info *);
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index de712f7..6e72ced 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -2186,10 +2186,10 @@ static bfd_vma
dtpoff_base (info)
struct bfd_link_info *info;
{
- /* If tls_segment is NULL, we should have signalled an error already. */
- if (elf_hash_table (info)->tls_segment == NULL)
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (elf_hash_table (info)->tls_sec == NULL)
return 0;
- return elf_hash_table (info)->tls_segment->start;
+ return elf_hash_table (info)->tls_sec->vma;
}
/* Return the relocation value for @tpoff relocation
@@ -2200,14 +2200,12 @@ tpoff (info, address)
struct bfd_link_info *info;
bfd_vma address;
{
- struct elf_link_tls_segment *tls_segment
- = elf_hash_table (info)->tls_segment;
+ struct elf_link_hash_table *htab = elf_hash_table (info);
- /* If tls_segment is NULL, we should have signalled an error already. */
- if (tls_segment == NULL)
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (htab->tls_sec == NULL)
return 0;
- return (align_power (tls_segment->size, tls_segment->align)
- + tls_segment->start - address);
+ return htab->tls_size + htab->tls_sec->vma - address;
}
/* Complain if TLS instruction relocation is against an invalid
@@ -2297,7 +2295,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else
{
@@ -3411,7 +3409,6 @@ const struct elf_size_info s390_elf64_size_info =
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 24
-#define elf_backend_plt_header_size PLT_ENTRY_SIZE
#define elf_backend_rela_normal 1
#define elf_info_to_howto elf_s390_info_to_howto
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index e0bc8df..db096a5 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -1532,8 +1532,10 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
|| (r_type >= (int) R_SH_FIRST_INVALID_RELOC
&& r_type <= (int) R_SH_LAST_INVALID_RELOC)
|| (r_type >= (int) R_SH_DIR8WPN
- && r_type <= (int) R_SH_LAST_INVALID_RELOC_2)
- || (r_type >= (int) R_SH_FIRST_INVALID_RELOC_3
+ && r_type <= (int) R_SH_LAST_INVALID_RELOC)
+ || (r_type >= (int) R_SH_GNU_VTINHERIT
+ && r_type <= (int) R_SH_PSHL)
+ || (r_type >= (int) R_SH_FIRST_INVALID_RELOC_2
&& r_type <= R_SH_GOTPLT32)
|| (r_type >= (int) R_SH_FIRST_INVALID_RELOC_4
&& r_type <= (int) R_SH_LAST_INVALID_RELOC_4))
@@ -1580,7 +1582,7 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
}
else if (! howto->partial_inplace)
{
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
relocation |= ((sym->st_other & STO_SH5_ISA32) != 0);
}
else if ((sec->flags & SEC_MERGE)
@@ -4116,12 +4118,31 @@ sh64_elf64_finish_dynamic_sections (bfd *output_bfd,
return TRUE;
}
+/* Merge non visibility st_other attribute when the symbol comes from
+ a dynamic object. */
+static void
+sh64_elf64_merge_symbol_attribute (struct elf_link_hash_entry *h,
+ const Elf_Internal_Sym *isym,
+ bfd_boolean definition,
+ bfd_boolean dynamic)
+{
+ if (isym->st_other != 0 && dynamic)
+ {
+ unsigned char other;
+
+ /* Take the balance of OTHER from the definition. */
+ other = (definition ? isym->st_other : h->other);
+ other &= ~ ELF_ST_VISIBILITY (-1);
+ h->other = other | ELF_ST_VISIBILITY (h->other);
+ }
+
+ return;
+}
+
static struct bfd_elf_special_section const sh64_elf64_special_sections[]=
{
- { ".cranges", 0, NULL, 0,
- SHT_PROGBITS, 0 },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".cranges", 8, 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
};
#define TARGET_BIG_SYM bfd_elf64_sh64_vec
@@ -4164,6 +4185,9 @@ static struct bfd_elf_special_section const sh64_elf64_special_sections[]=
#define elf_backend_link_output_symbol_hook \
sh64_elf64_link_output_symbol_hook
+#define elf_backend_merge_symbol_attribute \
+ sh64_elf64_merge_symbol_attribute
+
#define elf_backend_final_write_processing \
sh64_elf64_final_write_processing
@@ -4185,7 +4209,6 @@ static struct bfd_elf_special_section const sh64_elf64_special_sections[]=
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size 24
-#define elf_backend_plt_header_size PLT_ENTRY_SIZE
#include "elf64-target.h"
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index a74a7f3..92609e2 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -2070,7 +2070,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else
{
@@ -2247,16 +2247,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (is_plt)
sec = splt;
- else if (h == NULL)
- sec = local_sections[r_symndx];
- else
- {
- BFD_ASSERT (h->root.type == bfd_link_hash_defined
- || (h->root.type
- == bfd_link_hash_defweak));
- sec = h->root.u.def.section;
- }
- if (sec != NULL && bfd_is_abs_section (sec))
+
+ if (bfd_is_abs_section (sec))
indx = 0;
else if (sec == NULL || sec->owner == NULL)
{
@@ -3236,6 +3228,5 @@ const struct elf_size_info sparc64_elf_size_info =
#define elf_backend_plt_alignment 8
#define elf_backend_got_header_size 8
-#define elf_backend_plt_header_size PLT_HEADER_SIZE
#include "elf64-target.h"
diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
index 8aed498..4cfcba5 100644
--- a/bfd/elf64-x86-64.c
+++ b/bfd/elf64-x86-64.c
@@ -1739,10 +1739,10 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
static bfd_vma
dtpoff_base (struct bfd_link_info *info)
{
- /* If tls_segment is NULL, we should have signalled an error already. */
- if (elf_hash_table (info)->tls_segment == NULL)
+ /* If tls_sec is NULL, we should have signalled an error already. */
+ if (elf_hash_table (info)->tls_sec == NULL)
return 0;
- return elf_hash_table (info)->tls_segment->start;
+ return elf_hash_table (info)->tls_sec->vma;
}
/* Return the relocation value for @tpoff relocation
@@ -1751,14 +1751,12 @@ dtpoff_base (struct bfd_link_info *info)
static bfd_vma
tpoff (struct bfd_link_info *info, bfd_vma address)
{
- struct elf_link_tls_segment *tls_segment
- = elf_hash_table (info)->tls_segment;
+ struct elf_link_hash_table *htab = elf_hash_table (info);
/* If tls_segment is NULL, we should have signalled an error already. */
- if (tls_segment == NULL)
+ if (htab->tls_sec == NULL)
return 0;
- return address - align_power (tls_segment->size, tls_segment->align)
- - tls_segment->start;
+ return address - htab->tls_size - htab->tls_sec->vma;
}
/* Relocate an x86_64 ELF section. */
@@ -1823,7 +1821,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else
{
@@ -2048,16 +2046,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
long sindx;
- if (h == NULL)
- sec = local_sections[r_symndx];
- else
- {
- BFD_ASSERT (h->root.type == bfd_link_hash_defined
- || (h->root.type
- == bfd_link_hash_defweak));
- sec = h->root.u.def.section;
- }
- if (sec != NULL && bfd_is_abs_section (sec))
+ if (bfd_is_abs_section (sec))
sindx = 0;
else if (sec == NULL || sec->owner == NULL)
{
@@ -2792,7 +2781,6 @@ elf64_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
#define elf_backend_got_header_size (GOT_ENTRY_SIZE*3)
-#define elf_backend_plt_header_size PLT_ENTRY_SIZE
#define elf_backend_rela_normal 1
#define elf_info_to_howto elf64_x86_64_info_to_howto
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index a627e48..87d96fa 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -102,7 +102,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define elf_get_reloc_upper_bound NAME(bfd_elf,get_reloc_upper_bound)
#define elf_canonicalize_reloc NAME(bfd_elf,canonicalize_reloc)
#define elf_slurp_symbol_table NAME(bfd_elf,slurp_symbol_table)
-#define elf_get_symtab NAME(bfd_elf,get_symtab)
+#define elf_canonicalize_symtab NAME(bfd_elf,canonicalize_symtab)
#define elf_canonicalize_dynamic_symtab \
NAME(bfd_elf,canonicalize_dynamic_symtab)
#define elf_make_empty_symbol NAME(bfd_elf,make_empty_symbol)
diff --git a/bfd/elflink.c b/bfd/elflink.c
index d53571d..919de9c 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -353,9 +353,8 @@ _bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info,
if (h->dynindx == -1)
{
struct elf_strtab_hash *dynstr;
- char *p, *alc;
+ char *p;
const char *name;
- bfd_boolean copy;
bfd_size_type indx;
/* XXX: The ABI draft says the linker must turn hidden and
@@ -393,28 +392,18 @@ _bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info,
table. */
name = h->root.root.string;
p = strchr (name, ELF_VER_CHR);
- if (p == NULL)
- {
- alc = NULL;
- copy = FALSE;
- }
- else
- {
- size_t len = p - name + 1;
+ if (p != NULL)
+ /* We know that the p points into writable memory. In fact,
+ there are only a few symbols that have read-only names, being
+ those like _GLOBAL_OFFSET_TABLE_ that are created specially
+ by the backends. Most symbols will have names pointing into
+ an ELF string table read from a file, or to objalloc memory. */
+ *p = 0;
- alc = bfd_malloc (len);
- if (alc == NULL)
- return FALSE;
- memcpy (alc, name, len - 1);
- alc[len - 1] = '\0';
- name = alc;
- copy = TRUE;
- }
-
- indx = _bfd_elf_strtab_add (dynstr, name, copy);
+ indx = _bfd_elf_strtab_add (dynstr, name, p != NULL);
- if (alc != NULL)
- free (alc);
+ if (p != NULL)
+ *p = ELF_VER_CHR;
if (indx == (bfd_size_type) -1)
return FALSE;
@@ -962,12 +951,16 @@ _bfd_elf_merge_symbol (bfd *abfd,
/* It's OK to change the type if either the existing symbol or the
new symbol is weak unless it comes from a DT_NEEDED entry of
a shared object, in which case, the DT_NEEDED entry may not be
- required at the run time. */
+ required at the run time. The type change is also OK if the
+ old symbol is undefined and the new symbol is defined. */
if ((! dt_needed && oldweakdef)
|| oldweakundef
|| newweakdef
- || newweakundef)
+ || newweakundef
+ || (newdef
+ && (h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak)))
*type_change_ok = TRUE;
/* It's OK to change the size if either the existing symbol or the
@@ -1501,22 +1494,18 @@ _bfd_elf_export_symbol (struct elf_link_hash_entry *h, void *data)
for (t = eif->verdefs; t != NULL; t = t->next)
{
- if (t->globals != NULL)
+ if (t->globals.list != NULL)
{
- for (d = t->globals; d != NULL; d = d->next)
- {
- if ((*d->match) (d, h->root.root.string))
- goto doit;
- }
+ d = (*t->match) (&t->globals, NULL, h->root.root.string);
+ if (d != NULL)
+ goto doit;
}
- if (t->locals != NULL)
+ if (t->locals.list != NULL)
{
- for (d = t->locals ; d != NULL; d = d->next)
- {
- if ((*d->match) (d, h->root.root.string))
- return TRUE;
- }
+ d = (*t->match) (&t->locals, NULL, h->root.root.string);
+ if (d != NULL)
+ return TRUE;
}
}
@@ -1695,31 +1684,19 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
t->used = TRUE;
d = NULL;
- if (t->globals != NULL)
- {
- for (d = t->globals; d != NULL; d = d->next)
- if ((*d->match) (d, alc))
- break;
- }
+ if (t->globals.list != NULL)
+ d = (*t->match) (&t->globals, NULL, alc);
/* See if there is anything to force this symbol to
local scope. */
- if (d == NULL && t->locals != NULL)
+ if (d == NULL && t->locals.list != NULL)
{
- for (d = t->locals; d != NULL; d = d->next)
- {
- if ((*d->match) (d, alc))
- {
- if (h->dynindx != -1
- && info->shared
- && ! info->export_dynamic)
- {
- (*bed->elf_backend_hide_symbol) (info, h, TRUE);
- }
-
- break;
- }
- }
+ d = (*t->match) (&t->locals, NULL, alc);
+ if (d != NULL
+ && h->dynindx != -1
+ && info->shared
+ && ! info->export_dynamic)
+ (*bed->elf_backend_hide_symbol) (info, h, TRUE);
}
free (alc);
@@ -1740,18 +1717,14 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
return TRUE;
amt = sizeof *t;
- t = bfd_alloc (sinfo->output_bfd, amt);
+ t = bfd_zalloc (sinfo->output_bfd, amt);
if (t == NULL)
{
sinfo->failed = TRUE;
return FALSE;
}
- t->next = NULL;
t->name = p;
- t->globals = NULL;
- t->locals = NULL;
- t->deps = NULL;
t->name_indx = (unsigned int) -1;
t->used = TRUE;
@@ -1797,30 +1770,26 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
local_ver = NULL;
for (t = sinfo->verdefs; t != NULL; t = t->next)
{
- if (t->globals != NULL)
+ if (t->globals.list != NULL)
{
bfd_boolean matched;
matched = FALSE;
- for (d = t->globals; d != NULL; d = d->next)
- {
- if ((*d->match) (d, h->root.root.string))
- {
- if (d->symver)
- matched = TRUE;
- else
- {
- /* There is a version without definition. Make
- the symbol the default definition for this
- version. */
- h->verinfo.vertree = t;
- local_ver = NULL;
- d->script = 1;
- break;
- }
- }
- }
-
+ d = NULL;
+ while ((d = (*t->match) (&t->globals, d,
+ h->root.root.string)) != NULL)
+ if (d->symver)
+ matched = TRUE;
+ else
+ {
+ /* There is a version without definition. Make
+ the symbol the default definition for this
+ version. */
+ h->verinfo.vertree = t;
+ local_ver = NULL;
+ d->script = 1;
+ break;
+ }
if (d != NULL)
break;
else if (matched)
@@ -1829,19 +1798,18 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
(*bed->elf_backend_hide_symbol) (info, h, TRUE);
}
- if (t->locals != NULL)
+ if (t->locals.list != NULL)
{
- for (d = t->locals; d != NULL; d = d->next)
+ d = NULL;
+ while ((d = (*t->match) (&t->locals, d,
+ h->root.root.string)) != NULL)
{
+ local_ver = t;
/* If the match is "*", keep looking for a more
- explicit, perhaps even global, match. */
- if (d->pattern[0] == '*' && d->pattern[1] == '\0')
- local_ver = t;
- else if ((*d->match) (d, h->root.root.string))
- {
- local_ver = t;
- break;
- }
+ explicit, perhaps even global, match.
+ XXX: Shouldn't this be !d->wildcard instead? */
+ if (d->pattern[0] != '*' || d->pattern[1] != '\0')
+ break;
}
if (d != NULL)
@@ -1875,6 +1843,7 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
static bfd_boolean
elf_link_read_relocs_from_section (bfd *abfd,
+ asection *sec,
Elf_Internal_Shdr *shdr,
void *external_relocs,
Elf_Internal_Rela *internal_relocs)
@@ -1884,6 +1853,8 @@ elf_link_read_relocs_from_section (bfd *abfd,
const bfd_byte *erela;
const bfd_byte *erelaend;
Elf_Internal_Rela *irela;
+ Elf_Internal_Shdr *symtab_hdr;
+ size_t nsyms;
/* If there aren't any relocations, that's OK. */
if (!shdr)
@@ -1897,6 +1868,9 @@ elf_link_read_relocs_from_section (bfd *abfd,
if (bfd_bread (external_relocs, shdr->sh_size, abfd) != shdr->sh_size)
return FALSE;
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ nsyms = symtab_hdr->sh_size / symtab_hdr->sh_entsize;
+
bed = get_elf_backend_data (abfd);
/* Convert the external relocations to the internal format. */
@@ -1915,7 +1889,21 @@ elf_link_read_relocs_from_section (bfd *abfd,
irela = internal_relocs;
while (erela < erelaend)
{
+ bfd_vma r_symndx;
+
(*swap_in) (abfd, erela, irela);
+ r_symndx = ELF32_R_SYM (irela->r_info);
+ if (bed->s->arch_size == 64)
+ r_symndx >>= 24;
+ 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);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
irela += bed->s->int_rels_per_ext_rel;
erela += shdr->sh_entsize;
}
@@ -1979,12 +1967,12 @@ _bfd_elf_link_read_relocs (bfd *abfd,
external_relocs = alloc1;
}
- if (!elf_link_read_relocs_from_section (abfd, rel_hdr,
+ if (!elf_link_read_relocs_from_section (abfd, o, rel_hdr,
external_relocs,
internal_relocs))
goto error_return;
if (!elf_link_read_relocs_from_section
- (abfd,
+ (abfd, o,
elf_section_data (o)->rel_hdr2,
((bfd_byte *) external_relocs) + rel_hdr->sh_size,
internal_relocs + (NUM_SHDR_ENTRIES (rel_hdr)
@@ -2531,3 +2519,31 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
dynamic linker will resolve them locally. */
return local_protected;
}
+
+/* Caches some TLS segment info, and ensures that the TLS segment vma is
+ aligned. Returns the first TLS output section. */
+
+struct bfd_section *
+_bfd_elf_tls_setup (bfd *obfd, struct bfd_link_info *info)
+{
+ struct bfd_section *sec, *tls;
+ unsigned int align = 0;
+
+ for (sec = obfd->sections; sec != NULL; sec = sec->next)
+ if ((sec->flags & SEC_THREAD_LOCAL) != 0)
+ break;
+ tls = sec;
+
+ for (; sec != NULL && (sec->flags & SEC_THREAD_LOCAL) != 0; sec = sec->next)
+ if (sec->alignment_power > align)
+ align = sec->alignment_power;
+
+ elf_hash_table (info)->tls_sec = tls;
+
+ /* Ensure the alignment of the first section is the largest alignment,
+ so that the tls segment starts aligned. */
+ if (tls != NULL)
+ tls->alignment_power = align;
+
+ return tls;
+}
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 48b86cf..04df5d6 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -20,6 +20,8 @@
/* ELF linker code. */
+#include "safe-ctype.h"
+
static bfd_boolean elf_link_add_object_symbols (bfd *, struct bfd_link_info *);
static bfd_boolean elf_link_add_archive_symbols (bfd *,
struct bfd_link_info *);
@@ -1259,6 +1261,10 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
/* If st_other has a processor-specific meaning, specific
code might be needed here. We never merge the visibility
attribute with the one from a dynamic object. */
+ if (bed->elf_backend_merge_symbol_attribute)
+ (*bed->elf_backend_merge_symbol_attribute) (h, isym, definition,
+ dynamic);
+
if (isym->st_other != 0 && !dynamic)
{
unsigned char hvis, symvis, other, nvis;
@@ -1607,27 +1613,32 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
&& is_elf_hash_table (info)
&& (info->strip != strip_all && info->strip != strip_debugger))
{
- asection *stab, *stabstr;
-
- stab = bfd_get_section_by_name (abfd, ".stab");
- if (stab != NULL
- && (stab->flags & SEC_MERGE) == 0
- && !bfd_is_abs_section (stab->output_section))
+ asection *stabstr;
+
+ stabstr = bfd_get_section_by_name (abfd, ".stabstr");
+ if (stabstr != NULL)
{
- stabstr = bfd_get_section_by_name (abfd, ".stabstr");
-
- if (stabstr != NULL)
- {
- struct bfd_elf_section_data *secdata;
-
- secdata = elf_section_data (stab);
- if (! _bfd_link_section_stabs (abfd,
- & hash_table->stab_info,
- stab, stabstr,
- &secdata->sec_info))
- goto error_return;
- if (secdata->sec_info)
- stab->sec_info_type = ELF_INFO_TYPE_STABS;
+ bfd_size_type string_offset = 0;
+ asection *stab;
+
+ for (stab = abfd->sections; stab; stab = stab->next)
+ if (strncmp (".stab", stab->name, 5) == 0
+ && (!stab->name[5] ||
+ (stab->name[5] == '.' && ISDIGIT (stab->name[6])))
+ && (stab->flags & SEC_MERGE) == 0
+ && !bfd_is_abs_section (stab->output_section))
+ {
+ struct bfd_elf_section_data *secdata;
+
+ secdata = elf_section_data (stab);
+ if (! _bfd_link_section_stabs (abfd,
+ & hash_table->stab_info,
+ stab, stabstr,
+ &secdata->sec_info,
+ &string_offset))
+ goto error_return;
+ if (secdata->sec_info)
+ stab->sec_info_type = ELF_INFO_TYPE_STABS;
}
}
}
@@ -1970,7 +1981,7 @@ NAME(bfd_elf,size_dynamic_sections) (bfd *output_bfd,
bfd_boolean all_defined;
*sinterpptr = bfd_get_section_by_name (dynobj, ".interp");
- BFD_ASSERT (*sinterpptr != NULL || info->shared);
+ BFD_ASSERT (*sinterpptr != NULL || !info->executable);
if (soname != NULL)
{
@@ -2047,15 +2058,15 @@ NAME(bfd_elf,size_dynamic_sections) (bfd *output_bfd,
/* Make all global versions with definiton. */
for (t = verdefs; t != NULL; t = t->next)
- for (d = t->globals; d != NULL; d = d->next)
- if (!d->symver && strchr (d->pattern, '*') == NULL)
+ for (d = t->globals.list; d != NULL; d = d->next)
+ if (!d->symver && d->symbol)
{
const char *verstr, *name;
size_t namelen, verlen, newlen;
char *newname, *p;
struct elf_link_hash_entry *newh;
- name = d->pattern;
+ name = d->symbol;
namelen = strlen (name);
verstr = t->name;
verlen = strlen (verstr);
@@ -2113,9 +2124,8 @@ NAME(bfd_elf,size_dynamic_sections) (bfd *output_bfd,
/* Check if all global versions have a definiton. */
all_defined = TRUE;
for (t = verdefs; t != NULL; t = t->next)
- for (d = t->globals; d != NULL; d = d->next)
- if (!d->symver && !d->script
- && strchr (d->pattern, '*') == NULL)
+ for (d = t->globals.list; d != NULL; d = d->next)
+ if (!d->symver && !d->script)
{
(*_bfd_error_handler)
(_("%s: undefined version: %s"),
@@ -2362,7 +2372,7 @@ NAME(bfd_elf,size_dynamic_sections) (bfd *output_bfd,
def.vd_version = VER_DEF_CURRENT;
def.vd_flags = 0;
- if (t->globals == NULL && t->locals == NULL && ! t->used)
+ if (t->globals.list == NULL && t->locals.list == NULL && ! t->used)
def.vd_flags |= VER_FLG_WEAK;
def.vd_ndx = t->vernum + 1;
def.vd_cnt = cdeps + 1;
@@ -2794,8 +2804,6 @@ struct elf_final_link_info
asection *hash_sec;
/* symbol version section (.gnu.version). */
asection *symver_sec;
- /* first SHF_TLS section (if any). */
- asection *first_tls_sec;
/* Buffer large enough to hold contents of any section. */
bfd_byte *contents;
/* Buffer large enough to hold external relocs of any section. */
@@ -3150,14 +3158,6 @@ elf_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
finfo.symshndxbuf = NULL;
finfo.symbuf_count = 0;
finfo.shndxbuf_size = 0;
- finfo.first_tls_sec = NULL;
- for (o = abfd->sections; o != NULL; o = o->next)
- if ((o->flags & SEC_THREAD_LOCAL) != 0
- && (o->flags & SEC_LOAD) != 0)
- {
- finfo.first_tls_sec = o;
- break;
- }
/* Count up the number of relocations we will output for each output
section, so that we know the sizes of the reloc sections. We
@@ -3515,38 +3515,30 @@ elf_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
goto error_return;
}
- if (finfo.first_tls_sec)
+ if (elf_hash_table (info)->tls_sec)
{
- unsigned int align = 0;
- bfd_vma base = finfo.first_tls_sec->vma, end = 0;
+ bfd_vma base, end = 0;
asection *sec;
- for (sec = finfo.first_tls_sec;
+ for (sec = elf_hash_table (info)->tls_sec;
sec && (sec->flags & SEC_THREAD_LOCAL);
sec = sec->next)
{
bfd_vma size = sec->_raw_size;
- if (bfd_get_section_alignment (abfd, sec) > align)
- align = bfd_get_section_alignment (abfd, sec);
- if (sec->_raw_size == 0 && (sec->flags & SEC_HAS_CONTENTS) == 0)
+ if (size == 0 && (sec->flags & SEC_HAS_CONTENTS) == 0)
{
struct bfd_link_order *o;
- size = 0;
for (o = sec->link_order_head; o != NULL; o = o->next)
if (size < o->offset + o->size)
size = o->offset + o->size;
}
end = sec->vma + size;
}
- elf_hash_table (info)->tls_segment
- = bfd_zalloc (abfd, sizeof (struct elf_link_tls_segment));
- if (elf_hash_table (info)->tls_segment == NULL)
- goto error_return;
- elf_hash_table (info)->tls_segment->start = base;
- elf_hash_table (info)->tls_segment->size = end - base;
- elf_hash_table (info)->tls_segment->align = align;
+ base = elf_hash_table (info)->tls_sec->vma;
+ end = align_power (end, elf_hash_table (info)->tls_sec->alignment_power);
+ elf_hash_table (info)->tls_size = end - base;
}
/* Since ELF permits relocations to be against local symbols, we
@@ -4493,8 +4485,8 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
{
/* STT_TLS symbols are relative to PT_TLS segment
base. */
- BFD_ASSERT (finfo->first_tls_sec != NULL);
- sym.st_value -= finfo->first_tls_sec->vma;
+ BFD_ASSERT (elf_hash_table (finfo->info)->tls_sec != NULL);
+ sym.st_value -= elf_hash_table (finfo->info)->tls_sec->vma;
}
}
}
@@ -4852,8 +4844,8 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
if (ELF_ST_TYPE (osym.st_info) == STT_TLS)
{
/* STT_TLS symbols are relative to PT_TLS segment base. */
- BFD_ASSERT (finfo->first_tls_sec != NULL);
- osym.st_value -= finfo->first_tls_sec->vma;
+ BFD_ASSERT (elf_hash_table (finfo->info)->tls_sec != NULL);
+ osym.st_value -= elf_hash_table (finfo->info)->tls_sec->vma;
}
}
@@ -5209,8 +5201,10 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
{
/* STT_TLS symbols are relative to PT_TLS
segment base. */
- BFD_ASSERT (finfo->first_tls_sec != NULL);
- sym.st_value -= finfo->first_tls_sec->vma;
+ BFD_ASSERT (elf_hash_table (finfo->info)
+ ->tls_sec != NULL);
+ sym.st_value -= (elf_hash_table (finfo->info)
+ ->tls_sec->vma);
}
}
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
index 60c6ad0..d944a46 100644
--- a/bfd/elfn32-mips.c
+++ b/bfd/elfn32-mips.c
@@ -2248,7 +2248,6 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
#define elf_backend_ecoff_debug_swap &mips_elf32_ecoff_debug_swap
#define elf_backend_got_header_size (4 * MIPS_RESERVED_GOTNO)
-#define elf_backend_plt_header_size 0
/* MIPS n32 ELF can use a mixture of REL and RELA, but some Relocations
work better/work only in RELA, so we default to this. */
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 47f4575..24d6079 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -24,6 +24,8 @@
#include "elf-bfd.h"
#include "opcode/ia64.h"
#include "elf/ia64.h"
+#include "objalloc.h"
+#include "hashtab.h"
/* THE RULES for all the stuff the linker creates --
@@ -115,7 +117,8 @@ struct elfNN_ia64_dyn_sym_info
struct elfNN_ia64_local_hash_entry
{
- struct bfd_hash_entry root;
+ int id;
+ unsigned int r_sym;
struct elfNN_ia64_dyn_sym_info *info;
/* TRUE if this hash entry's addends was translated for
@@ -123,12 +126,6 @@ struct elfNN_ia64_local_hash_entry
unsigned sec_merge_done : 1;
};
-struct elfNN_ia64_local_hash_table
-{
- struct bfd_hash_table root;
- /* No additional fields for now. */
-};
-
struct elfNN_ia64_link_hash_entry
{
struct elf_link_hash_entry root;
@@ -153,7 +150,8 @@ struct elfNN_ia64_link_hash_table
unsigned self_dtpmod_done : 1;/* has self DTPMOD entry been finished? */
bfd_vma self_dtpmod_offset; /* .got offset to self DTPMOD entry */
- struct elfNN_ia64_local_hash_table loc_hash_table;
+ htab_t loc_hash_table;
+ void *loc_hash_memory;
};
struct elfNN_ia64_allocate_data
@@ -201,12 +199,6 @@ static bfd_boolean elfNN_ia64_is_local_label_name
PARAMS ((bfd *abfd, const char *name));
static bfd_boolean elfNN_ia64_dynamic_symbol_p
PARAMS ((struct elf_link_hash_entry *h, struct bfd_link_info *info, int));
-static bfd_boolean elfNN_ia64_local_hash_table_init
- PARAMS ((struct elfNN_ia64_local_hash_table *ht, bfd *abfd,
- new_hash_entry_func new));
-static struct bfd_hash_entry *elfNN_ia64_new_loc_hash_entry
- PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table,
- const char *string));
static struct bfd_hash_entry *elfNN_ia64_new_elf_hash_entry
PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table,
const char *string));
@@ -215,15 +207,17 @@ static void elfNN_ia64_hash_copy_indirect
struct elf_link_hash_entry *));
static void elfNN_ia64_hash_hide_symbol
PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
+static hashval_t elfNN_ia64_local_htab_hash PARAMS ((const void *));
+static int elfNN_ia64_local_htab_eq PARAMS ((const void *ptr1,
+ const void *ptr2));
static struct bfd_link_hash_table *elfNN_ia64_hash_table_create
PARAMS ((bfd *abfd));
-static struct elfNN_ia64_local_hash_entry *elfNN_ia64_local_hash_lookup
- PARAMS ((struct elfNN_ia64_local_hash_table *table, const char *string,
- bfd_boolean create, bfd_boolean copy));
+static void elfNN_ia64_hash_table_free
+ PARAMS ((struct bfd_link_hash_table *hash));
static bfd_boolean elfNN_ia64_global_dyn_sym_thunk
PARAMS ((struct bfd_hash_entry *, PTR));
-static bfd_boolean elfNN_ia64_local_dyn_sym_thunk
- PARAMS ((struct bfd_hash_entry *, PTR));
+static int elfNN_ia64_local_dyn_sym_thunk
+ PARAMS ((void **, PTR));
static void elfNN_ia64_dyn_sym_traverse
PARAMS ((struct elfNN_ia64_link_hash_table *ia64_info,
bfd_boolean (*func) (struct elfNN_ia64_dyn_sym_info *, PTR),
@@ -446,21 +440,21 @@ static reloc_howto_type ia64_howto_table[] =
IA64_HOWTO (R_IA64_TPREL14, "TPREL14", 0, FALSE, FALSE),
IA64_HOWTO (R_IA64_TPREL22, "TPREL22", 0, FALSE, FALSE),
IA64_HOWTO (R_IA64_TPREL64I, "TPREL64I", 0, FALSE, FALSE),
- IA64_HOWTO (R_IA64_TPREL64MSB, "TPREL64MSB", 8, FALSE, FALSE),
- IA64_HOWTO (R_IA64_TPREL64LSB, "TPREL64LSB", 8, FALSE, FALSE),
+ IA64_HOWTO (R_IA64_TPREL64MSB, "TPREL64MSB", 4, FALSE, FALSE),
+ IA64_HOWTO (R_IA64_TPREL64LSB, "TPREL64LSB", 4, FALSE, FALSE),
IA64_HOWTO (R_IA64_LTOFF_TPREL22, "LTOFF_TPREL22", 0, FALSE, FALSE),
- IA64_HOWTO (R_IA64_DTPMOD64MSB, "TPREL64MSB", 8, FALSE, FALSE),
- IA64_HOWTO (R_IA64_DTPMOD64LSB, "TPREL64LSB", 8, FALSE, FALSE),
+ IA64_HOWTO (R_IA64_DTPMOD64MSB, "TPREL64MSB", 4, FALSE, FALSE),
+ IA64_HOWTO (R_IA64_DTPMOD64LSB, "TPREL64LSB", 4, FALSE, FALSE),
IA64_HOWTO (R_IA64_LTOFF_DTPMOD22, "LTOFF_DTPMOD22", 0, FALSE, FALSE),
IA64_HOWTO (R_IA64_DTPREL14, "DTPREL14", 0, FALSE, FALSE),
IA64_HOWTO (R_IA64_DTPREL22, "DTPREL22", 0, FALSE, FALSE),
IA64_HOWTO (R_IA64_DTPREL64I, "DTPREL64I", 0, FALSE, FALSE),
- IA64_HOWTO (R_IA64_DTPREL32MSB, "DTPREL32MSB", 4, FALSE, FALSE),
- IA64_HOWTO (R_IA64_DTPREL32LSB, "DTPREL32LSB", 4, FALSE, FALSE),
- IA64_HOWTO (R_IA64_DTPREL64MSB, "DTPREL64MSB", 8, FALSE, FALSE),
- IA64_HOWTO (R_IA64_DTPREL64LSB, "DTPREL64LSB", 8, FALSE, FALSE),
+ IA64_HOWTO (R_IA64_DTPREL32MSB, "DTPREL32MSB", 2, FALSE, FALSE),
+ IA64_HOWTO (R_IA64_DTPREL32LSB, "DTPREL32LSB", 2, FALSE, FALSE),
+ IA64_HOWTO (R_IA64_DTPREL64MSB, "DTPREL64MSB", 4, FALSE, FALSE),
+ IA64_HOWTO (R_IA64_DTPREL64LSB, "DTPREL64LSB", 4, FALSE, FALSE),
IA64_HOWTO (R_IA64_LTOFF_DTPREL22, "LTOFF_DTPREL22", 0, FALSE, FALSE),
};
@@ -656,6 +650,28 @@ static const bfd_byte oor_brl[16] =
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* brl.sptk.few tgt;; */
0x00, 0x00, 0x00, 0xc0
};
+
+static const bfd_byte oor_ip[48] =
+{
+ 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, /* [MLX] nop.m 0 */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, /* movl r15=0 */
+ 0x01, 0x00, 0x00, 0x60,
+ 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, /* [MII] nop.m 0 */
+ 0x00, 0x01, 0x00, 0x60, 0x00, 0x00, /* mov r16=ip;; */
+ 0xf2, 0x80, 0x00, 0x80, /* add r16=r15,r16;; */
+ 0x11, 0x00, 0x00, 0x00, 0x01, 0x00, /* [MIB] nop.m 0 */
+ 0x60, 0x80, 0x04, 0x80, 0x03, 0x00, /* mov b6=r16 */
+ 0x60, 0x00, 0x80, 0x00 /* br b6;; */
+};
+
+static size_t oor_branch_size = sizeof (oor_brl);
+
+void
+bfd_elfNN_ia64_after_parse (int itanium)
+{
+ oor_branch_size = itanium ? sizeof (oor_ip) : sizeof (oor_brl);
+}
+
/* These functions do relaxation for IA-64 ELF. */
@@ -891,9 +907,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
if (tsec == ia64_info->plt_sec)
size = sizeof (plt_full_entry);
else
- {
- size = sizeof (oor_brl);
- }
+ size = oor_branch_size;
/* Resize the current section to make room for the new branch. */
trampoff = (sec->_cooked_size + 15) & (bfd_vma) -16;
@@ -914,10 +928,22 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
}
else
{
- memcpy (contents + trampoff, oor_brl, size);
- irel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (irel->r_info),
- R_IA64_PCREL60B);
- irel->r_offset = trampoff + 2;
+ if (size == sizeof (oor_ip))
+ {
+ memcpy (contents + trampoff, oor_ip, size);
+ irel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (irel->r_info),
+ R_IA64_PCREL64I);
+ irel->r_addend -= 16;
+ irel->r_offset = trampoff + 2;
+ }
+ else
+ {
+ memcpy (contents + trampoff, oor_brl, size);
+ irel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (irel->r_info),
+ R_IA64_PCREL60B);
+ irel->r_offset = trampoff + 2;
+ }
+
}
/* Record the fixup so we don't do it again this section. */
@@ -1520,44 +1546,6 @@ elfNN_ia64_dynamic_symbol_p (h, info, r_type)
return _bfd_elf_dynamic_symbol_p (h, info, ignore_protected);
}
-static bfd_boolean
-elfNN_ia64_local_hash_table_init (ht, abfd, new)
- struct elfNN_ia64_local_hash_table *ht;
- bfd *abfd ATTRIBUTE_UNUSED;
- new_hash_entry_func new;
-{
- memset (ht, 0, sizeof (*ht));
- return bfd_hash_table_init (&ht->root, new);
-}
-
-static struct bfd_hash_entry*
-elfNN_ia64_new_loc_hash_entry (entry, table, string)
- struct bfd_hash_entry *entry;
- struct bfd_hash_table *table;
- const char *string;
-{
- struct elfNN_ia64_local_hash_entry *ret;
- ret = (struct elfNN_ia64_local_hash_entry *) entry;
-
- /* Allocate the structure if it has not already been allocated by a
- subclass. */
- if (!ret)
- ret = bfd_hash_allocate (table, sizeof (*ret));
-
- if (!ret)
- return 0;
-
- /* Initialize our local data. All zeros, and definitely easier
- than setting a handful of bit fields. */
- memset (ret, 0, sizeof (*ret));
-
- /* Call the allocation method of the superclass. */
- ret = ((struct elfNN_ia64_local_hash_entry *)
- bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
-
- return (struct bfd_hash_entry *) ret;
-}
-
static struct bfd_hash_entry*
elfNN_ia64_new_elf_hash_entry (entry, table, string)
struct bfd_hash_entry *entry;
@@ -1657,6 +1645,33 @@ elfNN_ia64_hash_hide_symbol (info, xh, force_local)
}
}
+/* Compute a hash of a local hash entry. */
+
+static hashval_t
+elfNN_ia64_local_htab_hash (ptr)
+ const void *ptr;
+{
+ struct elfNN_ia64_local_hash_entry *entry
+ = (struct elfNN_ia64_local_hash_entry *) ptr;
+
+ return (((entry->id & 0xff) << 24) | ((entry->id & 0xff00) << 8))
+ ^ entry->r_sym ^ (entry->id >> 16);
+}
+
+/* Compare local hash entries. */
+
+static int
+elfNN_ia64_local_htab_eq (ptr1, ptr2)
+ const void *ptr1, *ptr2;
+{
+ struct elfNN_ia64_local_hash_entry *entry1
+ = (struct elfNN_ia64_local_hash_entry *) ptr1;
+ struct elfNN_ia64_local_hash_entry *entry2
+ = (struct elfNN_ia64_local_hash_entry *) ptr2;
+
+ return entry1->id == entry2->id && entry1->r_sym == entry2->r_sym;
+}
+
/* Create the derived linker hash table. The IA-64 ELF port uses this
derived hash table to keep information specific to the IA-64 ElF
linker (without using static variables). */
@@ -1678,8 +1693,10 @@ elfNN_ia64_hash_table_create (abfd)
return 0;
}
- if (!elfNN_ia64_local_hash_table_init (&ret->loc_hash_table, abfd,
- elfNN_ia64_new_loc_hash_entry))
+ ret->loc_hash_table = htab_try_create (1024, elfNN_ia64_local_htab_hash,
+ elfNN_ia64_local_htab_eq, NULL);
+ ret->loc_hash_memory = objalloc_create ();
+ if (!ret->loc_hash_table || !ret->loc_hash_memory)
{
free (ret);
return 0;
@@ -1688,16 +1705,19 @@ elfNN_ia64_hash_table_create (abfd)
return &ret->root.root;
}
-/* Look up an entry in a Alpha ELF linker hash table. */
+/* Destroy IA-64 linker hash table. */
-static INLINE struct elfNN_ia64_local_hash_entry *
-elfNN_ia64_local_hash_lookup(table, string, create, copy)
- struct elfNN_ia64_local_hash_table *table;
- const char *string;
- bfd_boolean create, copy;
+static void
+elfNN_ia64_hash_table_free (hash)
+ struct bfd_link_hash_table *hash;
{
- return ((struct elfNN_ia64_local_hash_entry *)
- bfd_hash_lookup (&table->root, string, create, copy));
+ struct elfNN_ia64_link_hash_table *ia64_info
+ = (struct elfNN_ia64_link_hash_table *) hash;
+ if (ia64_info->loc_hash_table)
+ htab_delete (ia64_info->loc_hash_table);
+ if (ia64_info->loc_hash_memory)
+ objalloc_free ((struct objalloc *) ia64_info->loc_hash_memory);
+ _bfd_generic_link_hash_table_free (hash);
}
/* Traverse both local and global hash tables. */
@@ -1729,20 +1749,20 @@ elfNN_ia64_global_dyn_sym_thunk (xentry, xdata)
}
static bfd_boolean
-elfNN_ia64_local_dyn_sym_thunk (xentry, xdata)
- struct bfd_hash_entry *xentry;
+elfNN_ia64_local_dyn_sym_thunk (slot, xdata)
+ void **slot;
PTR xdata;
{
struct elfNN_ia64_local_hash_entry *entry
- = (struct elfNN_ia64_local_hash_entry *) xentry;
+ = (struct elfNN_ia64_local_hash_entry *) *slot;
struct elfNN_ia64_dyn_sym_traverse_data *data
= (struct elfNN_ia64_dyn_sym_traverse_data *) xdata;
struct elfNN_ia64_dyn_sym_info *dyn_i;
for (dyn_i = entry->info; dyn_i; dyn_i = dyn_i->next)
if (! (*data->func) (dyn_i, data->data))
- return FALSE;
- return TRUE;
+ return 0;
+ return 1;
}
static void
@@ -1758,8 +1778,8 @@ elfNN_ia64_dyn_sym_traverse (ia64_info, func, data)
elf_link_hash_traverse (&ia64_info->root,
elfNN_ia64_global_dyn_sym_thunk, &xdata);
- bfd_hash_traverse (&ia64_info->loc_hash_table.root,
- elfNN_ia64_local_dyn_sym_thunk, &xdata);
+ htab_traverse (ia64_info->loc_hash_table,
+ elfNN_ia64_local_dyn_sym_thunk, &xdata);
}
static bfd_boolean
@@ -1821,22 +1841,33 @@ get_local_sym_hash (ia64_info, abfd, rel, create)
const Elf_Internal_Rela *rel;
bfd_boolean create;
{
- struct elfNN_ia64_local_hash_entry *ret;
+ struct elfNN_ia64_local_hash_entry e, *ret;
asection *sec = abfd->sections;
- char addr_name [34];
+ hashval_t h = (((sec->id & 0xff) << 24) | ((sec->id & 0xff00) << 8))
+ ^ ELFNN_R_SYM (rel->r_info) ^ (sec->id >> 16);
+ void **slot;
- BFD_ASSERT ((sizeof (sec->id)*2 + 1 + sizeof (unsigned long)*2 + 1) <= 34);
- BFD_ASSERT (sec);
+ e.id = sec->id;
+ e.r_sym = ELFNN_R_SYM (rel->r_info);
+ slot = htab_find_slot_with_hash (ia64_info->loc_hash_table, &e, h,
+ create ? INSERT : NO_INSERT);
- /* Construct a string for use in the elfNN_ia64_local_hash_table.
- name describes what was once anonymous memory. */
+ if (!slot)
+ return NULL;
- sprintf (addr_name, "%x:%lx",
- sec->id, (unsigned long) ELFNN_R_SYM (rel->r_info));
+ if (*slot)
+ return (struct elfNN_ia64_local_hash_entry *) *slot;
- /* Collect the canonical entry data for this address. */
- ret = elfNN_ia64_local_hash_lookup (&ia64_info->loc_hash_table,
- addr_name, create, create);
+ ret = (struct elfNN_ia64_local_hash_entry *)
+ objalloc_alloc ((struct objalloc *) ia64_info->loc_hash_memory,
+ sizeof (struct elfNN_ia64_local_hash_entry));
+ if (ret)
+ {
+ memset (ret, 0, sizeof (*ret));
+ ret->id = sec->id;
+ ret->r_sym = ELFNN_R_SYM (rel->r_info);
+ *slot = ret;
+ }
return ret;
}
@@ -3513,12 +3544,10 @@ static bfd_vma
elfNN_ia64_tprel_base (info)
struct bfd_link_info *info;
{
- struct elf_link_tls_segment *tls_segment
- = elf_hash_table (info)->tls_segment;
+ asection *tls_sec = elf_hash_table (info)->tls_sec;
- BFD_ASSERT (tls_segment != NULL);
- return (tls_segment->start
- - align_power ((bfd_vma) 16, tls_segment->align));
+ BFD_ASSERT (tls_sec != NULL);
+ return tls_sec->vma - align_power ((bfd_vma) 16, tls_sec->alignment_power);
}
/* Return the base VMA address which should be subtracted from real addresses
@@ -3529,8 +3558,8 @@ static bfd_vma
elfNN_ia64_dtprel_base (info)
struct bfd_link_info *info;
{
- BFD_ASSERT (elf_hash_table (info)->tls_segment != NULL);
- return elf_hash_table (info)->tls_segment->start;
+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL);
+ return elf_hash_table (info)->tls_sec->vma;
}
/* Called through qsort to sort the .IA_64.unwind section during a
@@ -3817,9 +3846,11 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
if (r_symndx < symtab_hdr->sh_info)
{
/* Reloc against local symbol. */
+ asection *msec;
sym = local_syms + r_symndx;
sym_sec = local_sections[r_symndx];
- value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
+ msec = sym_sec;
+ value = _bfd_elf_rela_local_sym (output_bfd, sym, &msec, rel);
if ((sym_sec->flags & SEC_MERGE)
&& ELF_ST_TYPE (sym->st_info) == STT_SECTION
&& sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE)
@@ -3830,7 +3861,6 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
if (loc_h && ! loc_h->sec_merge_done)
{
struct elfNN_ia64_dyn_sym_info *dynent;
- asection *msec;
for (dynent = loc_h->info; dynent; dynent = dynent->next)
{
@@ -4748,12 +4778,9 @@ elfNN_ia64_reloc_type_class (rela)
static struct bfd_elf_special_section const elfNN_ia64_special_sections[]=
{
- { ".sbss", 5, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
- { ".sdata", 6, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".sbss", 5, -1, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
+ { ".sdata", 6, -1, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
+ { NULL, 0, 0, 0, 0 }
};
static bfd_boolean
@@ -4787,6 +4814,23 @@ elfNN_hpux_backend_section_from_bfd_section (abfd, sec, retval)
}
return FALSE;
}
+
+static void
+elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
+ asymbol *asym)
+{
+ elf_symbol_type *elfsym = (elf_symbol_type *) asym;;
+
+ switch (elfsym->internal_elf_sym.st_shndx)
+ {
+ case SHN_IA_64_ANSI_COMMON:
+ asym->section = bfd_com_section_ptr;
+ asym->value = elfsym->internal_elf_sym.st_size;
+ asym->flags &= ~BSF_GLOBAL;
+ break;
+ }
+}
+
#define TARGET_LITTLE_SYM bfd_elfNN_ia64_little_vec
#define TARGET_LITTLE_NAME "elfNN-ia64-little"
@@ -4825,6 +4869,8 @@ elfNN_hpux_backend_section_from_bfd_section (abfd, sec, retval)
/* Stuff for the BFD linker: */
#define bfd_elfNN_bfd_link_hash_table_create \
elfNN_ia64_hash_table_create
+#define bfd_elfNN_bfd_link_hash_table_free \
+ elfNN_ia64_hash_table_free
#define elf_backend_create_dynamic_sections \
elfNN_ia64_create_dynamic_sections
#define elf_backend_check_relocs \
@@ -4853,7 +4899,6 @@ elfNN_hpux_backend_section_from_bfd_section (abfd, sec, retval)
#define elf_backend_want_plt_sym 0
#define elf_backend_plt_alignment 5
#define elf_backend_got_header_size 0
-#define elf_backend_plt_header_size PLT_HEADER_SIZE
#define elf_backend_want_got_plt 1
#define elf_backend_may_use_rel_p 1
#define elf_backend_may_use_rela_p 1
@@ -4884,6 +4929,9 @@ elfNN_hpux_backend_section_from_bfd_section (abfd, sec, retval)
#undef elf_backend_section_from_bfd_section
#define elf_backend_section_from_bfd_section elfNN_hpux_backend_section_from_bfd_section
+#undef elf_backend_symbol_processing
+#define elf_backend_symbol_processing elfNN_hpux_backend_symbol_processing
+
#undef elf_backend_want_p_paddr_set_to_zero
#define elf_backend_want_p_paddr_set_to_zero 1
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 919593d..b545683 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -587,17 +587,20 @@ static bfd *reldyn_sorting_bfd;
offsets from $gp. */
#define MIPS_ELF_GOT_MAX_SIZE(abfd) (ELF_MIPS_GP_OFFSET(abfd) + 0x7fff)
-/* Instructions which appear in a stub. For some reason the stub is
- slightly different on an SGI system. */
+/* Instructions which appear in a stub. */
#define STUB_LW(abfd) \
((ABI_64_P (abfd) \
? 0xdf998010 /* ld t9,0x8010(gp) */ \
: 0x8f998010)) /* lw t9,0x8010(gp) */
#define STUB_MOVE(abfd) \
- (SGI_COMPAT (abfd) ? 0x03e07825 : 0x03e07821) /* move t7,ra */
-#define STUB_JALR 0x0320f809 /* jal t9 */
+ ((ABI_64_P (abfd) \
+ ? 0x03e0782d /* daddu t7,ra */ \
+ : 0x03e07821)) /* addu t7,ra */
+#define STUB_JALR 0x0320f809 /* jalr t9,ra */
#define STUB_LI16(abfd) \
- (SGI_COMPAT (abfd) ? 0x34180000 : 0x24180000) /* ori t8,zero,0 */
+ ((ABI_64_P (abfd) \
+ ? 0x64180000 /* daddiu t8,zero,0 */ \
+ : 0x24180000)) /* addiu t8,zero,0 */
#define MIPS_FUNCTION_STUB_SIZE (16)
/* The name of the dynamic interpreter. This is put in the .interp
@@ -2864,6 +2867,7 @@ mips_elf_create_got_section (abfd, info, maybe_exclude)
if (g == NULL)
return FALSE;
g->global_gotsym = NULL;
+ g->global_gotno = 0;
g->local_gotno = MIPS_RESERVED_GOTNO;
g->assigned_gotno = MIPS_RESERVED_GOTNO;
g->bfd2got = NULL;
@@ -4056,6 +4060,10 @@ _bfd_elf_mips_mach (flags)
case E_MIPS_ARCH_32R2:
return bfd_mach_mipsisa32r2;
break;
+
+ case E_MIPS_ARCH_64R2:
+ return bfd_mach_mipsisa64r2;
+ break;
}
}
@@ -5863,7 +5871,7 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
if (elf_hash_table (info)->dynamic_sections_created)
{
/* Set the contents of the .interp section to the interpreter. */
- if (! info->shared)
+ if (info->executable)
{
s = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (s != NULL);
@@ -6081,30 +6089,6 @@ _bfd_mips_elf_size_dynamic_sections (output_bfd, info)
return FALSE;
}
- if (SGI_COMPAT (output_bfd))
- {
- if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_CONFLICTNO, 0))
- return FALSE;
- }
-
- if (SGI_COMPAT (output_bfd))
- {
- if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_LIBLISTNO, 0))
- return FALSE;
- }
-
- if (bfd_get_section_by_name (dynobj, ".conflict") != NULL)
- {
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_CONFLICT, 0))
- return FALSE;
-
- s = bfd_get_section_by_name (dynobj, ".liblist");
- BFD_ASSERT (s != NULL);
-
- if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_LIBLIST, 0))
- return FALSE;
- }
-
if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_VERSION, 0))
return FALSE;
@@ -6874,13 +6858,6 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
case DT_PLTGOT:
name = ".got";
- goto get_vma;
- case DT_MIPS_CONFLICT:
- name = ".conflict";
- goto get_vma;
- case DT_MIPS_LIBLIST:
- name = ".liblist";
- get_vma:
s = bfd_get_section_by_name (output_bfd, name);
BFD_ASSERT (s != NULL);
dyn.d_un.d_ptr = s->vma;
@@ -6894,27 +6871,6 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
dyn.d_un.d_val = RHF_NOTPOT; /* XXX */
break;
- case DT_MIPS_CONFLICTNO:
- name = ".conflict";
- elemsize = sizeof (Elf32_Conflict);
- goto set_elemno;
-
- case DT_MIPS_LIBLISTNO:
- name = ".liblist";
- elemsize = sizeof (Elf32_Lib);
- set_elemno:
- s = bfd_get_section_by_name (output_bfd, name);
- if (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;
- }
- else
- dyn.d_un.d_val = 0;
- break;
-
case DT_MIPS_TIME_STAMP:
time ((time_t *) &dyn.d_un.d_val);
break;
@@ -6982,9 +6938,16 @@ _bfd_mips_elf_finish_dynamic_sections (output_bfd, info)
dyn.d_un.d_ptr = s->vma;
break;
- case DT_MIPS_MSYM:
- s = (bfd_get_section_by_name (output_bfd, ".msym"));
- dyn.d_un.d_ptr = s->vma;
+ case DT_RELSZ:
+ /* Reduce DT_RELSZ to account for any relocations we
+ decided not to make. This is for the n64 irix rld,
+ which doesn't seem to apply any relocations if there
+ are trailing null entries. */
+ s = mips_elf_rel_dyn_section (dynobj, FALSE);
+ dyn.d_un.d_val = (s->reloc_count
+ * (ABI_64_P (output_bfd)
+ ? sizeof (Elf64_Mips_External_Rel)
+ : sizeof (Elf32_External_Rel)));
break;
default:
@@ -7192,6 +7155,10 @@ mips_set_isa_flags (abfd)
case bfd_mach_mipsisa32r2:
val = E_MIPS_ARCH_32R2;
break;
+
+ case bfd_mach_mipsisa64r2:
+ val = E_MIPS_ARCH_64R2;
+ break;
}
elf_elfheader (abfd)->e_flags &= ~(EF_MIPS_ARCH | EF_MIPS_MACH);
elf_elfheader (abfd)->e_flags |= val;
@@ -7361,7 +7328,7 @@ _bfd_mips_elf_modify_segment_map (abfd)
/* For IRIX 6, we don't have .mdebug sections, nor does anything but
.dynamic end up in PT_DYNAMIC. However, we do have to insert a
- PT_OPTIONS segment immediately following the program header
+ PT_MIPS_OPTIONS segment immediately following the program header
table. */
if (NEWABI_P (abfd)
/* On non-IRIX6 new abi, we'll have already created a segment
@@ -7378,15 +7345,11 @@ _bfd_mips_elf_modify_segment_map (abfd)
{
struct elf_segment_map *options_segment;
- /* Usually, there's a program header table. But, sometimes
- there's not (like when running the `ld' testsuite). So,
- if there's no program header table, we just put the
- options segment at the end. */
- for (pm = &elf_tdata (abfd)->segment_map;
- *pm != NULL;
- pm = &(*pm)->next)
- if ((*pm)->p_type == PT_PHDR)
- break;
+ pm = &elf_tdata (abfd)->segment_map;
+ while (*pm != NULL
+ && ((*pm)->p_type == PT_PHDR
+ || (*pm)->p_type == PT_INTERP))
+ pm = &(*pm)->next;
amt = sizeof (struct elf_segment_map);
options_segment = bfd_zalloc (abfd, amt);
@@ -7950,7 +7913,7 @@ bfd_boolean
_bfd_mips_elf_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;
{
@@ -8929,6 +8892,7 @@ struct mips_mach_extension {
static const struct mips_mach_extension mips_mach_extensions[] = {
/* MIPS64 extensions. */
+ { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
{ bfd_mach_mips_sb1, bfd_mach_mipsisa64 },
/* MIPS V extensions. */
@@ -9076,6 +9040,11 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
new_flags &= ~EF_MIPS_XGOT;
old_flags &= ~EF_MIPS_XGOT;
+ /* MIPSpro generates ucode info in n64 objects. Again, we should
+ just be able to ignore this. */
+ new_flags &= ~EF_MIPS_UCODE;
+ old_flags &= ~EF_MIPS_UCODE;
+
if (new_flags == old_flags)
return TRUE;
@@ -9275,6 +9244,8 @@ _bfd_mips_elf_print_private_bfd_data (abfd, ptr)
fprintf (file, _(" [mips64]"));
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32R2)
fprintf (file, _(" [mips32r2]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_64R2)
+ fprintf (file, _(" [mips64r2]"));
else
fprintf (file, _(" [unknown ISA]"));
@@ -9296,18 +9267,11 @@ _bfd_mips_elf_print_private_bfd_data (abfd, ptr)
struct bfd_elf_special_section const _bfd_mips_elf_special_sections[]=
{
- { ".sdata", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".sbss", 0, NULL, 0,
- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".lit4", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".lit8", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".ucode", 0, NULL, 0,
- SHT_MIPS_UCODE, 0 },
- { ".mdebug", 0, NULL, 0,
- SHT_MIPS_DEBUG, 0 },
- { NULL, 0, NULL, 0,
- 0, 0 }
+ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+ { ".lit4", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+ { ".lit8", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+ { ".ucode", 6, 0, SHT_MIPS_UCODE, 0 },
+ { ".mdebug", 7, 0, SHT_MIPS_DEBUG, 0 },
+ { NULL, 0, 0, 0, 0 }
};
diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h
index 71cdc07..b4230eb 100644
--- a/bfd/elfxx-mips.h
+++ b/bfd/elfxx-mips.h
@@ -80,7 +80,7 @@ extern bfd_boolean _bfd_mips_elf_find_nearest_line
PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *));
extern bfd_boolean _bfd_mips_elf_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
extern bfd_byte *_bfd_elf_mips_get_relocated_section_contents
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *, bfd_boolean, asymbol **));
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index 544f8f3..40fe8e7 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -51,7 +51,7 @@
#ifndef bfd_elfNN_get_symbol_info
#define bfd_elfNN_get_symbol_info _bfd_elf_get_symbol_info
#endif
-#define bfd_elfNN_get_symtab _bfd_elf_get_symtab
+#define bfd_elfNN_canonicalize_symtab _bfd_elf_canonicalize_symtab
#define bfd_elfNN_get_symtab_upper_bound _bfd_elf_get_symtab_upper_bound
#define bfd_elfNN_make_empty_symbol _bfd_elf_make_empty_symbol
#ifndef bfd_elfNN_new_section_hook
@@ -99,7 +99,7 @@
#define bfd_elfNN_bfd_debug_info_start bfd_void
#define bfd_elfNN_bfd_debug_info_end bfd_void
#define bfd_elfNN_bfd_debug_info_accumulate \
- ((void (*) (bfd*, struct sec *)) bfd_void)
+ ((void (*) (bfd*, struct bfd_section *)) bfd_void)
#ifndef bfd_elfNN_bfd_get_relocated_section_contents
#define bfd_elfNN_bfd_get_relocated_section_contents \
@@ -343,9 +343,6 @@
#ifndef elf_backend_got_header_size
#define elf_backend_got_header_size 0
#endif
-#ifndef elf_backend_plt_header_size
-#define elf_backend_plt_header_size 0
-#endif
#ifndef elf_backend_post_process_headers
#define elf_backend_post_process_headers NULL
#endif
@@ -361,6 +358,9 @@
#ifndef elf_backend_hide_symbol
#define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol
#endif
+#ifndef elf_backend_merge_symbol_attribute
+#define elf_backend_merge_symbol_attribute NULL
+#endif
#ifndef elf_backend_emit_relocs
#define elf_backend_emit_relocs NULL
#endif
@@ -483,6 +483,7 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_output_arch_syms,
elf_backend_copy_indirect_symbol,
elf_backend_hide_symbol,
+ elf_backend_merge_symbol_attribute,
elf_backend_emit_relocs,
elf_backend_count_relocs,
elf_backend_grok_prstatus,
@@ -503,7 +504,6 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_special_sections,
elf_backend_got_symbol_offset,
elf_backend_got_header_size,
- elf_backend_plt_header_size,
elf_backend_collect,
elf_backend_type_change_ok,
elf_backend_may_use_rel_p,
diff --git a/bfd/gen-aout.c b/bfd/gen-aout.c
index b6720e8..ea207db 100644
--- a/bfd/gen-aout.c
+++ b/bfd/gen-aout.c
@@ -1,5 +1,5 @@
/* Generate parameters for an a.out system.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001, 2002
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/bfd/hash.c b/bfd/hash.c
index 8ae0c7a..3248558 100644
--- a/bfd/hash.c
+++ b/bfd/hash.c
@@ -1,5 +1,5 @@
/* hash.c -- hash table routines for BFD
- Copyright 1993, 1994, 1995, 1997, 1999, 2001, 2002
+ Copyright 1993, 1994, 1995, 1997, 1999, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
diff --git a/bfd/hp300hpux.c b/bfd/hp300hpux.c
index d4eb3aa..e5a567d 100644
--- a/bfd/hp300hpux.c
+++ b/bfd/hp300hpux.c
@@ -1,5 +1,5 @@
/* BFD backend for hp-ux 9000/300
- Copyright 1990, 1991, 1993, 1994, 1995, 1997, 2000, 2001, 2002
+ Copyright 1990, 1991, 1993, 1994, 1995, 1997, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Glenn Engel.
@@ -93,7 +93,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
slurp_symbol_table
swap_std_reloc_in
slurp_reloc_table
- get_symtab
+ canonicalize_symtab
get_symtab_upper_bound
canonicalize_reloc
mkobject
@@ -129,7 +129,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* these don't use MY because that causes problems within JUMP_TABLE
(CONCAT2 winds up being expanded recursively, which ANSI C compilers
will not do). */
-#define MY_get_symtab hp300hpux_get_symtab
+#define MY_canonicalize_symtab hp300hpux_canonicalize_symtab
#define MY_get_symtab_upper_bound hp300hpux_get_symtab_upper_bound
#define MY_canonicalize_reloc hp300hpux_canonicalize_reloc
#define MY_write_object_contents hp300hpux_write_object_contents
@@ -208,7 +208,7 @@ void MY (swap_std_reloc_in)
bfd_size_type));
bfd_boolean MY (slurp_reloc_table)
PARAMS ((bfd *, sec_ptr, asymbol **));
-long MY (get_symtab)
+long MY (canonicalize_symtab)
PARAMS ((bfd *, asymbol **));
long MY (get_symtab_upper_bound)
PARAMS ((bfd *));
@@ -802,7 +802,7 @@ doit:
/* call aout_32 versions if the input file was generated by gcc */
/************************************************************************/
-long aout_32_get_symtab
+long aout_32_canonicalize_symtab
PARAMS ((bfd * abfd, asymbol ** location));
long aout_32_get_symtab_upper_bound
PARAMS ((bfd * abfd));
@@ -811,7 +811,7 @@ long aout_32_canonicalize_reloc
asymbol ** symbols));
long
-MY (get_symtab) (abfd, location)
+MY (canonicalize_symtab) (abfd, location)
bfd *abfd;
asymbol **location;
{
@@ -819,7 +819,7 @@ MY (get_symtab) (abfd, location)
aout_symbol_type *symbase;
if (obj_aout_subformat (abfd) == gnu_encap_format)
- return aout_32_get_symtab (abfd, location);
+ return aout_32_canonicalize_symtab (abfd, location);
if (!MY (slurp_symbol_table) (abfd))
return -1;
diff --git a/bfd/i386msdos.c b/bfd/i386msdos.c
index 7d5a0d4..059466b 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
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002,
+ 2003 Free Software Foundation, Inc.
Written by Bryan Ford of the University of Utah.
Contributed by the Center for Software Science at the
@@ -61,7 +61,7 @@ static int msdos_sizeof_headers
static bfd_boolean msdos_write_object_contents
PARAMS ((bfd *));
static bfd_boolean msdos_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 int
msdos_sizeof_headers (abfd, exec)
@@ -139,7 +139,7 @@ static bfd_boolean
msdos_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;
{
@@ -186,7 +186,7 @@ msdos_set_section_contents (abfd, section, location, offset, count)
#define msdos_set_arch_mach _bfd_generic_set_arch_mach
#define msdos_get_symtab_upper_bound _bfd_nosymbols_get_symtab_upper_bound
-#define msdos_get_symtab _bfd_nosymbols_get_symtab
+#define msdos_canonicalize_symtab _bfd_nosymbols_canonicalize_symtab
#define msdos_print_symbol _bfd_nosymbols_print_symbol
#define msdos_get_symbol_info _bfd_nosymbols_get_symbol_info
#define msdos_find_nearest_line _bfd_nosymbols_find_nearest_line
diff --git a/bfd/ieee.c b/bfd/ieee.c
index f0ba1e5..f8af3f5 100644
--- a/bfd/ieee.c
+++ b/bfd/ieee.c
@@ -80,7 +80,7 @@ static bfd_boolean ieee_slurp_symbol_table
PARAMS ((bfd *));
static long ieee_get_symtab_upper_bound
PARAMS ((bfd *));
-static long ieee_get_symtab
+static long ieee_canonicalize_symtab
PARAMS ((bfd *, asymbol **));
static asection *get_section_entry
PARAMS ((bfd *, ieee_data_type *i, unsigned int));
@@ -160,7 +160,7 @@ static bfd_boolean ieee_write_data_part
static bfd_boolean init_for_output
PARAMS ((bfd *));
static bfd_boolean ieee_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 ieee_write_external_part
PARAMS ((bfd *));
static bfd_boolean ieee_write_me_part
@@ -1145,7 +1145,7 @@ ieee_get_symtab_upper_bound (abfd)
extern const bfd_target ieee_vec;
static long
-ieee_get_symtab (abfd, location)
+ieee_canonicalize_symtab (abfd, location)
bfd *abfd;
asymbol **location;
{
@@ -3440,7 +3440,7 @@ static bfd_boolean
ieee_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;
{
@@ -3704,6 +3704,7 @@ ieee_write_processor (abfd)
case bfd_mach_mcf5206e:id = "5206e"; break;
case bfd_mach_mcf5307:id = "5307"; break;
case bfd_mach_mcf5407:id = "5407"; break;
+ case bfd_mach_mcf528x:id = "5282"; break;
}
if (! ieee_write_id (abfd, id))
@@ -4097,10 +4098,11 @@ const bfd_target ieee_vec =
ieee_update_armap_timestamp */
BFD_JUMP_TABLE_ARCHIVE (ieee),
- /* ieee_get_symtab_upper_bound, ieee_get_symtab, ieee_make_empty_symbol,
- ieee_print_symbol, ieee_get_symbol_info, ieee_bfd_is_local_label_name,
- ieee_get_lineno, ieee_find_nearest_line, ieee_bfd_make_debug_symbol,
- ieee_read_minisymbols, ieee_minisymbol_to_symbol */
+ /* ieee_get_symtab_upper_bound, ieee_canonicalize_symtab,
+ ieee_make_empty_symbol, ieee_print_symbol, ieee_get_symbol_info,
+ ieee_bfd_is_local_label_name, ieee_get_lineno,
+ ieee_find_nearest_line, ieee_bfd_make_debug_symbol,
+ ieee_read_minisymbols, ieee_minisymbol_to_symbol */
BFD_JUMP_TABLE_SYMBOLS (ieee),
/* ieee_get_reloc_upper_bound, ieee_canonicalize_reloc,
diff --git a/bfd/ihex.c b/bfd/ihex.c
index 2f4aa56..b068bd9 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
+ Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Ian Lance Taylor of Cygnus Support <ian@cygnus.com>.
@@ -142,7 +142,7 @@ static bfd_boolean ihex_read_section
static bfd_boolean ihex_get_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static bfd_boolean ihex_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
static bfd_boolean ihex_write_record
PARAMS ((bfd *, size_t, unsigned int, unsigned int, bfd_byte *));
static bfd_boolean ihex_write_object_contents
@@ -699,7 +699,7 @@ static bfd_boolean
ihex_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
@@ -966,7 +966,7 @@ ihex_sizeof_headers (abfd, exec)
_bfd_generic_get_section_contents_in_window
#define ihex_get_symtab_upper_bound bfd_0l
-#define ihex_get_symtab \
+#define ihex_canonicalize_symtab \
((long (*) PARAMS ((bfd *, asymbol **))) bfd_0l)
#define ihex_make_empty_symbol _bfd_generic_make_empty_symbol
#define ihex_print_symbol _bfd_nosymbols_print_symbol
diff --git a/bfd/init.c b/bfd/init.c
index 995213e..07401eb 100644
--- a/bfd/init.c
+++ b/bfd/init.c
@@ -1,5 +1,5 @@
/* bfd initialization stuff
- Copyright 1990, 1991, 1992, 1993, 1994, 1995
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2003
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
diff --git a/bfd/libaout.h b/bfd/libaout.h
index 7dc44a2..2b93dbf 100644
--- a/bfd/libaout.h
+++ b/bfd/libaout.h
@@ -1,6 +1,6 @@
/* BFD back-end data structures for a.out (and similar) files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -513,7 +513,7 @@ extern bfd_boolean NAME(aout,new_section_hook)
PARAMS ((bfd *, asection *));
extern bfd_boolean NAME(aout,set_section_contents)
- PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, sec_ptr, const PTR, file_ptr, bfd_size_type));
extern asymbol * NAME(aout,make_empty_symbol)
PARAMS ((bfd *));
@@ -534,7 +534,7 @@ extern void NAME(aout,reclaim_symbol_table)
extern long NAME(aout,get_symtab_upper_bound)
PARAMS ((bfd *));
-extern long NAME(aout,get_symtab)
+extern long NAME(aout,canonicalize_symtab)
PARAMS ((bfd *, asymbol **));
extern void NAME(aout,swap_ext_reloc_in)
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index 2c9c23c..0ec808d 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -286,7 +286,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
support. Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols). */
#define _bfd_nosymbols_get_symtab_upper_bound _bfd_n1
-#define _bfd_nosymbols_get_symtab \
+#define _bfd_nosymbols_canonicalize_symtab \
((long (*) (bfd *, asymbol **)) _bfd_n1)
#define _bfd_nosymbols_make_empty_symbol _bfd_generic_make_empty_symbol
#define _bfd_nosymbols_print_symbol \
@@ -326,7 +326,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
((bfd_boolean (*) (bfd *, enum bfd_architecture, unsigned long)) \
bfd_false)
#define _bfd_nowrite_set_section_contents \
- ((bfd_boolean (*) (bfd *, asection *, void *, file_ptr, bfd_size_type)) \
+ ((bfd_boolean (*) (bfd *, asection *, const void *, file_ptr, bfd_size_type)) \
bfd_false)
/* Generic routines to use for BFD_JUMP_TABLE_WRITE. Use
@@ -334,7 +334,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
#define _bfd_generic_set_arch_mach bfd_default_set_arch_mach
extern bfd_boolean _bfd_generic_set_section_contents
- (bfd *, asection *, void *, file_ptr, bfd_size_type);
+ (bfd *, asection *, const void *, file_ptr, bfd_size_type);
/* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not
support linking. Use BFD_JUMP_TABLE_LINK (_bfd_nolink). */
@@ -355,7 +355,7 @@ extern bfd_boolean _bfd_generic_set_section_contents
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
bfd_false)
#define _bfd_nolink_bfd_discard_group \
- ((bfd_boolean (*) (bfd *, struct sec *)) \
+ ((bfd_boolean (*) (bfd *, struct bfd_section *)) \
bfd_false)
#define _bfd_nolink_bfd_link_hash_table_create \
((struct bfd_link_hash_table *(*) (bfd *)) bfd_nullvoidptr)
@@ -368,7 +368,7 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nolink_bfd_final_link \
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
#define _bfd_nolink_bfd_link_split_section \
- ((bfd_boolean (*) (bfd *, struct sec *)) bfd_false)
+ ((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@@ -464,7 +464,7 @@ extern bfd_boolean _bfd_generic_final_link
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_generic_link_split_section
- (bfd *, struct sec *);
+ (bfd *, struct bfd_section *);
/* Generic reloc_link_order processing routine. */
extern bfd_boolean _bfd_generic_reloc_link_order
@@ -490,7 +490,7 @@ 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 *, void **, asection *, asection *, void **, bfd_size_type *);
/* Eliminate stabs for discarded functions and symbols. */
extern bfd_boolean _bfd_discard_section_stabs
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index 50bd215..abcf44f 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -771,7 +771,7 @@ _bfd_generic_get_section_contents_in_window
bfd_boolean
_bfd_generic_set_section_contents (bfd *abfd,
sec_ptr section,
- void *location,
+ const void *location,
file_ptr offset,
bfd_size_type count)
{
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index a428c66..b40a249 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -291,7 +291,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
support. Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols). */
#define _bfd_nosymbols_get_symtab_upper_bound _bfd_n1
-#define _bfd_nosymbols_get_symtab \
+#define _bfd_nosymbols_canonicalize_symtab \
((long (*) (bfd *, asymbol **)) _bfd_n1)
#define _bfd_nosymbols_make_empty_symbol _bfd_generic_make_empty_symbol
#define _bfd_nosymbols_print_symbol \
@@ -331,7 +331,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
((bfd_boolean (*) (bfd *, enum bfd_architecture, unsigned long)) \
bfd_false)
#define _bfd_nowrite_set_section_contents \
- ((bfd_boolean (*) (bfd *, asection *, void *, file_ptr, bfd_size_type)) \
+ ((bfd_boolean (*) (bfd *, asection *, const void *, file_ptr, bfd_size_type)) \
bfd_false)
/* Generic routines to use for BFD_JUMP_TABLE_WRITE. Use
@@ -339,7 +339,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
#define _bfd_generic_set_arch_mach bfd_default_set_arch_mach
extern bfd_boolean _bfd_generic_set_section_contents
- (bfd *, asection *, void *, file_ptr, bfd_size_type);
+ (bfd *, asection *, const void *, file_ptr, bfd_size_type);
/* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not
support linking. Use BFD_JUMP_TABLE_LINK (_bfd_nolink). */
@@ -360,7 +360,7 @@ extern bfd_boolean _bfd_generic_set_section_contents
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
bfd_false)
#define _bfd_nolink_bfd_discard_group \
- ((bfd_boolean (*) (bfd *, struct sec *)) \
+ ((bfd_boolean (*) (bfd *, struct bfd_section *)) \
bfd_false)
#define _bfd_nolink_bfd_link_hash_table_create \
((struct bfd_link_hash_table *(*) (bfd *)) bfd_nullvoidptr)
@@ -373,7 +373,7 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nolink_bfd_final_link \
((bfd_boolean (*) (bfd *, struct bfd_link_info *)) bfd_false)
#define _bfd_nolink_bfd_link_split_section \
- ((bfd_boolean (*) (bfd *, struct sec *)) bfd_false)
+ ((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@@ -469,7 +469,7 @@ extern bfd_boolean _bfd_generic_final_link
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_generic_link_split_section
- (bfd *, struct sec *);
+ (bfd *, struct bfd_section *);
/* Generic reloc_link_order processing routine. */
extern bfd_boolean _bfd_generic_reloc_link_order
@@ -495,7 +495,7 @@ 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 *, void **, asection *, asection *, void **, bfd_size_type *);
/* Eliminate stabs for discarded functions and symbols. */
extern bfd_boolean _bfd_discard_section_stabs
@@ -1222,6 +1222,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MMIX_PUSHJ_1",
"BFD_RELOC_MMIX_PUSHJ_2",
"BFD_RELOC_MMIX_PUSHJ_3",
+ "BFD_RELOC_MMIX_PUSHJ_STUBBABLE",
"BFD_RELOC_MMIX_JMP",
"BFD_RELOC_MMIX_JMP_1",
"BFD_RELOC_MMIX_JMP_2",
diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h
index 0c19433..6b5947c 100644
--- a/bfd/libcoff-in.h
+++ b/bfd/libcoff-in.h
@@ -301,11 +301,11 @@ struct coff_link_hash_table
/* Functions in coffgen.c. */
extern const bfd_target *coff_object_p
PARAMS ((bfd *));
-extern struct sec *coff_section_from_bfd_index
+extern struct bfd_section *coff_section_from_bfd_index
PARAMS ((bfd *, int));
extern long coff_get_symtab_upper_bound
PARAMS ((bfd *));
-extern long coff_get_symtab
+extern long coff_canonicalize_symtab
PARAMS ((bfd *, asymbol **));
extern int coff_count_linenumbers
PARAMS ((bfd *));
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index 3cac32a..5771132 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.h
@@ -305,11 +305,11 @@ struct coff_link_hash_table
/* Functions in coffgen.c. */
extern const bfd_target *coff_object_p
PARAMS ((bfd *));
-extern struct sec *coff_section_from_bfd_index
+extern struct bfd_section *coff_section_from_bfd_index
PARAMS ((bfd *, int));
extern long coff_get_symtab_upper_bound
PARAMS ((bfd *));
-extern long coff_get_symtab
+extern long coff_canonicalize_symtab
PARAMS ((bfd *, asymbol **));
extern int coff_count_linenumbers
PARAMS ((bfd *));
diff --git a/bfd/libecoff.h b/bfd/libecoff.h
index 7fa5069..161f06c 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
+ Copyright 1993, 1994, 1995, 1996, 1999, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
@@ -299,7 +299,7 @@ extern bfd_boolean _bfd_ecoff_write_armap
#define _bfd_ecoff_update_armap_timestamp bfd_true
extern long _bfd_ecoff_get_symtab_upper_bound PARAMS ((bfd *abfd));
-extern long _bfd_ecoff_get_symtab PARAMS ((bfd *abfd, asymbol **alocation));
+extern long _bfd_ecoff_canonicalize_symtab PARAMS ((bfd *abfd, asymbol **alocation));
extern asymbol *_bfd_ecoff_make_empty_symbol PARAMS ((bfd *abfd));
extern void _bfd_ecoff_print_symbol
PARAMS ((bfd *, PTR filep, asymbol *, bfd_print_symbol_type));
@@ -324,7 +324,7 @@ extern long _bfd_ecoff_canonicalize_reloc
extern bfd_boolean _bfd_ecoff_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
extern bfd_boolean _bfd_ecoff_set_section_contents
- PARAMS ((bfd *, asection *, PTR location, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR location, file_ptr, bfd_size_type));
extern int _bfd_ecoff_sizeof_headers PARAMS ((bfd *abfd, bfd_boolean reloc));
/* ecoff_bfd_get_relocated_section_contents defined by backend. */
diff --git a/bfd/libnlm.h b/bfd/libnlm.h
index 314a21f..0a7b4d9 100644
--- a/bfd/libnlm.h
+++ b/bfd/libnlm.h
@@ -1,5 +1,5 @@
/* BFD back-end data structures for NLM (NetWare Loadable Modules) files.
- Copyright 1993, 1994, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -61,7 +61,7 @@ extern void nlmNAME(get_symbol_info)
PARAMS ((bfd *, asymbol *, symbol_info *));
extern long nlmNAME(get_symtab_upper_bound)
PARAMS ((bfd *));
-extern long nlmNAME(get_symtab)
+extern long nlmNAME(canonicalize_symtab)
PARAMS ((bfd *, asymbol **));
extern asymbol *nlmNAME(make_empty_symbol)
PARAMS ((bfd *));
@@ -76,7 +76,7 @@ extern const bfd_target *nlmNAME(object_p)
extern bfd_boolean nlmNAME(set_arch_mach)
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
extern bfd_boolean nlmNAME(set_section_contents)
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
extern bfd_boolean nlmNAME(write_object_contents)
PARAMS ((bfd *));
@@ -188,7 +188,8 @@ struct nlm_backend_data
/* To make objcopy to an i386 NLM work, the i386 backend needs a
chance to work over the relocs. This is a bit icky. */
bfd_boolean (*nlm_mangle_relocs)
- PARAMS ((bfd *, asection *, PTR data, bfd_vma offset, bfd_size_type count));
+ PARAMS ((bfd *, asection *, const PTR data, bfd_vma offset,
+ bfd_size_type count));
/* Read an import record from abfd. It would be nice if this
were in a machine-dependent format, but it doesn't seem to be. */
bfd_boolean (*nlm_read_import) PARAMS ((bfd *, nlmNAME(symbol_type) *));
diff --git a/bfd/linker.c b/bfd/linker.c
index b7c5576..a1a8a4c 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -786,7 +786,7 @@ generic_link_add_object_symbols (bfd *abfd,
bfd_boolean collect)
{
bfd_size_type symcount;
- struct symbol_cache_entry **outsyms;
+ struct bfd_symbol **outsyms;
if (! generic_link_read_symbols (abfd))
return FALSE;
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index 4c4736a..2dc8073 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
+ Copyright 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -80,7 +80,7 @@ static long bfd_mach_o_count_symbols
PARAMS ((bfd *));
static long bfd_mach_o_get_symtab_upper_bound
PARAMS ((bfd *));
-static long bfd_mach_o_get_symtab
+static long bfd_mach_o_canonicalize_symtab
PARAMS ((bfd *, asymbol **));
static void bfd_mach_o_get_symbol_info
PARAMS ((bfd *, asymbol *, symbol_info *));
@@ -255,7 +255,7 @@ bfd_mach_o_get_symtab_upper_bound (abfd)
}
static long
-bfd_mach_o_get_symtab (abfd, alocation)
+bfd_mach_o_canonicalize_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
@@ -275,7 +275,7 @@ bfd_mach_o_get_symtab (abfd, alocation)
if (bfd_mach_o_scan_read_symtab_symbols (abfd, &mdata->commands[i].command.symtab) != 0)
{
- fprintf (stderr, "bfd_mach_o_get_symtab: unable to load symbols for section %lu\n", i);
+ fprintf (stderr, "bfd_mach_o_canonicalize_symtab: unable to load symbols for section %lu\n", i);
return 0;
}
diff --git a/bfd/merge.c b/bfd/merge.c
index aa8b334..89f45cd 100644
--- a/bfd/merge.c
+++ b/bfd/merge.c
@@ -34,7 +34,7 @@ struct sec_merge_sec_info;
struct sec_merge_hash_entry
{
struct bfd_hash_entry root;
- /* Length of this entry. */
+ /* Length of this entry. This includes the zero terminator. */
unsigned int len;
/* Start of this string needs to be aligned to
alignment octets (not 1 << align). */
@@ -43,8 +43,6 @@ struct sec_merge_hash_entry
{
/* Index within the merged section. */
bfd_size_type index;
- /* Entity size (if present in suffix hash tables). */
- unsigned int entsize;
/* Entry this is a suffix of (if alignment is 0). */
struct sec_merge_hash_entry *suffix;
} u;
@@ -205,9 +203,12 @@ sec_merge_hash_lookup (struct sec_merge_hash *table, const char *string,
alignment, we need to insert another copy. */
if (hashp->alignment < alignment)
{
- /* Mark the less aligned copy as deleted. */
- hashp->len = 0;
- hashp->alignment = 0;
+ if (create)
+ {
+ /* Mark the less aligned copy as deleted. */
+ hashp->len = 0;
+ hashp->alignment = 0;
+ }
break;
}
return hashp;
@@ -287,7 +288,7 @@ sec_merge_add (struct sec_merge_hash *tab, const char *str,
}
static bfd_boolean
-sec_merge_emit (register bfd *abfd, struct sec_merge_hash_entry *entry)
+sec_merge_emit (bfd *abfd, struct sec_merge_hash_entry *entry)
{
struct sec_merge_sec_info *secinfo = entry->secinfo;
asection *sec = secinfo->sec;
@@ -420,79 +421,6 @@ _bfd_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo)
return FALSE;
}
-/* Compare two sec_merge_hash_entry structures. This is called via qsort. */
-
-static int
-cmplengthentry (const void *a, const void *b)
-{
- struct sec_merge_hash_entry * A = *(struct sec_merge_hash_entry **) a;
- struct sec_merge_hash_entry * B = *(struct sec_merge_hash_entry **) b;
-
- if (A->len < B->len)
- return 1;
- else if (A->len > B->len)
- return -1;
-
- return memcmp (A->root.string, B->root.string, A->len);
-}
-
-static int
-last4_eq (const void *a, const void *b)
-{
- struct sec_merge_hash_entry * A = (struct sec_merge_hash_entry *) a;
- struct sec_merge_hash_entry * B = (struct sec_merge_hash_entry *) b;
-
- if (memcmp (A->root.string + A->len - 5 * A->u.entsize,
- B->root.string + B->len - 5 * A->u.entsize,
- 4 * A->u.entsize) != 0)
- /* This was a hashtable collision. */
- return 0;
-
- if (A->len <= B->len)
- /* B cannot be a suffix of A unless A is equal to B, which is guaranteed
- not to be equal by the hash table. */
- return 0;
-
- if (A->alignment < B->alignment
- || ((A->len - B->len) & (B->alignment - 1)))
- /* The suffix is not sufficiently aligned. */
- return 0;
-
- return memcmp (A->root.string + (A->len - B->len),
- B->root.string, B->len - 5 * A->u.entsize) == 0;
-}
-
-static int
-last_eq (const void *a, const void *b)
-{
- struct sec_merge_hash_entry * A = (struct sec_merge_hash_entry *) a;
- struct sec_merge_hash_entry * B = (struct sec_merge_hash_entry *) b;
-
- if (B->len >= 5 * A->u.entsize)
- /* Longer strings are just pushed into the hash table,
- they'll be used when looking up for very short strings. */
- return 0;
-
- if (memcmp (A->root.string + A->len - 2 * A->u.entsize,
- B->root.string + B->len - 2 * A->u.entsize,
- A->u.entsize) != 0)
- /* This was a hashtable collision. */
- return 0;
-
- if (A->len <= B->len)
- /* B cannot be a suffix of A unless A is equal to B, which is guaranteed
- not to be equal by the hash table. */
- return 0;
-
- if (A->alignment < B->alignment
- || ((A->len - B->len) & (B->alignment - 1)))
- /* The suffix is not sufficiently aligned. */
- return 0;
-
- return memcmp (A->root.string + (A->len - B->len),
- B->root.string, B->len - 2 * A->u.entsize) == 0;
-}
-
/* Record one section into the hash table. */
static bfd_boolean
record_section (struct sec_merge_info *sinfo,
@@ -534,7 +462,7 @@ record_section (struct sec_merge_info *sinfo,
goto error_return;
}
p++;
- }
+ }
}
else
{
@@ -576,18 +504,81 @@ error_return:
return FALSE;
}
+static int
+strrevcmp (const void *a, const void *b)
+{
+ struct sec_merge_hash_entry *A = *(struct sec_merge_hash_entry **) a;
+ struct sec_merge_hash_entry *B = *(struct sec_merge_hash_entry **) b;
+ unsigned int lenA = A->len;
+ unsigned int lenB = B->len;
+ const unsigned char *s = A->root.string + lenA - 1;
+ const unsigned char *t = B->root.string + lenB - 1;
+ int l = lenA < lenB ? lenA : lenB;
+
+ while (l)
+ {
+ if (*s != *t)
+ return (int) *s - (int) *t;
+ s--;
+ t--;
+ l--;
+ }
+ return lenA - lenB;
+}
+
+/* Like strrevcmp, but for the case where all strings have the same
+ alignment > entsize. */
+
+static int
+strrevcmp_align (const void *a, const void *b)
+{
+ struct sec_merge_hash_entry *A = *(struct sec_merge_hash_entry **) a;
+ struct sec_merge_hash_entry *B = *(struct sec_merge_hash_entry **) b;
+ unsigned int lenA = A->len;
+ unsigned int lenB = B->len;
+ const unsigned char *s = A->root.string + lenA - 1;
+ const unsigned char *t = B->root.string + lenB - 1;
+ int l = lenA < lenB ? lenA : lenB;
+ int tail_align = (lenA & (A->alignment - 1)) - (lenB & (A->alignment - 1));
+
+ if (tail_align != 0)
+ return tail_align;
+
+ while (l)
+ {
+ if (*s != *t)
+ return (int) *s - (int) *t;
+ s--;
+ t--;
+ l--;
+ }
+ return lenA - lenB;
+}
+
+static inline int
+is_suffix (const struct sec_merge_hash_entry *A,
+ const struct sec_merge_hash_entry *B)
+{
+ if (A->len <= B->len)
+ /* B cannot be a suffix of A unless A is equal to B, which is guaranteed
+ not to be equal by the hash table. */
+ return 0;
+
+ return memcmp (A->root.string + (A->len - B->len),
+ B->root.string, B->len) == 0;
+}
+
/* This is a helper function for _bfd_merge_sections. It attempts to
merge strings matching suffixes of longer strings. */
static void
merge_strings (struct sec_merge_info *sinfo)
{
- struct sec_merge_hash_entry **array, **a, **end, *e;
+ struct sec_merge_hash_entry **array, **a, *e;
struct sec_merge_sec_info *secinfo;
- htab_t lasttab = NULL, last4tab = NULL;
bfd_size_type size, amt;
+ unsigned int alignment = 0;
- /* Now sort the strings by length, longest first. */
- array = NULL;
+ /* Now sort the strings */
amt = sinfo->htab->size * sizeof (struct sec_merge_hash_entry *);
array = (struct sec_merge_hash_entry **) bfd_malloc (amt);
if (array == NULL)
@@ -595,90 +586,50 @@ merge_strings (struct sec_merge_info *sinfo)
for (e = sinfo->htab->first, a = array; e; e = e->next)
if (e->alignment)
- *a++ = e;
+ {
+ *a++ = e;
+ /* Adjust the length to not include the zero terminator. */
+ e->len -= sinfo->htab->entsize;
+ if (alignment != e->alignment)
+ {
+ if (alignment == 0)
+ alignment = e->alignment;
+ else
+ alignment = (unsigned) -1;
+ }
+ }
sinfo->htab->size = a - array;
-
- qsort (array, (size_t) sinfo->htab->size,
- sizeof (struct sec_merge_hash_entry *), cmplengthentry);
-
- last4tab = htab_create_alloc ((size_t) sinfo->htab->size * 4,
- NULL, last4_eq, NULL, calloc, free);
- lasttab = htab_create_alloc ((size_t) sinfo->htab->size * 4,
- NULL, last_eq, NULL, calloc, free);
- if (lasttab == NULL || last4tab == NULL)
- goto alloc_failure;
-
- /* Now insert the strings into hash tables (strings with last 4 characters
- and strings with last character equal), look for longer strings which
- we're suffix of. */
- for (a = array, end = array + sinfo->htab->size; a < end; a++)
+ if (sinfo->htab->size != 0)
{
- register hashval_t hash;
- unsigned int c;
- unsigned int i;
- const unsigned char *s;
- void **p;
-
- e = *a;
- e->u.entsize = sinfo->htab->entsize;
- if (e->len <= e->u.entsize)
- break;
- if (e->len > 4 * e->u.entsize)
+ qsort (array, (size_t) sinfo->htab->size,
+ sizeof (struct sec_merge_hash_entry *),
+ (alignment != (unsigned) -1 && alignment > sinfo->htab->entsize
+ ? strrevcmp_align : strrevcmp));
+
+ /* Loop over the sorted array and merge suffixes */
+ e = *--a;
+ e->len += sinfo->htab->entsize;
+ while (--a >= array)
{
- s = (const unsigned char *) (e->root.string + e->len - e->u.entsize);
- hash = 0;
- for (i = 0; i < 4 * e->u.entsize; i++)
- {
- c = *--s;
- hash += c + (c << 17);
- hash ^= hash >> 2;
- }
- p = htab_find_slot_with_hash (last4tab, e, hash, INSERT);
- if (p == NULL)
- goto alloc_failure;
- if (*p)
- {
- struct sec_merge_hash_entry *ent;
+ struct sec_merge_hash_entry *cmp = *a;
- ent = (struct sec_merge_hash_entry *) *p;
- e->u.suffix = ent;
- e->alignment = 0;
- continue;
+ cmp->len += sinfo->htab->entsize;
+ if (e->alignment >= cmp->alignment
+ && !((e->len - cmp->len) & (cmp->alignment - 1))
+ && is_suffix (e, cmp))
+ {
+ cmp->u.suffix = e;
+ cmp->alignment = 0;
}
else
- *p = e;
+ e = cmp;
}
- s = (const unsigned char *) (e->root.string + e->len - e->u.entsize);
- hash = 0;
- for (i = 0; i < e->u.entsize; i++)
- {
- c = *--s;
- hash += c + (c << 17);
- hash ^= hash >> 2;
- }
- p = htab_find_slot_with_hash (lasttab, e, hash, INSERT);
- if (p == NULL)
- goto alloc_failure;
- if (*p)
- {
- struct sec_merge_hash_entry *ent;
-
- ent = (struct sec_merge_hash_entry *) *p;
- e->u.suffix = ent;
- e->alignment = 0;
- }
- else
- *p = e;
}
alloc_failure:
if (array)
free (array);
- if (lasttab)
- htab_delete (lasttab);
- if (last4tab)
- htab_delete (last4tab);
/* Now assign positions to the strings we want to keep. */
size = 0;
@@ -787,11 +738,14 @@ _bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, void *xsinfo,
secinfo->sec->_cooked_size = size;
}
- /* Finally shrink all input sections which have not made it into
+ /* 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->_cooked_size = 0;
+ secinfo->sec->flags |= SEC_EXCLUDE;
+ }
}
return TRUE;
diff --git a/bfd/mipsbsd.c b/bfd/mipsbsd.c
index af1ba55..59f231b 100644
--- a/bfd/mipsbsd.c
+++ b/bfd/mipsbsd.c
@@ -70,7 +70,7 @@ static bfd_boolean MY(write_object_contents) PARAMS ((bfd *abfd));
#include "aout-target.h"
static bfd_reloc_status_type mips_fix_jmp_addr
- PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
+ PARAMS ((bfd *, arelent *, struct bfd_symbol *, PTR, asection *,
bfd *, char **));
static reloc_howto_type *MY(reloc_howto_type_lookup)
PARAMS ((bfd *, bfd_reloc_code_real_type));
@@ -203,7 +203,7 @@ mips_fix_jmp_addr (abfd, reloc_entry, symbol, data, input_section, output_bfd,
error_message)
bfd *abfd ATTRIBUTE_UNUSED;
arelent *reloc_entry;
- struct symbol_cache_entry *symbol;
+ struct bfd_symbol *symbol;
PTR data ATTRIBUTE_UNUSED;
asection *input_section;
bfd *output_bfd;
diff --git a/bfd/mmo.c b/bfd/mmo.c
index 56c9746..74b4c9d 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -401,14 +401,14 @@ static bfd_boolean mmo_get_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static long mmo_get_symtab_upper_bound
PARAMS ((bfd *));
-static long mmo_get_symtab
+static long mmo_canonicalize_symtab
PARAMS ((bfd *, asymbol **));
static void mmo_get_symbol_info
PARAMS ((bfd *, asymbol *, symbol_info *));
static void mmo_print_symbol
PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
static bfd_boolean mmo_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 int mmo_sizeof_headers
PARAMS ((bfd *, bfd_boolean));
static long mmo_get_reloc_upper_bound
@@ -2200,7 +2200,7 @@ mmo_sort_mmo_symbols (arg1, arg2)
/* Translate the symbol table. */
static long
-mmo_get_symtab (abfd, alocation)
+mmo_canonicalize_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
@@ -2613,7 +2613,7 @@ static bfd_boolean
mmo_set_section_contents (abfd, sec, location, offset, bytes_to_do)
bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr sec;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type bytes_to_do;
{
diff --git a/bfd/nlm-target.h b/bfd/nlm-target.h
index e0a8304..70ae4f4 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
+ Copyright 1993, 1994, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define nlm_core_file_p _bfd_dummy_target
#define nlm_get_symtab_upper_bound nlmNAME(get_symtab_upper_bound)
-#define nlm_get_symtab nlmNAME(get_symtab)
+#define nlm_canonicalize_symtab nlmNAME(canonicalize_symtab)
#define nlm_make_empty_symbol nlmNAME(make_empty_symbol)
#define nlm_print_symbol nlmNAME(print_symbol)
#define nlm_get_symbol_info nlmNAME(get_symbol_info)
diff --git a/bfd/nlm.c b/bfd/nlm.c
index ec3237f..7a0a35e 100644
--- a/bfd/nlm.c
+++ b/bfd/nlm.c
@@ -1,5 +1,5 @@
/* NLM (NetWare Loadable Module) executable support for BFD.
- Copyright 1993, 1994, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
diff --git a/bfd/nlm32-alpha.c b/bfd/nlm32-alpha.c
index 7f74b52..bcaa6ab 100644
--- a/bfd/nlm32-alpha.c
+++ b/bfd/nlm32-alpha.c
@@ -1,5 +1,6 @@
/* Support for 32-bit Alpha NLM (NetWare Loadable Module)
- Copyright 1993, 1994, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -40,7 +41,7 @@ static bfd_boolean nlm_alpha_write_prefix
static bfd_boolean nlm_alpha_read_reloc
PARAMS ((bfd *, nlmNAME(symbol_type) *, asection **, arelent *));
static bfd_boolean nlm_alpha_mangle_relocs
- PARAMS ((bfd *, asection *, PTR, bfd_vma, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, bfd_vma, bfd_size_type));
static bfd_boolean nlm_alpha_read_import
PARAMS ((bfd *, nlmNAME(symbol_type) *));
static bfd_boolean nlm_alpha_write_import
@@ -605,7 +606,7 @@ static bfd_boolean
nlm_alpha_mangle_relocs (abfd, sec, data, offset, count)
bfd *abfd ATTRIBUTE_UNUSED;
asection *sec ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
+ const PTR data ATTRIBUTE_UNUSED;
bfd_vma offset ATTRIBUTE_UNUSED;
bfd_size_type count ATTRIBUTE_UNUSED;
{
diff --git a/bfd/nlm32-i386.c b/bfd/nlm32-i386.c
index ce9595e..d084d18 100644
--- a/bfd/nlm32-i386.c
+++ b/bfd/nlm32-i386.c
@@ -1,5 +1,6 @@
/* Support for 32-bit i386 NLM (NetWare Loadable Module)
- Copyright 1993, 1994, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -33,7 +34,7 @@ static bfd_boolean nlm_i386_read_reloc
static bfd_boolean nlm_i386_write_import
PARAMS ((bfd *, asection *, arelent *));
static bfd_boolean nlm_i386_mangle_relocs
- PARAMS ((bfd *, asection *, PTR, bfd_vma, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, bfd_vma, bfd_size_type));
static bfd_boolean nlm_i386_read_import
PARAMS ((bfd *, nlmNAME(symbol_type) *));
static bfd_boolean nlm_i386_write_external
@@ -247,7 +248,7 @@ static bfd_boolean
nlm_i386_mangle_relocs (abfd, sec, data, offset, count)
bfd *abfd;
asection *sec;
- PTR data;
+ const PTR data;
bfd_vma offset;
bfd_size_type count;
{
diff --git a/bfd/nlm32-ppc.c b/bfd/nlm32-ppc.c
index 9f5f9c0..aafe2cc 100644
--- a/bfd/nlm32-ppc.c
+++ b/bfd/nlm32-ppc.c
@@ -1,5 +1,6 @@
/* Support for 32-bit PowerPC NLM (NetWare Loadable Module)
- Copyright 1994, 1995, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -41,7 +42,7 @@ static bfd_boolean nlm_powerpc_write_prefix
static bfd_boolean nlm_powerpc_read_reloc
PARAMS ((bfd *, nlmNAME(symbol_type) *, asection **, arelent *));
static bfd_boolean nlm_powerpc_mangle_relocs
- PARAMS ((bfd *, asection *, PTR, bfd_vma, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, bfd_vma, bfd_size_type));
static bfd_boolean nlm_powerpc_read_import
PARAMS ((bfd *, nlmNAME(symbol_type) *));
@@ -641,7 +642,7 @@ static bfd_boolean
nlm_powerpc_mangle_relocs (abfd, sec, data, offset, count)
bfd *abfd ATTRIBUTE_UNUSED;
asection *sec ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
+ const PTR data ATTRIBUTE_UNUSED;
bfd_vma offset ATTRIBUTE_UNUSED;
bfd_size_type count ATTRIBUTE_UNUSED;
{
diff --git a/bfd/nlm32-sparc.c b/bfd/nlm32-sparc.c
index 5094ed0..e973d42 100644
--- a/bfd/nlm32-sparc.c
+++ b/bfd/nlm32-sparc.c
@@ -1,5 +1,6 @@
/* Support for 32-bit SPARC NLM (NetWare Loadable Module)
- Copyright 1993, 1994, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 2000, 2001, 2002, 2003
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -33,7 +34,7 @@ static bfd_boolean nlm_sparc_read_reloc
static bfd_boolean nlm_sparc_write_reloc
PARAMS ((bfd *, asection *, arelent *));
static bfd_boolean nlm_sparc_mangle_relocs
- PARAMS ((bfd *, asection *, PTR, bfd_vma, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, bfd_vma, bfd_size_type));
static bfd_boolean nlm_sparc_read_import
PARAMS ((bfd *, nlmNAME(symbol_type) *));
static bfd_boolean nlm_sparc_write_import
@@ -237,7 +238,7 @@ static bfd_boolean
nlm_sparc_mangle_relocs (abfd, sec, data, offset, count)
bfd *abfd ATTRIBUTE_UNUSED;
asection *sec ATTRIBUTE_UNUSED;
- PTR data ATTRIBUTE_UNUSED;
+ const PTR data ATTRIBUTE_UNUSED;
bfd_vma offset ATTRIBUTE_UNUSED;
bfd_size_type count ATTRIBUTE_UNUSED;
{
diff --git a/bfd/nlmcode.h b/bfd/nlmcode.h
index 5eeb41e..68e4a2a 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
+ Copyright 1993, 1994, 1995, 1998, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, using ELF support as the
@@ -42,7 +42,7 @@
#define nlm_symbol_type nlmNAME(symbol_type)
#define nlm_get_symtab_upper_bound nlmNAME(get_symtab_upper_bound)
-#define nlm_get_symtab nlmNAME(get_symtab)
+#define nlm_canonicalize_symtab nlmNAME(canonicalize_symtab)
#define nlm_make_empty_symbol nlmNAME(make_empty_symbol)
#define nlm_print_symbol nlmNAME(print_symbol)
#define nlm_get_symbol_info nlmNAME(get_symbol_info)
@@ -918,7 +918,7 @@ nlm_get_symtab_upper_bound (abfd)
symbol table fails. */
long
-nlm_get_symtab (abfd, alocation)
+nlm_canonicalize_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
@@ -1568,7 +1568,7 @@ bfd_boolean
nlm_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
@@ -1586,7 +1586,7 @@ nlm_set_section_contents (abfd, section, location, offset, count)
if (section->reloc_count != 0)
{
bfd_boolean (*mangle_relocs_func)
- PARAMS ((bfd *, asection *, PTR, bfd_vma, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, bfd_vma, bfd_size_type));
mangle_relocs_func = nlm_mangle_relocs_func (abfd);
if (mangle_relocs_func != NULL)
diff --git a/bfd/oasys.c b/bfd/oasys.c
index 3c39386..8c30197 100644
--- a/bfd/oasys.c
+++ b/bfd/oasys.c
@@ -70,7 +70,7 @@ static int comp
static bfd_boolean oasys_write_object_contents
PARAMS ((bfd *));
static bfd_boolean oasys_set_section_contents
- PARAMS ((bfd *, sec_ptr, void *, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, sec_ptr, const void *, file_ptr, bfd_size_type));
static asymbol *oasys_make_empty_symbol
PARAMS ((bfd *));
static bfd *oasys_openr_next_archived_file
@@ -83,7 +83,7 @@ static int oasys_generic_stat_arch_elt
static int oasys_sizeof_headers
PARAMS ((bfd *, bfd_boolean));
-long oasys_get_symtab
+long oasys_canonicalize_symtab
PARAMS ((bfd *, asymbol **));
long oasys_canonicalize_reloc
PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
@@ -271,7 +271,7 @@ oasys_get_symtab_upper_bound (abfd)
extern const bfd_target oasys_vec;
long
-oasys_get_symtab (abfd, location)
+oasys_canonicalize_symtab (abfd, location)
bfd *abfd;
asymbol **location;
{
@@ -1346,7 +1346,7 @@ static bfd_boolean
oasys_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;
{
diff --git a/bfd/opncls.c b/bfd/opncls.c
index 086775b..34b39ae 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -1024,7 +1024,7 @@ FUNCTION
bfd_create_gnu_debuglink_section
SYNOPSIS
- struct sec *bfd_create_gnu_debuglink_section
+ struct bfd_section *bfd_create_gnu_debuglink_section
(bfd *abfd, const char *filename);
DESCRIPTION
@@ -1089,7 +1089,7 @@ FUNCTION
SYNOPSIS
bfd_boolean bfd_fill_in_gnu_debuglink_section
- (bfd *abfd, struct sec *sect, const char *filename);
+ (bfd *abfd, struct bfd_section *sect, const char *filename);
DESCRIPTION
@@ -1105,7 +1105,7 @@ RETURNS
bfd_boolean
bfd_fill_in_gnu_debuglink_section (bfd *abfd,
- struct sec *sect,
+ struct bfd_section *sect,
const char *filename)
{
bfd_size_type debuglink_size;
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index 52f7b70..3d009ba 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -1429,7 +1429,7 @@ bfd_boolean
NAME(aout,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;
{
@@ -2008,7 +2008,7 @@ error_return:
long
-NAME(aout,get_symtab) (abfd, location)
+NAME(aout,canonicalize_symtab) (abfd, location)
bfd *abfd;
asymbol **location;
{
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index 7f1a6a3..f3b3a96 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -570,8 +570,7 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out)
struct internal_extra_pe_aouthdr *extra = &pe->pe_opthdr;
PEAOUTHDR *aouthdr_out = (PEAOUTHDR *) out;
bfd_vma sa, fa, ib;
- IMAGE_DATA_DIRECTORY idata2, idata5;
-
+ IMAGE_DATA_DIRECTORY idata2, idata5, tls;
if (pe->force_minimum_alignment)
{
@@ -590,6 +589,7 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out)
idata2 = pe->pe_opthdr.DataDirectory[1];
idata5 = pe->pe_opthdr.DataDirectory[12];
+ tls = pe->pe_opthdr.DataDirectory[9];
if (aouthdr_in->tsize)
{
@@ -641,6 +641,7 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out)
a final link is going to be performed, it can overwrite them. */
extra->DataDirectory[1] = idata2;
extra->DataDirectory[12] = idata5;
+ extra->DataDirectory[9] = tls;
if (extra->DataDirectory[1].VirtualAddress == 0)
/* Until other .idata fixes are made (pending patch), the entry for
@@ -674,7 +675,9 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out)
5.0 link.exe) where the file size of the .data segment is
quite small compared to the virtual size. Without this
fix, strip munges the file. */
- isize += SA (FA (pei_section_data (abfd, sec)->virt_size));
+ if (coff_section_data (abfd, sec) != NULL
+ && pei_section_data (abfd, sec) != NULL)
+ isize += SA (FA (pei_section_data (abfd, sec)->virt_size));
}
aouthdr_in->dsize = dsize;
@@ -990,7 +993,11 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
ret = 0;
}
- if (scnhdr_int->s_nreloc <= 0xffff)
+ /* Although we could encode 0xffff relocs here, we do not, to be
+ consistent with other parts of bfd. Also it lets us warn, as
+ we should never see 0xffff here w/o having the overflow flag
+ set. */
+ if (scnhdr_int->s_nreloc < 0xffff)
H_PUT_16 (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
else
{
@@ -2019,7 +2026,19 @@ _bfd_XXi_final_link_postscript (abfd, pfinfo)
+ h1->root.u.def.section->output_offset)
- pe_data (abfd)->pe_opthdr.DataDirectory[12].VirtualAddress);
}
-
+
+ h1 = coff_link_hash_lookup (coff_hash_table (info),
+ "__tls_used", FALSE, FALSE, TRUE);
+ if (h1 != NULL)
+ {
+ pe_data (abfd)->pe_opthdr.DataDirectory[9].VirtualAddress =
+ (h1->root.u.def.value
+ + h1->root.u.def.section->output_section->vma
+ + h1->root.u.def.section->output_offset
+ - pe_data (abfd)->pe_opthdr.ImageBase);
+ pe_data (abfd)->pe_opthdr.DataDirectory[9].Size = 0x18;
+ }
+
/* If we couldn't find idata$2, we either have an excessively
trivial program or are in DEEP trouble; we have to assume trivial
program.... */
diff --git a/bfd/pef.c b/bfd/pef.c
index 550dbb8..7d758cf 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -76,7 +76,7 @@ static int bfd_pef_parse_function_stubs PARAMS ((bfd *, asection *, unsig
static long bfd_pef_parse_symbols PARAMS ((bfd *, asymbol **));
static long bfd_pef_count_symbols PARAMS ((bfd *));
static long bfd_pef_get_symtab_upper_bound PARAMS ((bfd *));
-static long bfd_pef_get_symtab PARAMS ((bfd *, asymbol **));
+static long bfd_pef_canonicalize_symtab PARAMS ((bfd *, asymbol **));
static asymbol *bfd_pef_make_empty_symbol PARAMS ((bfd *));
static void bfd_pef_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static int bfd_pef_sizeof_headers PARAMS ((bfd *, bfd_boolean));
@@ -1027,7 +1027,7 @@ bfd_pef_get_symtab_upper_bound (abfd)
}
static long
-bfd_pef_get_symtab (abfd, alocation)
+bfd_pef_canonicalize_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
diff --git a/bfd/peicode.h b/bfd/peicode.h
index b3c1f29..41fcbbc 100644
--- a/bfd/peicode.h
+++ b/bfd/peicode.h
@@ -135,7 +135,7 @@ static asection_ptr pe_ILF_make_a_section PARAMS ((pe_ILF_vars *, const
static void pe_ILF_make_a_reloc PARAMS ((pe_ILF_vars *, bfd_vma, bfd_reloc_code_real_type, asection_ptr));
static void pe_ILF_make_a_symbol PARAMS ((pe_ILF_vars *, const char *, const char *, asection_ptr, flagword));
static void pe_ILF_save_relocs PARAMS ((pe_ILF_vars *, asection_ptr));
-static void pe_ILF_make_a_symbol_reloc PARAMS ((pe_ILF_vars *, bfd_vma, bfd_reloc_code_real_type, struct symbol_cache_entry **, unsigned int));
+static void pe_ILF_make_a_symbol_reloc PARAMS ((pe_ILF_vars *, bfd_vma, bfd_reloc_code_real_type, struct bfd_symbol **, unsigned int));
static bfd_boolean pe_ILF_build_a_bfd PARAMS ((bfd *, unsigned int, bfd_byte *, bfd_byte *, unsigned int, unsigned int));
static const bfd_target * pe_ILF_object_p PARAMS ((bfd *));
static const bfd_target * pe_bfd_object_p PARAMS ((bfd *));
@@ -258,12 +258,12 @@ coff_swap_scnhdr_in (abfd, ext, in)
#ifndef COFF_NO_HACK_SCNHDR_SIZE
/* If this section holds uninitialized data and is from an object file
or from an executable image that has not initialized the field,
- or if the physical size is padded, use the virtual size (stored in
- s_paddr) instead. */
+ or if the image is an executable file and the physical size is padded,
+ use the virtual size (stored in s_paddr) instead. */
if (scnhdr_int->s_paddr > 0
&& (((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0
- && (! bfd_pe_executable_p (abfd) || scnhdr_int->s_size == 0))
- || scnhdr_int->s_size > scnhdr_int->s_paddr))
+ && (! bfd_pe_executable_p (abfd) || scnhdr_int->s_size == 0))
+ || (bfd_pe_executable_p (abfd) && scnhdr_int->s_size > scnhdr_int->s_paddr)))
{
scnhdr_int->s_size = scnhdr_int->s_paddr;
@@ -470,7 +470,7 @@ static void
pe_ILF_make_a_symbol_reloc (pe_ILF_vars * vars,
bfd_vma address,
bfd_reloc_code_real_type reloc,
- struct symbol_cache_entry ** sym,
+ struct bfd_symbol ** sym,
unsigned int sym_index)
{
arelent * entry;
@@ -967,11 +967,11 @@ pe_ILF_build_a_bfd (bfd * abfd,
if (magic == MIPS_ARCH_MAGIC_WINCE)
{
pe_ILF_make_a_symbol_reloc (&vars, (bfd_vma) 0, BFD_RELOC_HI16_S,
- (struct symbol_cache_entry **) imp_sym,
+ (struct bfd_symbol **) imp_sym,
imp_index);
pe_ILF_make_a_reloc (&vars, (bfd_vma) 0, BFD_RELOC_LO16, text);
pe_ILF_make_a_symbol_reloc (&vars, (bfd_vma) 4, BFD_RELOC_LO16,
- (struct symbol_cache_entry **) imp_sym,
+ (struct bfd_symbol **) imp_sym,
imp_index);
}
else
diff --git a/bfd/ppcboot.c b/bfd/ppcboot.c
index a4fe0ca..05fb7de 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
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Michael Meissner, Cygnus Support, <meissner@cygnus.com>
@@ -95,10 +95,10 @@ static bfd_boolean ppcboot_get_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static long ppcboot_get_symtab_upper_bound PARAMS ((bfd *));
static char *mangle_name PARAMS ((bfd *, char *));
-static long ppcboot_get_symtab PARAMS ((bfd *, asymbol **));
+static long ppcboot_canonicalize_symtab PARAMS ((bfd *, asymbol **));
static void ppcboot_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static bfd_boolean ppcboot_set_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
static int ppcboot_sizeof_headers PARAMS ((bfd *, bfd_boolean));
static bfd_boolean ppcboot_bfd_print_private_bfd_data PARAMS ((bfd *, PTR));
@@ -287,7 +287,7 @@ mangle_name (abfd, suffix)
/* Return the symbol table. */
static long
-ppcboot_get_symtab (abfd, alocation)
+ppcboot_canonicalize_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
@@ -364,7 +364,7 @@ static bfd_boolean
ppcboot_set_section_contents (abfd, sec, data, offset, size)
bfd *abfd;
asection *sec;
- PTR data;
+ const PTR data;
file_ptr offset;
bfd_size_type size;
{
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 6318190..8fdca41 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -98,7 +98,7 @@ CODE_FRAGMENT
.typedef struct reloc_cache_entry
.{
. {* A pointer into the canonical table of pointers. *}
-. struct symbol_cache_entry **sym_ptr_ptr;
+. struct bfd_symbol **sym_ptr_ptr;
.
. {* offset in section. *}
. bfd_size_type address;
@@ -122,15 +122,16 @@ DESCRIPTION
o <<sym_ptr_ptr>>
The symbol table pointer points to a pointer to the symbol
- associated with the relocation request. It is
- the pointer into the table returned by the back end's
- <<get_symtab>> action. @xref{Symbols}. The symbol is referenced
- through a pointer to a pointer so that tools like the linker
- can fix up all the symbols of the same name by modifying only
- one pointer. The relocation routine looks in the symbol and
- uses the base of the section the symbol is attached to and the
- value of the symbol as the initial relocation offset. If the
- symbol pointer is zero, then the section provided is looked up.
+ associated with the relocation request. It is the pointer
+ into the table returned by the back end's
+ <<canonicalize_symtab>> action. @xref{Symbols}. The symbol is
+ referenced through a pointer to a pointer so that tools like
+ the linker can fix up all the symbols of the same name by
+ modifying only one pointer. The relocation routine looks in
+ the symbol and uses the base of the section the symbol is
+ attached to and the value of the symbol as the initial
+ relocation offset. If the symbol pointer is zero, then the
+ section provided is looked up.
o <<address>>
@@ -277,7 +278,7 @@ SUBSUBSECTION
information that libbfd needs to know to tie up a back end's data.
CODE_FRAGMENT
-.struct symbol_cache_entry; {* Forward declaration. *}
+.struct bfd_symbol; {* Forward declaration. *}
.
.struct reloc_howto_struct
.{
@@ -321,7 +322,7 @@ CODE_FRAGMENT
. strange relocation methods to be accomodated (e.g., i960 callj
. instructions). *}
. bfd_reloc_status_type (*special_function)
-. (bfd *, arelent *, struct symbol_cache_entry *, void *, asection *,
+. (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
. bfd *, char **);
.
. {* The textual name of the relocation type. *}
@@ -3132,6 +3133,8 @@ ENUMX
BFD_RELOC_MMIX_PUSHJ_2
ENUMX
BFD_RELOC_MMIX_PUSHJ_3
+ENUMX
+ BFD_RELOC_MMIX_PUSHJ_STUBBABLE
ENUMDOC
These are relocations for the PUSHJ instruction.
ENUM
@@ -4029,7 +4032,8 @@ SYNOPSIS
DESCRIPTION
Provides default handling for relaxing for back ends which
- don't do relaxing -- i.e., does nothing.
+ don't do relaxing -- i.e., does nothing except make sure that the
+ final size of the section is set.
*/
bfd_boolean
@@ -4038,6 +4042,11 @@ 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;
}
@@ -4132,8 +4141,13 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
input_section->_raw_size))
goto error_return;
- /* We're not relaxing the section, so just copy the size info. */
- input_section->_cooked_size = input_section->_raw_size;
+ /* 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,
diff --git a/bfd/section.c b/bfd/section.c
index 5347c2b..e99062a 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -166,7 +166,7 @@ CODE_FRAGMENT
. long symbol;
.};
.
-.typedef struct sec
+.typedef struct bfd_section
.{
. {* The name of the section; the name isn't a copy, the pointer is
. the same as that passed to bfd_make_section. *}
@@ -179,7 +179,7 @@ CODE_FRAGMENT
. int index;
.
. {* The next section in the list belonging to the BFD, or NULL. *}
-. struct sec *next;
+. struct bfd_section *next;
.
. {* The field flags contains attributes of the section. Some
. flags are read in from the object file, and some are
@@ -402,7 +402,7 @@ CODE_FRAGMENT
. {* Nonzero if this section has a gp reloc. *}
. unsigned int has_gp_reloc:1;
.
-. {* Usused bits. *}
+. {* Unused bits. *}
. unsigned int flag13:1;
. unsigned int flag14:1;
. unsigned int flag15:1;
@@ -445,7 +445,7 @@ CODE_FRAGMENT
. bfd_vma output_offset;
.
. {* The output section through which to map on output. *}
-. struct sec *output_section;
+. struct bfd_section *output_section;
.
. {* The alignment requirement of the section, as an exponent of 2 -
. e.g., 3 aligns to 2^3 (or 8). *}
@@ -495,7 +495,7 @@ CODE_FRAGMENT
.
. {* Points to the kept section if this section is a link-once section,
. and is discarded. *}
-. struct sec *kept_section;
+. struct bfd_section *kept_section;
.
. {* When a section is being output, this value changes as more
. linenumbers are written out. *}
@@ -514,8 +514,8 @@ CODE_FRAGMENT
. bfd *owner;
.
. {* A symbol which points at this section only. *}
-. struct symbol_cache_entry *symbol;
-. struct symbol_cache_entry **symbol_ptr_ptr;
+. struct bfd_symbol *symbol;
+. struct bfd_symbol **symbol_ptr_ptr;
.
. struct bfd_link_order *link_order_head;
. struct bfd_link_order *link_order_tail;
@@ -553,13 +553,12 @@ CODE_FRAGMENT
. || ((SEC) == bfd_com_section_ptr) \
. || ((SEC) == bfd_ind_section_ptr))
.
-.extern const struct symbol_cache_entry * const bfd_abs_symbol;
-.extern const struct symbol_cache_entry * const bfd_com_symbol;
-.extern const struct symbol_cache_entry * const bfd_und_symbol;
-.extern const struct symbol_cache_entry * const bfd_ind_symbol;
+.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)->reloc_done ? (abort (), (bfd_size_type) 1) \
-. : (section)->_raw_size)
+. ((section)->_raw_size)
.#define bfd_get_section_size_after_reloc(section) \
. ((section)->reloc_done ? (section)->_cooked_size \
. : (abort (), (bfd_size_type) 1))
@@ -636,7 +635,7 @@ static const asymbol global_syms[] =
0, 0, 0, 0, \
\
/* output_offset, output_section, alignment_power, */ \
- 0, (struct sec *) &SEC, 0, \
+ 0, (struct bfd_section *) &SEC, 0, \
\
/* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
NULL, NULL, 0, 0, 0, \
@@ -651,10 +650,10 @@ static const asymbol global_syms[] =
0, NULL, NULL, NULL, \
\
/* symbol, */ \
- (struct symbol_cache_entry *) &global_syms[IDX], \
+ (struct bfd_symbol *) &global_syms[IDX], \
\
/* symbol_ptr_ptr, */ \
- (struct symbol_cache_entry **) &SYM, \
+ (struct bfd_symbol **) &SYM, \
\
/* link_order_head, link_order_tail */ \
NULL, NULL \
@@ -1133,8 +1132,8 @@ FUNCTION
SYNOPSIS
bfd_boolean bfd_set_section_contents
- (bfd *abfd, asection *section, void *data, file_ptr offset,
- bfd_size_type count);
+ (bfd *abfd, asection *section, const void *data,
+ file_ptr offset, bfd_size_type count);
DESCRIPTION
Sets the contents of the section @var{section} in BFD
@@ -1162,7 +1161,7 @@ DESCRIPTION
bfd_boolean
bfd_set_section_contents (bfd *abfd,
sec_ptr section,
- void *location,
+ const void *location,
file_ptr offset,
bfd_size_type count)
{
diff --git a/bfd/simple.c b/bfd/simple.c
index c2a741c..afed604 100644
--- a/bfd/simple.c
+++ b/bfd/simple.c
@@ -185,7 +185,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
memset (&link_info, 0, sizeof (link_info));
link_info.input_bfds = abfd;
- link_info.hash = bfd_link_hash_table_create (abfd);
+ link_info.hash = _bfd_generic_link_hash_table_create (abfd);
link_info.callbacks = &callbacks;
callbacks.warning = simple_dummy_warning;
callbacks.undefined_symbol = simple_dummy_undefined_symbol;
@@ -265,7 +265,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
bfd_map_over_sections (abfd, simple_restore_output_info, saved_offsets);
free (saved_offsets);
- bfd_link_hash_table_free (abfd, link_info.hash);
+ _bfd_generic_link_hash_table_free (link_info.hash);
RETURN (contents);
}
diff --git a/bfd/som.c b/bfd/som.c
index 90b0cf5..e8cf8ca 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -175,7 +175,7 @@ static unsigned int som_set_reloc_info
asymbol **, bfd_boolean));
static bfd_boolean som_slurp_reloc_table
PARAMS ((bfd *, asection *, asymbol **, bfd_boolean));
-static long som_get_symtab
+static long som_canonicalize_symtab
PARAMS ((bfd *, asymbol **));
static asymbol * som_make_empty_symbol
PARAMS ((bfd *));
@@ -4520,7 +4520,7 @@ som_slurp_symbol_table (abfd)
in the symbol table. */
static long
-som_get_symtab (abfd, location)
+som_canonicalize_symtab (abfd, location)
bfd *abfd;
asymbol **location;
{
diff --git a/bfd/som.h b/bfd/som.h
index 20b8a81..368aa88 100644
--- a/bfd/som.h
+++ b/bfd/som.h
@@ -1,6 +1,6 @@
/* HP PA-RISC SOM object file format: definitions internal to BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
- 2002 Free Software Foundation, Inc.
+ 2002, 2003 Free Software Foundation, Inc.
Contributed by the Center for Software Science at the
University of Utah (pa-gdb-bugs@cs.utah.edu).
diff --git a/bfd/sparclynx.c b/bfd/sparclynx.c
index 6be9a44..a7d78c6 100644
--- a/bfd/sparclynx.c
+++ b/bfd/sparclynx.c
@@ -245,7 +245,7 @@ static const struct aout_backend_data sparclynx_aout_backend =
#define MY_bfd_debug_info_start bfd_void
#define MY_bfd_debug_info_end bfd_void
#define MY_bfd_debug_info_accumulate \
- (void (*) PARAMS ((bfd *, struct sec *))) bfd_void
+ (void (*) PARAMS ((bfd *, struct bfd_section *))) bfd_void
#define MY_write_object_contents NAME(aout,sparclynx_write_object_contents)
#define MY_backend_data &sparclynx_aout_backend
diff --git a/bfd/srec.c b/bfd/srec.c
index cd31907..62e4300 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
+ 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -132,13 +132,13 @@ static bfd_boolean srec_get_section_contents
static bfd_boolean srec_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static bfd_boolean srec_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 internal_srec_write_object_contents PARAMS ((bfd *, int));
static bfd_boolean srec_write_object_contents PARAMS ((bfd *));
static bfd_boolean symbolsrec_write_object_contents PARAMS ((bfd *));
static int srec_sizeof_headers PARAMS ((bfd *, bfd_boolean));
static long srec_get_symtab_upper_bound PARAMS ((bfd *));
-static long srec_get_symtab PARAMS ((bfd *, asymbol **));
+static long srec_canonicalize_symtab PARAMS ((bfd *, asymbol **));
/* Macros for converting between hex and binary. */
@@ -872,7 +872,7 @@ static bfd_boolean
srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
bfd *abfd;
sec_ptr section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type bytes_to_do;
{
@@ -1188,7 +1188,7 @@ srec_get_symtab_upper_bound (abfd)
/* Return the symbol table. */
static long
-srec_get_symtab (abfd, alocation)
+srec_canonicalize_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
diff --git a/bfd/stabs.c b/bfd/stabs.c
index 6e6d290..193fc58 100644
--- a/bfd/stabs.c
+++ b/bfd/stabs.c
@@ -1,5 +1,5 @@
/* Stabs in sections linking support.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
@@ -169,12 +169,13 @@ stab_link_includes_newfunc (entry, table, string)
pass of the linker. */
bfd_boolean
-_bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
+_bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo, pstring_offset)
bfd *abfd;
PTR *psinfo;
asection *stabsec;
asection *stabstrsec;
PTR *psecinfo;
+ bfd_size_type *pstring_offset;
{
bfd_boolean first;
struct stab_info *sinfo;
@@ -276,7 +277,11 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
and identify N_BINCL symbols which can be eliminated. */
stroff = 0;
- next_stroff = 0;
+ /* The stabs sections can be split when
+ -split-by-reloc/-split-by-file is used. We must keep track of
+ each stab section's place in the single concatenated string
+ table. */
+ next_stroff = pstring_offset ? *pstring_offset : 0;
skip = 0;
symend = stabbuf + stabsec->_raw_size;
@@ -302,6 +307,8 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
string table. We only copy the very first one. */
stroff = next_stroff;
next_stroff += bfd_get_32 (abfd, sym + 8);
+ if (pstring_offset)
+ *pstring_offset = next_stroff;
if (! first)
{
*pstridx = (bfd_size_type) -1;
diff --git a/bfd/syms.c b/bfd/syms.c
index 33fd9fd..62acf12 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -181,7 +181,7 @@ SUBSECTION
CODE_FRAGMENT
.
-.typedef struct symbol_cache_entry
+.typedef struct bfd_symbol
.{
. {* A pointer to the BFD which owns the symbol. This information
. is necessary so that a back end can work out what additional
@@ -293,7 +293,7 @@ CODE_FRAGMENT
. {* A pointer to the section to which this symbol is
. relative. This will always be non NULL, there are special
. sections for undefined and absolute symbols. *}
-. struct sec *section;
+. struct bfd_section *section;
.
. {* Back end special data. *}
. union
@@ -581,7 +581,7 @@ coff_section_type (const char *s)
we could perhaps obsolete coff_section_type. */
static char
-decode_section_type (const struct sec *section)
+decode_section_type (const struct bfd_section *section)
{
if (section->flags & SEC_CODE)
return 't';
diff --git a/bfd/sysdep.h b/bfd/sysdep.h
index 1338d6b..1954470 100644
--- a/bfd/sysdep.h
+++ b/bfd/sysdep.h
@@ -1,5 +1,5 @@
/* sysdep.h -- handle host dependencies for the BFD library
- Copyright 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
diff --git a/bfd/targets.c b/bfd/targets.c
index c3212a9..a173857 100644
--- a/bfd/targets.c
+++ b/bfd/targets.c
@@ -328,7 +328,7 @@ BFD_JUMP_TABLE macros.
. {* Entry points used for symbols. *}
.#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
. NAME##_get_symtab_upper_bound, \
-. NAME##_get_symtab, \
+. NAME##_canonicalize_symtab, \
. NAME##_make_empty_symbol, \
. NAME##_print_symbol, \
. NAME##_get_symbol_info, \
@@ -341,20 +341,20 @@ BFD_JUMP_TABLE macros.
.
. long (*_bfd_get_symtab_upper_bound) (bfd *);
. long (*_bfd_canonicalize_symtab)
-. (bfd *, struct symbol_cache_entry **);
-. struct symbol_cache_entry *
+. (bfd *, struct bfd_symbol **);
+. struct bfd_symbol *
. (*_bfd_make_empty_symbol) (bfd *);
. void (*_bfd_print_symbol)
-. (bfd *, void *, struct symbol_cache_entry *, bfd_print_symbol_type);
+. (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type);
.#define bfd_print_symbol(b,p,s,e) BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
. void (*_bfd_get_symbol_info)
-. (bfd *, struct symbol_cache_entry *, symbol_info *);
+. (bfd *, struct bfd_symbol *, symbol_info *);
.#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
. bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
.
-. alent * (*_get_lineno) (bfd *, struct symbol_cache_entry *);
+. alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
. bfd_boolean (*_bfd_find_nearest_line)
-. (bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
+. (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
. const char **, const char **, unsigned int *);
. {* Back-door to allow format-aware applications to create debug symbols
. while using BFD for everything else. Currently used by the assembler
@@ -378,7 +378,7 @@ BFD_JUMP_TABLE macros.
.
. long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
. long (*_bfd_canonicalize_reloc)
-. (bfd *, sec_ptr, arelent **, struct symbol_cache_entry **);
+. (bfd *, sec_ptr, arelent **, struct bfd_symbol **);
. {* See documentation on reloc types. *}
. reloc_howto_type *
. (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
@@ -391,7 +391,7 @@ BFD_JUMP_TABLE macros.
. bfd_boolean (*_bfd_set_arch_mach)
. (bfd *, enum bfd_architecture, unsigned long);
. bfd_boolean (*_bfd_set_section_contents)
-. (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
+. (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
.
. {* Routines used by the linker. *}
.#define BFD_JUMP_TABLE_LINK(NAME) \
@@ -411,10 +411,10 @@ BFD_JUMP_TABLE macros.
. int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
. bfd_byte * (*_bfd_get_relocated_section_contents)
. (bfd *, struct bfd_link_info *, struct bfd_link_order *,
-. bfd_byte *, bfd_boolean, struct symbol_cache_entry **);
+. bfd_byte *, bfd_boolean, struct bfd_symbol **);
.
. bfd_boolean (*_bfd_relax_section)
-. (bfd *, struct sec *, struct bfd_link_info *, bfd_boolean *);
+. (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *);
.
. {* Create a hash table for the linker. Different backends store
. different information in this table. *}
@@ -435,7 +435,7 @@ BFD_JUMP_TABLE macros.
. bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
.
. {* Should this section be split up into smaller pieces during linking. *}
-. bfd_boolean (*_bfd_link_split_section) (bfd *, struct sec *);
+. bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
.
. {* Remove sections that are not referenced from the output. *}
. bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
@@ -444,7 +444,7 @@ BFD_JUMP_TABLE macros.
. bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
.
. {* Discard members of a group. *}
-. bfd_boolean (*_bfd_discard_group) (bfd *, struct sec *);
+. bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
.
. {* Routines to handle dynamic symbols and relocs. *}
.#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
@@ -457,12 +457,12 @@ BFD_JUMP_TABLE macros.
. long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
. {* Read in the dynamic symbols. *}
. long (*_bfd_canonicalize_dynamic_symtab)
-. (bfd *, struct symbol_cache_entry **);
+. (bfd *, 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. *}
. long (*_bfd_canonicalize_dynamic_reloc)
-. (bfd *, arelent **, struct symbol_cache_entry **);
+. (bfd *, arelent **, struct bfd_symbol **);
.
A pointer to an alternative bfd_target in case the current one is not
@@ -898,9 +898,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf64_sh64nbsd_vec,
&bfd_elf64_sh64lin_vec,
&bfd_elf64_sh64blin_vec,
-#if 0
&bfd_elf64_sparc_vec,
-#endif
&bfd_elf64_tradbigmips_vec,
&bfd_elf64_tradlittlemips_vec,
&bfd_elf64_x86_64_vec,
diff --git a/bfd/tekhex.c b/bfd/tekhex.c
index 77b471a..32c3d97 100644
--- a/bfd/tekhex.c
+++ b/bfd/tekhex.c
@@ -1,5 +1,5 @@
/* BFD backend for Extended Tektronix Hex Format objects.
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -110,17 +110,17 @@ static void out PARAMS ((bfd *, int, char *, char *));
static void writesym PARAMS ((char **, const char *));
static void writevalue PARAMS ((char **, bfd_vma));
static bfd_boolean tekhex_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 tekhex_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static bfd_boolean tekhex_get_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static void move_section_contents
- PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type, bfd_boolean));
+ PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type, bfd_boolean));
static const bfd_target *tekhex_object_p PARAMS ((bfd *));
static bfd_boolean tekhex_mkobject PARAMS ((bfd *));
static long tekhex_get_symtab_upper_bound PARAMS ((bfd *));
-static long tekhex_get_symtab PARAMS ((bfd *, asymbol **));
+static long tekhex_canonicalize_symtab PARAMS ((bfd *, asymbol **));
static void pass_over PARAMS ((bfd *, void (*) (bfd*, int, char *)));
static void first_phase PARAMS ((bfd *, int, char *));
static void insert_byte PARAMS ((bfd *, int, bfd_vma));
@@ -522,7 +522,7 @@ pass_over (abfd, func)
}
static long
-tekhex_get_symtab (abfd, table)
+tekhex_canonicalize_symtab (abfd, table)
bfd *abfd;
asymbol **table;
{
@@ -593,7 +593,7 @@ static void
move_section_contents (abfd, section, locationp, offset, count, get)
bfd *abfd;
asection *section;
- PTR locationp;
+ const PTR locationp;
file_ptr offset;
bfd_size_type count;
bfd_boolean get;
@@ -672,7 +672,7 @@ static bfd_boolean
tekhex_set_section_contents (abfd, section, locationp, offset, bytes_to_do)
bfd *abfd;
sec_ptr section;
- PTR locationp;
+ const PTR locationp;
file_ptr offset;
bfd_size_type bytes_to_do;
{
diff --git a/bfd/versados.c b/bfd/versados.c
index ee0897a..b978312 100644
--- a/bfd/versados.c
+++ b/bfd/versados.c
@@ -55,10 +55,10 @@ static bfd_boolean versados_pass_2 PARAMS ((bfd *));
static bfd_boolean versados_get_section_contents
PARAMS ((bfd *, asection *, void *, file_ptr, bfd_size_type));
static bfd_boolean versados_set_section_contents
- PARAMS ((bfd *, sec_ptr, void *, file_ptr, bfd_size_type));
+ PARAMS ((bfd *, sec_ptr, const void *, file_ptr, bfd_size_type));
static int versados_sizeof_headers PARAMS ((bfd *, bfd_boolean));
static long int versados_get_symtab_upper_bound PARAMS ((bfd *));
-static long int versados_get_symtab PARAMS ((bfd *, asymbol **));
+static long int versados_canonicalize_symtab PARAMS ((bfd *, asymbol **));
static void versados_get_symbol_info
PARAMS ((bfd *, asymbol *, symbol_info *));
static void versados_print_symbol
@@ -713,7 +713,7 @@ static bfd_boolean
versados_set_section_contents (abfd, section, location, offset, bytes_to_do)
bfd *abfd ATTRIBUTE_UNUSED;
sec_ptr section ATTRIBUTE_UNUSED;
- PTR location ATTRIBUTE_UNUSED;
+ const PTR location ATTRIBUTE_UNUSED;
file_ptr offset ATTRIBUTE_UNUSED;
bfd_size_type bytes_to_do ATTRIBUTE_UNUSED;
{
@@ -740,7 +740,7 @@ versados_get_symtab_upper_bound (abfd)
/* Return the symbol table. */
static long
-versados_get_symtab (abfd, alocation)
+versados_canonicalize_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
diff --git a/bfd/version.h b/bfd/version.h
index 445ac0f..339535c 100644
--- a/bfd/version.h
+++ b/bfd/version.h
@@ -1,3 +1,3 @@
-#define BFD_VERSION_DATE 20030917
+#define BFD_VERSION_DATE 20031111
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_string@
diff --git a/bfd/vms-misc.c b/bfd/vms-misc.c
index 86b84d7..b6f3042 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
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Klaus K"ampf (kkaempf@rmi.de)
@@ -612,7 +612,7 @@ bfd_boolean
_bfd_save_vms_section (abfd, section, data, offset, count)
bfd *abfd;
sec_ptr section;
- PTR data;
+ const PTR data;
file_ptr offset;
bfd_size_type count;
{
diff --git a/bfd/vms.c b/bfd/vms.c
index 175dae0..a55b94b 100644
--- a/bfd/vms.c
+++ b/bfd/vms.c
@@ -95,7 +95,7 @@ static int vms_generic_stat_arch_elt
PARAMS ((bfd *, struct stat *));
static long vms_get_symtab_upper_bound
PARAMS ((bfd *abfd));
-static long vms_get_symtab
+static long vms_canonicalize_symtab
PARAMS ((bfd *abfd, asymbol **symbols));
static void vms_print_symbol
PARAMS ((bfd *abfd, PTR file, asymbol *symbol, bfd_print_symbol_type how));
@@ -125,7 +125,7 @@ static const struct reloc_howto_struct *vms_bfd_reloc_type_lookup
static bfd_boolean vms_set_arch_mach
PARAMS ((bfd *abfd, enum bfd_architecture arch, unsigned long mach));
static bfd_boolean vms_set_section_contents
- PARAMS ((bfd *abfd, asection *section, PTR location, file_ptr offset,
+ PARAMS ((bfd *abfd, asection *section, const PTR location, file_ptr offset,
bfd_size_type count));
static int vms_sizeof_headers
PARAMS ((bfd *abfd, bfd_boolean reloc));
@@ -1065,7 +1065,7 @@ vms_get_symtab_upper_bound (abfd)
/* Copy symbols from hash table to symbol vector
- called from bfd_hash_traverse in vms_get_symtab
+ called from bfd_hash_traverse in vms_canonicalize_symtab
init counter to 0 if entry == 0 */
static bfd_boolean
@@ -1089,12 +1089,12 @@ copy_symbols (entry, arg)
return # of symbols read */
static long
-vms_get_symtab (abfd, symbols)
+vms_canonicalize_symtab (abfd, symbols)
bfd *abfd;
asymbol **symbols;
{
#if VMS_DEBUG
- vms_debug (1, "vms_get_symtab(%p, <ret>)\n", abfd);
+ vms_debug (1, "vms_canonicalize_symtab(%p, <ret>)\n", abfd);
#endif
/* init counter */
@@ -1659,7 +1659,7 @@ static bfd_boolean
vms_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
asection *section;
- PTR location;
+ const PTR location;
file_ptr offset;
bfd_size_type count;
{
diff --git a/bfd/vms.h b/bfd/vms.h
index 137dc62..afd1628 100644
--- a/bfd/vms.h
+++ b/bfd/vms.h
@@ -1,6 +1,6 @@
#undef vms
/* vms.h -- Header file for VMS (Alpha and Vax) support.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Written by Klaus K"ampf (kkaempf@rmi.de)
@@ -505,9 +505,6 @@ typedef struct _vms_section {
struct _vms_section *next;
} vms_section;
-extern bfd_boolean _bfd_save_vms_section
- PARAMS ((bfd *abfd, asection *section, PTR data, file_ptr offset,
- bfd_size_type count));
extern vms_section *_bfd_get_vms_section PARAMS ((bfd *abfd, int index));
typedef struct _vms_reloc {
@@ -594,7 +591,7 @@ struct vms_private_data_struct {
vms_section *vms_section_table[VMS_SECTION_COUNT];
struct bfd_hash_table *vms_symbol_table;
- struct symbol_cache_entry **symcache;
+ struct bfd_symbol **symcache;
int symnum;
struct location_struct *location_stack;
@@ -649,7 +646,7 @@ extern void _bfd_vms_push PARAMS ((bfd *abfd, uquad val, int psect));
extern uquad _bfd_vms_pop PARAMS ((bfd *abfd, int *psect));
extern bfd_boolean _bfd_save_vms_section
- PARAMS ((bfd *abfd, asection *section, PTR data, file_ptr offset,
+ PARAMS ((bfd *abfd, asection *section, const PTR data, file_ptr offset,
bfd_size_type count));
extern void _bfd_vms_output_begin
PARAMS ((bfd *abfd, int rectype, int rechead));
diff --git a/bfd/xsym.c b/bfd/xsym.c
index d73c05d..a4058dd 100644
--- a/bfd/xsym.c
+++ b/bfd/xsym.c
@@ -2413,7 +2413,7 @@ bfd_sym_get_symtab_upper_bound (abfd)
}
long
-bfd_sym_get_symtab (abfd, sym)
+bfd_sym_canonicalize_symtab (abfd, sym)
bfd *abfd ATTRIBUTE_UNUSED;
asymbol **sym ATTRIBUTE_UNUSED;
{
diff --git a/bfd/xsym.h b/bfd/xsym.h
index 8108e71..6c2e97c 100644
--- a/bfd/xsym.h
+++ b/bfd/xsym.h
@@ -1,5 +1,5 @@
/* xSYM symbol-file support for BFD.
- Copyright 1999, 2000, 2001, 2002
+ Copyright 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -693,7 +693,7 @@ extern void bfd_sym_get_symbol_info
PARAMS ((bfd *, asymbol *, symbol_info *));
extern long bfd_sym_get_symtab_upper_bound
PARAMS ((bfd *));
-extern long bfd_sym_get_symtab
+extern long bfd_sym_canonicalize_symtab
PARAMS ((bfd *, asymbol **));
extern int bfd_sym_sizeof_headers
PARAMS ((bfd *, bfd_boolean));
diff --git a/config-ml.in b/config-ml.in
index 865275c..06752b7 100644
--- a/config-ml.in
+++ b/config-ml.in
@@ -101,13 +101,12 @@
Makefile=${ac_file-Makefile}
ml_config_shell=${CONFIG_SHELL-/bin/sh}
-ml_arguments="${ac_configure_args}"
ml_realsrcdir=${srcdir}
# Scan all the arguments and set all the ones we need.
ml_verbose=--verbose
-for option in ${ml_arguments}
+for option in ${ac_configure_args}
do
case $option in
--*) ;;
@@ -133,7 +132,7 @@ do
enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
eval $enableopt="$optarg"
;;
- --norecursion | --no*)
+ --norecursion | --no-recursion)
ml_norecursion=yes
;;
--silent | --sil* | --quiet | --q*)
@@ -555,6 +554,10 @@ multi-do:
LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
LDFLAGS="$(LDFLAGS) $${flags}" \
DESTDIR="$(DESTDIR)" \
+ INSTALL="$(INSTALL)" \
+ INSTALL_DATA="$(INSTALL_DATA)" \
+ INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
+ INSTALL_SCRIPT="$(INSTALL_SCRIPT)" \
$(DO)); then \
true; \
else \
@@ -856,7 +859,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
- ${ml_arguments} ${ml_srcdiroption} ; then
+ ${ac_configure_args} ${ml_srcdiroption} ; then
true
else
exit 1
diff --git a/config/ChangeLog b/config/ChangeLog
index 7a7605b..92eb902 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,15 @@
+2003-10-14 Nathanael Nerode <neroden@gcc.gnu.org>
+
+ * gettext.m4: Properly quote arguments to AC_DEFUN.
+
+2003-09-24 Daniel Jacobowitz <drow@mvista.com>
+
+ * acx.m4 (AC_PROG_CPP_WERROR): New.
+
+2003-08-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * no-executables.m4: New file.
+
2003-07-07 Zack Weinberg <zack@codesourcery.com>
* gettext.m4: Delete all former contents.
@@ -15,7 +27,7 @@
2003-05-18 Nathanael Nerode <neroden@gcc.gnu.org>
- * config/acx.m4: Introduce _GCC_TOPLEV_NONCANONICAL_BUILD,
+ * acx.m4: Introduce _GCC_TOPLEV_NONCANONICAL_BUILD,
_GCC_TOPLEV_NONCANOICAL_HOST, _GCC_TOPLEV_NONCANONICAL_TARGET,
GCC_TOPLEV_SUBDIRS.
@@ -44,6 +56,10 @@
* mh-cygwin: Don't build libtermcap if it doesn't exist.
+2002-12-22 Geoffrey Keating <geoffk@apple.com>
+
+ * mt-aix43: Delete.
+
2002-11-23 H.J. Lu <hjl@gnu.org>
* accross.m4: New.
@@ -66,33 +82,33 @@
2002-04-29 Nathanael Nerode <neroden@twcny.rr.com>
- * config/mh-cxux: remove dead code
- * config/mh-dgux386: remove dead code
- * config/mh-hp300: remove dead code
- * config/mh-hpux: remove dead code
- * config/mh-hpux8: remove dead code
- * config/mh-irix5: remove dead code
- * config/mh-irix6: remove dead code
- * config/mh-ncr3000: remove dead code
- * config/mh-ncrsvr43: remove dead code
- * config/mh-necv4: remove dead code
- * config/mh-sco: remove dead code
- * config/mh-solaris: remove dead code
- * config/mh-sysv: remove dead code
- * config/mh-sysv4: remove dead code
- * config/mh-sysv5: remove dead code
- * config/mh-irix4: remove, contains only dead code
-
- * config/mt-armpic: Delete.
- * config/mt-elfalphapic: Delete.
- * config/mt-i370pic: Delete.
- * config/mt-ia64pic: Delete.
- * config/mt-m68kpic: Delete.
- * config/mt-papic: Delete.
- * config/mt-ppcpic: Delete.
- * config/mt-s390pic: Delete.
- * config/mt-sparcpic: Delete.
- * config/mt-x86pic: Delete.
+ * mh-cxux: remove dead code
+ * mh-dgux386: remove dead code
+ * mh-hp300: remove dead code
+ * mh-hpux: remove dead code
+ * mh-hpux8: remove dead code
+ * mh-irix5: remove dead code
+ * mh-irix6: remove dead code
+ * mh-ncr3000: remove dead code
+ * mh-ncrsvr43: remove dead code
+ * mh-necv4: remove dead code
+ * mh-sco: remove dead code
+ * mh-solaris: remove dead code
+ * mh-sysv: remove dead code
+ * mh-sysv4: remove dead code
+ * mh-sysv5: remove dead code
+ * mh-irix4: remove, contains only dead code
+
+ * mt-armpic: Delete.
+ * mt-elfalphapic: Delete.
+ * mt-i370pic: Delete.
+ * mt-ia64pic: Delete.
+ * mt-m68kpic: Delete.
+ * mt-papic: Delete.
+ * mt-ppcpic: Delete.
+ * mt-s390pic: Delete.
+ * mt-sparcpic: Delete.
+ * mt-x86pic: Delete.
2002-04-19 Nathanael Nerode <neroden@twcny.rr.com>
@@ -157,6 +173,10 @@
* mh-s390pic: New file.
* mt-s390pic: New file.
+2000-09-26 David Edelsohn <edelsohn@gnu.org>
+
+ * mt-aix43 (NM_FOR_TARGET): Add -B bsd-style flag.
+
2000-07-14 Mark P Mitchell <mark@codesourcery.com>
* mh-irix6 (CC): Don't set it.
@@ -177,7 +197,7 @@
2000-02-22 Nick Clifton <nickc@cygnus.com>
- * config/mt-wince: new file: Makefile fragment for WinCE targets.
+ * mt-wince: new file: Makefile fragment for WinCE targets.
2000-01-06 Geoff Keating <geoffk@cygnus.com>
@@ -192,6 +212,15 @@ Tue Sep 7 23:31:01 1999 Linas Vepstas <linas@linas.org>
* mt-d30v: New file, pass -g -Os -Wa,-C as default options.
+Thu Mar 18 00:17:50 1999 Mark Elbrecht <snowball3@usa.net>
+
+ * mh-go32: Delete.
+ * mh-djgpp: New. Renamed from mh-go32.
+
+Wed Feb 24 12:52:17 1999 Stan Shebs <shebs@andros.cygnus.com>
+
+ * mh-windows: Ditto.
+
1999-02-08 Syd Polk <spolk@cygnus.com>
* acinclude.m4: Added macros to find itcl files.
@@ -205,11 +234,23 @@ Tue Feb 2 22:51:21 1999 Philip Blundell <philb@gnu.org>
* mh-armpic: New file. Patch from Jim Pick <jim@jimpick.com>.
* mt-armpic: Likewise.
+Sat Jan 30 08:04:00 1999 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * mh-interix: New file.
+
Mon Jan 18 19:41:08 1999 Christopher Faylor <cgf@cygnus.com>
* cygwin.mh: Activate commented out dependencies for
gdb: libtermcap.
+Wed Dec 30 20:34:52 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * mt-cygwin: Remove.
+
+Wed Dec 30 01:13:03 1998 Christopher Faylor <cgf@cygnus.com>
+
+ * mt-cygwin: New file. libtermcap target info.
+
Wed Nov 18 20:29:46 1998 Christopher Faylor <cgf@cygnus.com>
* cygwin.mh: Add extra libtermcap target information.
@@ -264,10 +305,29 @@ Thu Mar 26 01:54:25 1998 Geoffrey Noer <noer@cygnus.com>
* mh-cygwin32: stop configuring and building dosrel.
+Fri Feb 6 01:33:52 1998 Manfred Hollstein <manfred@s-direktnet.de>
+
+ * mh-sparcpic (PICFLAG): Define to properly according
+ to current multilib configuration.
+ * mt-sparcpic (PICFLAG_FOR_TARGET): Define to properly
+ according to current multilib configuration.
+
+Sun Jan 4 01:06:55 1998 Mumit Khan <khan@xraylith.wisc.edu>
+
+ * mh-mingw32: New file.
+
Thu Sep 11 16:43:27 1997 Jim Wilson <wilson@cygnus.com>
* mh-elfalphapic, mt-elfalphapic: New files.
+1997-09-15 02:37 Ulrich Drepper <drepper@cygnus.com>
+
+ * mt-linux: Define CXXFLAGS to make sure -fvtable-thunks is used.
+
+Sun Sep 14 20:53:42 1997 Geoffrey Noer <noer@cygnus.com>
+
+ * mh-cygwin32: ok to build split texinfo files
+
Wed Jul 23 12:32:18 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
* mh-go32 (CFLAGS): Don't set -fno-omit-frame-pointer.
@@ -300,6 +360,20 @@ Mon Nov 11 10:29:51 1996 Michael Meissner <meissner@tiktok.cygnus.com>
* mt-ppc: Delete file, options moved to newlib configure.
+Mon Oct 28 17:32:46 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * mh-windows: Add rules for building MSVC makefiles.
+
+Thu Oct 24 09:02:07 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * mh-windows (HOST_FLAGS): Set srcroot, which is needed
+ for MSVC build procedure.
+
+Tue Oct 8 08:32:48 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * mh-windows: Add support for windows host
+ (that is a build done under the Microsoft build environment).
+
Fri Oct 4 12:21:03 1996 Angela Marie Thomas (angela@cygnus.com)
* mh-dgux386: New file. x86 dgux specific flags
@@ -313,6 +387,11 @@ Sat Aug 17 04:56:25 1996 Geoffrey Noer <noer@skaro.cygnus.com>
* mh-cygwin32: don't -D_WIN32 here anymore
+Sun Aug 11 20:51:50 1996 Stu Grossman (grossman@critters.cygnus.com)
+
+ * mh-cygwin32 (CFLAGS): Define _WIN32 to be compatible
+ with normal Windows compilation environment.
+
Thu Aug 15 19:46:44 1996 Stan Shebs <shebs@andros.cygnus.com>
* mpw-mh-mpw (SEGFLAG_68K, SEGFLAG_PPC): Remove.
@@ -382,6 +461,21 @@ Thu Jan 25 16:05:33 1996 Ian Lance Taylor <ian@cygnus.com>
* mh-ncrsvr43 (CFLAGS): Remove -Hnocopyr.
+Thu Nov 30 14:45:25 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * mt-v810 (CC_FOR_TARGET): Add -ansi flag. NEC compiler
+ defaults to K&R mode, but doesn't have varargs.h, so we have to
+ compile in ANSI mode.
+
+Wed Nov 29 13:49:08 1995 J.T. Conklin <jtc@rtl.cygnus.com>
+
+ * mt-v810 (CC_FOR_TARGET, AS_FOR_TARGET, AR_FOR_TARGET,
+ RANLIB_FOR_TARGET): Set as appropriate for NEC v810 toolchain.
+
+Tue Nov 14 15:03:12 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ * mh-i386win32: add LD_FOR_TARGET.
+
Tue Nov 7 15:41:30 1995 Stan Shebs <shebs@andros.cygnus.com>
* mpw-mh-mpw (CC_MWC68K, CC_MWCPPC): Remove unused include path.
@@ -406,6 +500,10 @@ Thu Sep 28 13:14:56 1995 Stan Shebs <shebs@andros.cygnus.com>
compilers, add definitions for library and link steps for
PowerMacs.
+Sat Sep 16 18:31:08 PDT 1995 Angela Marie Thomas <angela@cygnus.com>
+
+ * mh-ncrsvr43: Removed AR_FLAGS
+
Thu Sep 14 08:20:04 1995 Fred Fish <fnf@cygnus.com>
* mh-hp300 (CC): Add "CC = cc -Wp,-H256000" to avoid
@@ -420,6 +518,10 @@ Thu Jun 22 17:47:24 1995 Stan Shebs <shebs@andros.cygnus.com>
* mpw-mh-mpw (CC): Define ANSI_PROTOTYPES.
+Mon Jun 5 18:26:36 1995 Jason Merrill <jason@phydeaux.cygnus.com>
+
+ * m?-*pic: Define PICFLAG* instead of LIB*FLAGS*.
+
Mon Apr 10 12:29:48 1995 Stan Shebs <shebs@andros.cygnus.com>
* mpw-mh-mpw (EXTRALIBS): Always link in Math.o, CSANELIB.o,
@@ -438,6 +540,15 @@ Fri Mar 31 11:35:17 1995 Jason Molenda (crash@phydeaux.cygnus.com)
* mt-netware: New file.
+Tue Mar 28 14:47:34 1995 Jason Molenda (crash@phydeaux.cygnus.com)
+
+ Revert this change:
+
+ Mon Mar 29 19:59:26 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * mh-solaris: SunPRO C needs -Xs to be able to get a
+ working xmakefile for Emacs.
+
Mon Mar 13 12:31:29 1995 Ian Lance Taylor <ian@cygnus.com>
* mh-hpux8: New file.
@@ -452,6 +563,10 @@ Wed Jan 11 16:29:34 1995 Jason Merrill <jason@phydeaux.cygnus.com>
* m?-*pic (LIBCXXFLAGS): Add -fno-implicit-templates.
+Sat Nov 5 18:43:30 1994 Jason Merrill (jason@phydeaux.cygnus.com)
+
+ * m[th]-*pic: Support --enable-shared.
+
Thu Nov 3 17:27:19 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
* mh-irix4 (CC): Increase maximum string length.
@@ -473,6 +588,15 @@ Thu May 19 00:32:11 1994 Jeff Law (law@snake.cs.utah.edu)
* mh-hpux (CC): Add -Wp,-H256000 to avoid "too much defining"
errors from the HPUX 8 compilers.
+Fri May 6 14:19:25 1994 Steve Chamberlain (sac@cygnus.com)
+
+ * mh-go32: New fragment.
+
+Thu May 5 20:06:45 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
+
+ * mh-lynxrs6k: Renamed from mh-lynxosrs6k, to make it
+ unique in 8.3 naming schemes.
+
Wed May 4 20:14:47 1994 D. V. Henkel-Wallace (gumby@cygnus.com)
* mh-lynxrs6k: set SHELL to /bin/bash
@@ -481,10 +605,18 @@ Tue Apr 12 12:38:17 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* mh-irix4 (CC): Change -XNh1500 to -XNh2000.
+Mon Jan 31 18:40:55 1994 Stu Grossman (grossman at cygnus.com)
+
+ * mh-lynxosrs6k: Account for lack of ranlib!
+
Sat Dec 25 20:03:45 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
* mt-hppa: Delete.
+Thu Dec 2 14:35:54 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * mh-irix5: New file for Irix 5.
+
Tue Nov 16 22:54:39 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* mh-a68bsd: Define CC to gcc.
@@ -536,16 +668,62 @@ Fri Jun 4 16:09:34 1993 Ian Lance Taylor (ian@cygnus.com)
* mh-sysv4 (INSTALL): Use cp, not /usr/ucb/install.
+Sat Apr 17 17:19:50 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * mh-delta88: remove extraneous GCC references
+
Thu Apr 8 11:21:52 1993 Ian Lance Taylor (ian@cygnus.com)
* mt-a29k, mt-ebmon29k, mt-os68k, mt-ose68000, mt-ose68k,
mt-vxworks68, mt-vxworks960: Removed obsolete, unused target
Makefile fragment files.
+Wed Mar 31 12:31:56 1993 Ian Lance Taylor (ian@cygnus.com)
+
+ * mh-irix4: Bump -XNh value to 1500 to match gcc requirements.
+
+Mon Mar 29 19:59:26 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * mh-sun3: cc needs -J to compile cp-parse.c correctly
+
+ * mh-solaris: SunPRO C needs -Xs to be able to get a
+ working xmakefile for Emacs.
+
Mon Mar 8 15:05:25 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
* mh-aix386: New file; old mh-aix, plus no-op RANLIB.
+Tue Mar 2 21:15:58 1993 Fred Fish (fnf@cygnus.com)
+
+ * mh-vaxult2: New file.
+
+Sat Jan 23 20:32:01 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * mh-sco: define X11_LIB to the mess that SCO ODT requires
+
+Tue Dec 29 15:06:00 1992 Ian Lance Taylor (ian@cygnus.com)
+
+ * mh-sco: Don't override BISON definition.
+
+Mon Dec 7 06:43:27 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * mh-sco: don't default $(CC) to gcc
+
+Mon Nov 30 14:54:34 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * mh-solaris: rework standard X location to use
+ $OPENWINHOME, if defined.
+
+ * mh-sun: handle X11 include locations
+
+ * mh-decstation: define NeedFunctionPrototypes to 0, to
+ work around dain-bramaged DECwindows include files
+
+Fri Nov 27 18:35:54 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * mh-hpux, mh-solaris: define the "standard" locations for
+ the vendor supplied X11 headers and libraries
+
Thu Oct 1 13:50:48 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* mh-solaris: INSTALL is NOT /usr/ucb/install
@@ -554,6 +732,11 @@ Mon Aug 24 14:25:35 1992 Ian Lance Taylor (ian@cygnus.com)
* mt-ose68000, mt-ose68k: renamed from mt-OSE*.
+Mon Aug 3 15:41:28 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
+
+ * mh-solaris: removed the -xs from CFLAGS (let the people
+ with Sun's C compiler deal with it themselved)
+
Tue Jul 21 02:11:01 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
* mt-OSE68k, mt-680000: new configs.
@@ -562,20 +745,47 @@ Thu Jul 16 17:12:09 1992 K. Richard Pixley (rich@rtl.cygnus.com)
* mh-irix4: merged changes from progressive.
+Wed Jul 8 00:01:30 1992 Stu Grossman (grossman at cygnus.com)
+
+ * mh-solaris: Use -xs when compiling so that Sun-C puts
+ a symbol-table into the executable.
+
+Mon Jun 15 12:31:52 1992 Fred Fish (fnf@cygnus.com)
+
+ * mh-ncr3000 (INSTALL): Don't use /usr/ucb/install,
+ it is broken on ncr 3000's.
+
Tue Jun 9 23:29:38 1992 Per Bothner (bothner@rtl.cygnus.com)
* Everywhere: Change RANLIB=echo>/dev/null (which confuses
some shells - and I don't blame them) to RANLIB=true.
* mh-solaris: Use /usr/ucb/install for INSTALL.
+Tue Jun 9 17:18:11 1992 Fred Fish (fnf at cygnus.com)
+
+ * mh-ncr3000, mh-sysv4: Add INSTALL.
+
Sun May 31 14:45:23 1992 Mark Eichin (eichin at cygnus.com)
* mh-solaris2: Add new configuration for Solaris 2 (sysv, no ranlib)
+Wed Apr 22 14:38:34 1992 Fred Fish (fnf@cygnus.com)
+
+ * mh-delta88, mh-ncr3000: Replace MINUS_G with
+ CFLAGS per new configuration strategy.
+
Fri Apr 10 23:10:08 1992 Fred Fish (fnf@cygnus.com)
* mh-ncr3000: Add new configuration for NCR 3000.
+Thu Mar 5 12:05:58 1992 Stu Grossman (grossman at cygnus.com)
+
+ * mh-irix4: Port to SGI Irix-4.x.
+
+Thu Jan 30 16:17:30 1992 Stu Grossman (grossman at cygnus.com)
+
+ * mh-sco: Fix SCO configuration stuff.
+
Tue Dec 10 00:10:55 1991 K. Richard Pixley (rich at rtl.cygnus.com)
* ChangeLog: fresh changelog.
diff --git a/config/acx.m4 b/config/acx.m4
index ea5cb07..96b7c8a 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -140,3 +140,18 @@ else
$1="$ac_cv_prog_$1"
fi
]) []dnl # NCN_STRICT_CHECK_TARGET_TOOL
+
+###
+# 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_DEFUN([AC_PROG_CPP_WERROR],
+[AC_REQUIRE([AC_PROG_CPP])dnl
+m4_define([AC_CHECK_HEADER],m4_defn([_AC_CHECK_HEADER_OLD]))
+ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR
diff --git a/config/gettext.m4 b/config/gettext.m4
index a704307..d10aae8 100644
--- a/config/gettext.m4
+++ b/config/gettext.m4
@@ -9,7 +9,7 @@
# small file which can be sourced as a shell script; then we produce
# the necessary substitutions and definitions for this directory.
-AC_DEFUN(ZW_GNU_GETTEXT_SISTER_DIR,
+AC_DEFUN([ZW_GNU_GETTEXT_SISTER_DIR],
[# If we haven't got the data from the intl directory,
# assume NLS is disabled.
USE_NLS=no AC_SUBST(USE_NLS)
diff --git a/configure b/configure
index b204110..b49d8b1 100755
--- a/configure
+++ b/configure
@@ -755,6 +755,18 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
# 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
+
### 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
@@ -795,19 +807,13 @@ progname=$0
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
# Export original configure arguments for use by sub-configures. These
-# will be expanded once by make, and once by the shell, so they need to
-# have '$' quoted for make, and then each argument quoted for the shell.
-# What's more, the 'echo' below might expand backslashes.
-cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
+# will be expanded by make, so quote '$'.
+tmp="$progname $@"
+sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
+$tmp
EOF_SED
-tmp="'$progname'"
-for ac_arg
-do
- tmp="$tmp '"`echo "$ac_arg" | sed -f conftestsed`
-done
-rm -f conftestsed
-TOPLEVEL_CONFIGURE_ARGUMENTS="$tmp"
+TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
+rm -f conftestsed.out
moveifchange=${srcdir}/move-if-change
@@ -1125,7 +1131,7 @@ case "${target}" in
esac
;;
*-*-vxworks*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj}"
;;
alpha*-dec-osf*)
# ld works, but does not support shared libraries.
@@ -2516,7 +2522,14 @@ serialization_dependencies=serdep.tmp
# Base args. Strip norecursion, cache-file, srcdir, host, build,
# target and nonopt. These are the ones we might not want to pass
-# down to subconfigures.
+# down to subconfigures. Also strip program-prefix, program-suffix,
+# and program-transform-name, so that we can pass down a consistent
+# program-transform-name. If autoconf has put single quotes around
+# any of these arguments (because they contain shell metacharacters)
+# then this will fail; in practice this only happens for
+# --program-transform-name, so be sure to override --program-transform-name
+# 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-]*[= ][^ ]* / /
@@ -2524,17 +2537,38 @@ 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/ [^' -][^ ]* / /
s/^ *//;s/ *$//
-s,\\,\\\\,g; s,\$,$$,g
+s,\$,$$,g
+EOF_SED
+sed -f conftestsed <<EOF_SED > conftestsed.out
+ ${ac_configure_args}
EOF_SED
-baseargs=`echo " ${ac_configure_args} " | sed -f conftestsed`
-rm -f conftestsed
+baseargs=`cat conftestsed.out`
+rm -f conftestsed conftestsed.out
+
+# Add in --program-transform-name, after --program-prefix and
+# --program-suffix have been applied to it. Autoconf has already
+# doubled dollar signs and backslashes in program_transform_name; we want
+# the backslashes un-doubled, and then the entire thing wrapped in single
+# quotes, because this will be expanded first by make and then by the shell.
+# Also, because we want to override the logic in subdir configure scripts to
+# choose program_transform_name, replace any s,x,x, with s,y,y,.
+sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
+${program_transform_name}
+EOF_SED
+gcc_transform_name=`cat conftestsed.out`
+rm -f conftestsed.out
+baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
# For the build-side libraries, we just need to pretend we're native,
# and not use the same cache file. Multilibs are neither needed nor
@@ -2647,6 +2681,10 @@ case " $target_configdirs " in
;;
esac
+# Allow the user to override the flags for
+# our build compiler if desired.
+CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
+
# On Canadian crosses, we'll be searching the right directories for
# the previously-installed cross compiler, so don't bother to add
# flags for directories within the install tree of the compiler
@@ -2785,7 +2823,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:2789: checking for $ac_word" >&5
+echo "configure:2827: 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
@@ -2818,7 +2856,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:2822: checking for $ac_word" >&5
+echo "configure:2860: 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
@@ -2857,7 +2895,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:2861: checking for $ac_word" >&5
+echo "configure:2899: 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
@@ -2890,7 +2928,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:2894: checking for $ac_word" >&5
+echo "configure:2932: 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
@@ -2929,7 +2967,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:2933: checking for $ac_word" >&5
+echo "configure:2971: 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
@@ -2962,7 +3000,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:2966: checking for $ac_word" >&5
+echo "configure:3004: 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
@@ -3001,7 +3039,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:3005: checking for $ac_word" >&5
+echo "configure:3043: 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
@@ -3034,7 +3072,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:3038: checking for $ac_word" >&5
+echo "configure:3076: 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
@@ -3073,7 +3111,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:3077: checking for $ac_word" >&5
+echo "configure:3115: 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
@@ -3106,7 +3144,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:3110: checking for $ac_word" >&5
+echo "configure:3148: 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
@@ -3145,7 +3183,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:3149: checking for $ac_word" >&5
+echo "configure:3187: 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
@@ -3178,7 +3216,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:3182: checking for $ac_word" >&5
+echo "configure:3220: 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
@@ -3217,7 +3255,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:3221: checking for $ac_word" >&5
+echo "configure:3259: 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
@@ -3250,7 +3288,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:3254: checking for $ac_word" >&5
+echo "configure:3292: 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
@@ -3289,7 +3327,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:3293: checking for $ac_word" >&5
+echo "configure:3331: 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
@@ -3322,7 +3360,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:3326: checking for $ac_word" >&5
+echo "configure:3364: 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
@@ -3361,7 +3399,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:3365: checking for $ac_word" >&5
+echo "configure:3403: 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
@@ -3394,7 +3432,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:3398: checking for $ac_word" >&5
+echo "configure:3436: 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
@@ -3437,12 +3475,13 @@ 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:3446: checking for $ac_word" >&5
+echo "configure:3485: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3475,7 +3514,7 @@ if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3479: checking for $ac_word" >&5
+echo "configure:3518: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AR_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3514,7 +3553,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}as", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3518: checking for $ac_word" >&5
+echo "configure:3557: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3547,7 +3586,7 @@ if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3551: checking for $ac_word" >&5
+echo "configure:3590: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_AS_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3586,7 +3625,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3590: checking for $ac_word" >&5
+echo "configure:3629: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3619,7 +3658,7 @@ if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3623: checking for $ac_word" >&5
+echo "configure:3662: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3658,7 +3697,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ld", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3662: checking for $ac_word" >&5
+echo "configure:3701: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3691,7 +3730,7 @@ if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3695: checking for $ac_word" >&5
+echo "configure:3734: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_LD_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3730,7 +3769,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}nm", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3734: checking for $ac_word" >&5
+echo "configure:3773: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3763,7 +3802,7 @@ if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3767: checking for $ac_word" >&5
+echo "configure:3806: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_NM_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3802,7 +3841,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3806: checking for $ac_word" >&5
+echo "configure:3845: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3835,7 +3874,7 @@ if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3839: checking for $ac_word" >&5
+echo "configure:3878: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_RANLIB_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3874,7 +3913,7 @@ fi
# Extract the first word of "${ncn_target_tool_prefix}windres", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3878: checking for $ac_word" >&5
+echo "configure:3917: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3907,7 +3946,7 @@ if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3911: checking for $ac_word" >&5
+echo "configure:3950: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_ncn_cv_WINDRES_FOR_TARGET'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3974,7 +4013,7 @@ RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
NM_FOR_TARGET=${NM_FOR_TARGET}${extra_nmflags_for_target}
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:3978: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4017: 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"
@@ -4219,6 +4258,7 @@ s%@OBJDUMP@%$OBJDUMP%g
s%@ncn_cv_OBJDUMP@%$ncn_cv_OBJDUMP%g
s%@CC@%$CC%g
s%@CXX@%$CXX%g
+s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
s%@DEFAULT_YACC@%$DEFAULT_YACC%g
s%@DEFAULT_LEX@%$DEFAULT_LEX%g
s%@DEFAULT_M4@%$DEFAULT_M4%g
diff --git a/configure.in b/configure.in
index ae3ff2a..f849e26 100644
--- a/configure.in
+++ b/configure.in
@@ -67,19 +67,13 @@ progname=$0
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
# Export original configure arguments for use by sub-configures. These
-# will be expanded once by make, and once by the shell, so they need to
-# have '$' quoted for make, and then each argument quoted for the shell.
-# What's more, the 'echo' below might expand backslashes.
-cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
+# will be expanded by make, so quote '$'.
+tmp="$progname $@"
+sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
+$tmp
EOF_SED
-tmp="'$progname'"
-for ac_arg
-do
- tmp="$tmp '"`echo "$ac_arg" | sed -f conftestsed`
-done
-rm -f conftestsed
-TOPLEVEL_CONFIGURE_ARGUMENTS="$tmp"
+TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
+rm -f conftestsed.out
AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
moveifchange=${srcdir}/move-if-change
@@ -376,7 +370,7 @@ case "${target}" in
esac
;;
*-*-vxworks*)
- noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty ${libgcj}"
;;
alpha*-dec-osf*)
# ld works, but does not support shared libraries.
@@ -1766,7 +1760,14 @@ AC_SUBST_FILE(serialization_dependencies)
# Base args. Strip norecursion, cache-file, srcdir, host, build,
# target and nonopt. These are the ones we might not want to pass
-# down to subconfigures.
+# down to subconfigures. Also strip program-prefix, program-suffix,
+# and program-transform-name, so that we can pass down a consistent
+# program-transform-name. If autoconf has put single quotes around
+# any of these arguments (because they contain shell metacharacters)
+# then this will fail; in practice this only happens for
+# --program-transform-name, so be sure to override --program-transform-name
+# 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-]]*[[= ]][[^ ]]* / /
@@ -1774,17 +1775,38 @@ 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/ [[^' -][^ ]*] / /
s/^ *//;s/ *$//
-s,\\,\\\\,g; s,\$,$$,g
+s,\$,$$,g
EOF_SED
-baseargs=`echo " ${ac_configure_args} " | sed -f conftestsed`
-rm -f conftestsed
+sed -f conftestsed <<EOF_SED > conftestsed.out
+ ${ac_configure_args}
+EOF_SED
+baseargs=`cat conftestsed.out`
+rm -f conftestsed conftestsed.out
+
+# Add in --program-transform-name, after --program-prefix and
+# --program-suffix have been applied to it. Autoconf has already
+# doubled dollar signs and backslashes in program_transform_name; we want
+# the backslashes un-doubled, and then the entire thing wrapped in single
+# quotes, because this will be expanded first by make and then by the shell.
+# Also, because we want to override the logic in subdir configure scripts to
+# choose program_transform_name, replace any s,x,x, with s,y,y,.
+sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
+${program_transform_name}
+EOF_SED
+gcc_transform_name=`cat conftestsed.out`
+rm -f conftestsed.out
+baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
# For the build-side libraries, we just need to pretend we're native,
# and not use the same cache file. Multilibs are neither needed nor
@@ -1897,6 +1919,10 @@ case " $target_configdirs " in
;;
esac
+# Allow the user to override the flags for
+# our build compiler if desired.
+CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
+
# On Canadian crosses, we'll be searching the right directories for
# the previously-installed cross compiler, so don't bother to add
# flags for directories within the install tree of the compiler
@@ -2038,6 +2064,7 @@ NCN_STRICT_CHECK_TOOL(OBJDUMP, objdump)
AC_SUBST(CC)
AC_SUBST(CXX)
AC_SUBST(CFLAGS)
+AC_SUBST(CFLAGS_FOR_BUILD)
AC_SUBST(CXXFLAGS)
AC_SUBST(DEFAULT_YACC)
AC_SUBST(DEFAULT_LEX)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 15f7f1d..b2718d1 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,2235 @@
+2003-11-11 David Carlton <carlton@kealia.com>
+
+ * Merge with mainline; tag is carlton-dictionary-20031111-merge.
+
+2003-11-10 Michael Chastain <mec.gnu@mindspring.com>
+
+ * MAINTAINERS: Change my e-mail address.
+
+2003-11-10 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (return_value): Replace "inval" and "outval" with
+ "readbuf" and "writebuf".
+ * ppcnbsd-tdep.c (ppcnbsd_return_value): Ditto.
+ * d10v-tdep.c (d10v_return_value): Ditto.
+ * ppc-tdep.h (ppc_sysv_abi_return_value): Ditto.
+ (ppc_sysv_abi_broken_return_value): Ditto.
+ (ppc64_sysv_abi_return_value): Ditto.
+ * ppc-sysv-tdep.c (do_ppc_sysv_return_value): Ditto.
+ (ppc_sysv_abi_return_value): Ditto.
+ (ppc_sysv_abi_broken_return_value): Ditto.
+ (ppc64_sysv_abi_return_value): Ditto.
+ * values.c (register_value_being_returned): Update call.
+ * stack.c (return_command): Update call.
+ * gdbarch.h, gdbarch.c: Re-generate.
+
+ * target.h (struct target_ops): Order xfer buffer parameters "read
+ write" not "write read".
+ * bfd-target.c (target_bfd_xfer_partial): Update.
+ * remote.c (remote_xfer_partial): Update.
+ * inftarg.c (child_xfer_partial): Update.
+ * target.c (default_xfer_partial): Update.
+ (target_read_partial, target_write_partial): Update.
+ (debug_to_xfer_partial): Update.
+
+ * arch-utils.h, arch-utils.c: Fix typo in comment.
+
+ * arch-utils.c (deprecated_select_gdbarch_hack): Delete function.
+ (gdbarch_from_bfd): Call gdbarch_find_by_info.
+ (set_gdbarch_from_file): Call
+ "deprecated_current_gdbarch_select_hack".
+
+2003-11-09 Andrew Cagney <cagney@redhat.com>
+
+ * arch-utils.c (gdbarch_update_p): New function.
+ * gdbarch.sh (gdbarch_update_p): Delete function.
+ (find_arch_by_info, gdbarch_find_by_info): New functions.
+ (deprecated_current_gdbarch_select_hack): New function.
+ * gdbarch.c: Re-generate.
+
+ * gdbarch.sh (clear_gdbarch_swap): Delete function.
+ (swapout_gdbarch_swap): Delete function.
+ (swapin_gdbarch_swap): Delete function.
+ (init_gdbarch_swap): Delete function.
+ (initialize_non_multiarch): Delete function.
+ (current_gdbarch_swap_in_hack): New function.
+ (current_gdbarch_swap_out_hack): New function.
+ (current_gdbarch_swap_init_hack): New function.
+ * gdbarch.c: Re-generate.
+
+ * gdbarch.sh (verify_gdbarch, gdbarch_dump): Rename "gdbarch"
+ parameter to "current_gdbarch". Add comment explaining why.
+ (TARGET_FLOAT_FORMAT: Pass "current_gdbarch" to default_double_format.
+ (TARGET_DOUBLE_FORMAT,TARGET_LONG_DOUBLE_FORMAT): Ditto.
+ * gdbarch.c: Re-generate.
+
+ * config/s390/s390.mh (XM_FILE, XM_CLIBS): Delete macros.
+ * config/s390/nm-linux.h (KERNEL_U_ADDR): Define.
+ * config/s390/xm-linux.h: Delete file.
+ * config/m88k/xm-delta88v4.h: Delete stray.
+
+ * Makefile.in (arch-utils.o): Update dependencies.
+ * arch-utils.c: Include "osabi.h".
+ (gdbarch_info_fill): New function.
+ * arch-utils.h (gdbarch_info_fill): Declare.
+ * gdbarch.sh (gdbarch_update_p): Call "gdbarch_info_fill".
+ * gdbarch.c: Re-generate.
+
+2003-11-09 Mark Kettenis <kettenis@gnu.org>
+ David S. Miller <davem@redhat.com>
+
+ * glibc-tdep.c, glibc-tdep.h: New files.
+ * config/arm/linux.mt (TDEPFILES): Add glibc-tdep.o
+ * config/i386/linux.mt (TDEPFILES): Likewise.
+ * i386-linux-tdep.c (glibc-tdep.h): Include.
+ (find_minsym_and_objfile, skip_hurd_resolver): Delete.
+ (i386_linux_skip_solib_resolver): Call glibc_skip_solib_resolver.
+ * arm-linux-tdep.c (glibc-tdep.h): Include.
+ (find_minsym_and_objfile, skip_hurd_resolver): Delete.
+ (arm_linux_skip_solib_resolver): Call glibc_skip_solib_resolver.
+ * Makefile.in (ALLDEPFILES): Add glibc-tdep.c
+ (glibc_tdep_h): Define.
+ (glibc-tdep.o): Add dependencies.
+ (arm-linux-tdep.o): Update dependencies.
+ (i386-linux-tdep.o): Likewise.
+
+2003-11-09 Andrew Cagney <cagney@redhat.com>
+
+ * config/mips/irix6.mh (NAT_FILE): Set to "nm-irix5.h".
+ * config/mips/nm-irix6.h: Delete file.
+ * config/mips/nm-linux.h: Update copyright.
+ (MIPS_GNULINUX_TARGET): Delete macro.
+ * config/mips/irix6.mh (XM_FILE): Set to "xm-irix5.h".
+ * config/mips/xm-irix6.h: Delete file.
+ * config/mips/linux.mh (XM_FILE): Delete definition.
+ * config/mips/xm-linux.h: Delete file.
+
+2003-11-09 Andrew Cagney <cagney@redhat.com>
+
+ * d10v-tdep.c (d10v_return_value): New function.
+ (d10v_use_struct_convention): Delete function.
+ (d10v_store_return_value): Delete function.
+ (d10v_extract_struct_value_address): Delete function.
+ (d10v_gdbarch_init): Set "return_value" instead of
+ "extract_return_value", "store_return_value",
+ "extract_struct_value_address", and "use_struct_convention".
+ (RET1_REGNUM): Delete const.
+
+2003-11-09 Mark Kettenis <kettenis@gnu.org>
+
+ From David S. Miller <davem@redhat.com>:
+ * gdbarch.sh (SKIP_SOLIB_RESOLVER): New method.
+ * gdbarch.c, gdbarch.h: Regenerated.
+ * arch-utils.c (generic_skip_solib_resolver): New function.
+ * arch-utils.h (generic_skip_solib_resolver): New prototype.
+ * infrun.c (SKIP_SOLIB_RESOLVER): Don't define.
+
+2003-11-07 Andrew Cagney <cagney@redhat.com>
+
+ * top.c (print_gdb_version): Replace STREQ with strcmp.
+ * valops.c (value_struct_elt_for_reference): Ditto.
+ (value_struct_elt_for_reference): Ditto.
+ * symtab.c (gdb_mangle_name): Ditto.
+ (find_line_symtab): Ditto.
+ * symmisc.c (maintenance_print_symbols): Ditto.
+ * symfile.c (symbol_file_command): Ditto.
+ * stabsread.c (define_symbol, read_type): Ditto.
+ (cleanup_undefined_types, scan_file_globals): Ditto.
+ * solib.c (solib_map_sections): Ditto.
+ * solib-svr4.c (bfd_lookup_symbol): Ditto.
+ * rs6000-tdep.c (skip_prologue): Ditto.
+ * p-valprint.c (pascal_value_print): Ditto.
+ (pascal_object_is_vtbl_ptr_type): Ditto.
+ * objfiles.c (in_plt_section): Ditto.
+ * minsyms.c (lookup_minimal_symbol): Ditto.
+ (compact_minimal_symbols): Ditto.
+ (find_solib_trampoline_target): Ditto.
+ * mdebugread.c (parse_type): Ditto.
+ * language.c (set_language_command): Ditto.
+ (set_type_command, set_range_command): Ditto.
+ * f-lang.c (add_common_block): Ditto.
+ (add_common_block): Ditto.
+ (find_first_common_named): Ditto.
+ (patch_all_commons_by_name): Ditto.
+ * elfread.c (elf_locate_sections): Ditto.
+ (elf_locate_sections): Ditto.
+ (elfstab_offset_sections): Ditto.
+ * dwarf2read.c (dwarf2_locate_sections): Ditto.
+ * dbxread.c (add_old_header_file): Ditto.
+ (find_corresponding_bincl_psymtab): Ditto.
+ (read_dbx_symtab, process_one_symbol): Ditto.
+ * coffread.c (patch_opaque_types): Ditto.
+ * cli/cli-decode.c (delete_cmd): Ditto.
+ * cli/cli-cmds.c (pwd_command, list_command): Ditto.
+ * c-typeprint.c (c_type_print_base): Ditto.
+ * breakpoint.c (bpstat_stop_status): Ditto.
+ (clear_command, breakpoint_re_set_one): Ditto.
+
+2003-11-07 Andrew Cagney <cagney@redhat.com>
+
+ * bcache.h: Update copyright. Add comments on bcache VS hashtab.
+ * bcache.c (struct bstring): Make "length" an unsigned short, add
+ "half_hash".
+ (struct bcache): Add "half_hash_error_count".
+ (bcache): Compute and save the "half_hash". Compare the
+ "half_hash" before comparing the length. Update
+ half_hash_error_count.
+
+2003-11-07 Andrew Cagney <cagney@redhat.com>
+
+ * inftarg.c (child_xfer_partial): New function
+ (init_child_ops): Set "to_xfer_partial".
+
+2003-11-07 Andrew Cagney <cagney@redhat.com>
+
+ * ppc-linux-tdep.c (ppc_linux_init_abi): When 32-bit GNU/Linux,
+ set "return_value" instead of "use_struct_convention".
+ (ppc_linux_use_struct_convention): Delete function.
+ (ppc_linux_return_value): New function.
+ * ppc-sysv-tdep.c (ppc_sysv_abi_return_value): New function.
+ (ppc_sysv_abi_broken_return_value): New function.
+ (do_ppc_sysv_return_value): Add "gdbarch" parameter.
+ (ppc64_sysv_abi_push_dummy_call): Add "gdbarch" parameter, drop
+ static.
+ (ppc_sysv_abi_extract_return_value): Delete function.
+ (ppc_sysv_abi_broken_extract_return_value): Delete function.
+ (ppc_sysv_abi_store_return_value): Delete function.
+ (ppc_sysv_abi_broken_store_return_value): Delete function.
+ (ppc_sysv_abi_use_struct_convention): Delete function.
+ (ppc64_sysv_abi_use_struct_convention): Delete function.
+ (ppc64_sysv_abi_extract_return_value): Delete function.
+ (ppc64_sysv_abi_store_return_value): Delete function.
+ * ppcnbsd-tdep.c (ppcnbsd_return_value): New function.
+ (ppcnbsd_init_abi): Set "return_value", instead of
+ "use_struct_convention", "extract_return_value", and
+ "store_return_value".
+ (ppcnbsd_use_struct_convention): Delete function.
+ * ppc-tdep.h (ppc64_sysv_abi_return_value): Declare.
+ (ppc_sysv_abi_return_value): Declare.
+ (ppc_sysv_abi_broken_return_value): Declare.
+ (ppc_sysv_abi_use_struct_convention): Delete.
+ (ppc_sysv_abi_store_return_value): Delete.
+ (ppc_sysv_abi_extract_return_value): Delete.
+ (ppc_sysv_abi_broken_store_return_value): Delete.
+ (ppc_sysv_abi_broken_extract_return_value): Delete.
+ (ppc64_sysv_abi_use_struct_convention): Delete.
+ (ppc64_sysv_abi_extract_return_value): Delete.
+ (ppc64_sysv_abi_store_return_value): Delete.
+ * rs6000-tdep.c (rs6000_gdbarch_init): For 32-bit and 64-bit SYSV,
+ set "return_value" instead of "extract_return_value",
+ "store_return_value", and "use_struct_convention".
+
+2003-11-07 Mark Kettenis <kettenis@gnu.org>
+
+ * dwarf2-frame.c (dwarf2_build_frame_info): Wrap comment.
+
+ * fbsd-proc.c (read_mapping): Use sscanf and fgets instead of
+ fscanf.
+
+2003-11-07 Mark Kettenis <kettenis@gnu.org>
+
+ * fbsd-proc.c: Fix formatting.
+
+2003-11-06 Kevin Buettner <kevinb@redhat.com>
+
+ * frv-tdep.c (first_pseudo_regnum, iacc0_regnum, frv_num_pseudo_regs):
+ Define.
+ (new_variant): Set name for iacc0_regnum.
+ (frv_register_name): Accommodate pseudo-registers.
+ (frv_register_type): Add case for iacc0_regnum.
+ (frv_pseudo_register_read, frv_pseudo_register_write): New functions.
+ (frv_gdbarch_init): Set number of pseudo registers. Establish
+ pseudo-register read/write methods.
+
+2003-11-06 Andrew Cagney <cagney@redhat.com>
+
+ * valops.c (destructor_name_p): Replace STREQN with strncmp.
+ * top.c (command_line_input): Ditto.
+ * objc-exp.y (yylex): Ditto.
+ * minsyms.c (prim_record_minimal_symbol_and_info): Ditto.
+ * jv-exp.y (yylex): Ditto.
+ * f-exp.y (yylex): Ditto.
+ * event-top.c (command_line_handler): Ditto.
+ * environ.c (get_in_environ): Ditto.
+ (set_in_environ): Ditto.
+ * dwarfread.c (handle_producer): Ditto.
+ * dbxread.c (process_one_symbol): Ditto.
+ * c-typeprint.c (c_type_print_base): Ditto.
+ * c-exp.y (yylex): Ditto.
+
+2003-11-06 Andrew Cagney <cagney@redhat.com>
+ Jeff Johnston <jjohnstn@redhat.com>
+
+ * target.c (add_target): Only set "to_xfer_partial" when NULL.
+ (init_dummy_target): Set "to_xfer_partial".
+
+2003-11-06 Andrew Cagney <cagney@redhat.com>
+
+ * stack.c (return_command): Warn when STRUCT_CONVENTION, and not
+ REGISTER_CONVENTION.
+
+2003-11-06 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.c (insert_bp_location, allocate_bp_location): Make
+ static.
+
+2003-11-06 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.c (remove_breakpoint): Take an bp_location
+ instead of a breakpoint argument. Check the bp_location's type.
+ Fix a reversed condition for hardware breakpoints.
+
+ (insert_bp_location): Update call to remove_breakpoint.
+ (remove_breakpoints): Likewise. Use ALL_BP_LOCATIONS.
+ (remove_hw_watchpoints): Likewise.
+ (reattach_breakpoints): Likewise.
+ (detach_breakpoints): Likewise.
+ (delete_breakpoint): Likewise.
+
+2003-11-06 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.c (mark_breakpoints_out): Use ALL_BP_LOCATIONS.
+ (beakpoint_init_inferior): Likewise.
+ (breakpoint_here_p): Likewise. Only check addresses for software
+ or hardware breakpoints.
+ (breakpoint_inserted_here_p): Likewise.
+ (breakpoint_thread_match): Likewise. Correct comment.
+ (bpstat_have_active_hw_watchpoints): Likewise.
+ (check_duplicates): Likewise.
+
+2003-11-06 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoints.c (insert_bp_location): New function, broken out
+ from insert_breakpoints. Work on an bp_location instead of a
+ breakpoint.
+ (insert_breakpoints): Use it.
+
+2003-11-06 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.h (struct bp_location): Add section.
+ (struct breakpoint): Remove section.
+ * breakpoint.c (insert_breakpoints, remove_breakpoint)
+ (breakpoint_here_p, breakpoint_inserted_here_p)
+ (breakpoint_thread_match, bpstat_stop_status, print_one_breakpoint)
+ (describe_other_breakpoints, check_duplicates, set_raw_breakpoint)
+ (clear_command, delete_breakpoint, breakpoint_re_set_one): Access
+ section through loc.
+
+2003-11-06 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.c (read_memory_nobpt): Use ALL_BP_LOCATIONS
+ instead of ALL_BREAKPOINTS. Check for software breakpoints only.
+
+2003-11-06 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.c (allocate_bp_location): Take bpt and bp_type
+ arguments. Initialize owner and type for the new breakpoint
+ location item.
+ (set_raw_breakpoint): Update call to allocate_bp_location.
+
+2003-11-06 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.h (struct bp_location): Add a chain pointer.
+ * breakpoint.c (ALL_BP_LOCATIONS, ALL_BP_LOCATIONS_SAFE): New
+ macros.
+ (bp_location_chain): New variable.
+ (allocate_bp_location): New function.
+ (set_raw_breakpoint): Use it.
+ (delete_breakpoint): Remove ->loc from the bp_location_chain.
+
+2003-11-06 Daniel Jacobowitz <drow@mvista.com>
+
+ * breakpoint.h (enum bp_loc_type, struct bp_location): New.
+ (struct breakpoint): Remove address, shadow_contents, inserted,
+ requested_address, and duplicate. Add a struct bp_location.
+ * breakpoint.c (condition_command, read_memory_nobpt)
+ (insert_breakpoints, remove_breakpoints, remove_hw_watchpoints)
+ (reattach_breakpoints, update_breakpoints_after_exec)
+ (detach_breakpoints, remove_breakpoint, mark_breakpoints_out)
+ (breakpoint_init_inferior, breakpoint_here_p)
+ (breakpoint_inserted_here_p, deprecated_frame_in_dummy)
+ (breakpoint_thread_match, bpstat_stop_status)
+ (bpstat_have_active_hw_watchpoints, print_one_breakpoint)
+ (describe_other_breakpoints, check_duplicates)
+ (make_breakpoint_permanent, create_thread_event_breakpoint)
+ (disable_breakpoints_in_shlibs, re_enable_berakpoints_in_shlibs)
+ (set_longjmp_resume_breakpoint, mention, create_breakpoints)
+ (watch_command_1, print_one_exception_catchpoint)
+ (clear_command, breakpoint_re_set_one): Adjust member accesses to
+ use the breakpoint's ->loc.
+ (set_raw_breakpoint): Likewise. Initialize ->loc.
+ (delete_breakpoint): Likewise. Free ->loc.
+
+2003-11-05 Andrew Cagney <cagney@redhat.com>
+
+ * config/sparc/tm-sparc.h (FRAME_STRUCT_ARGS_ADDRESS): Delete
+ macro.
+ * config/m68k/tm-sun3.h (SIG_PC_FP_OFFSET): Delete macro.
+ * config/i386/tm-cygwin.h
+ (LINKER_SYMBOLS_HAVE_WIN32_STDCALL_ARG_SIZES): Delete macro.
+ * config/powerpc/tm-linux.h
+ (AT_SUBROUTINE_CALL_INSTRUCTION_TARGET): Delete macro.
+ (at_subroutine_call_instruction_target): Delete declaration.
+ * config/sparc/tm-sp64linux.h (GDB_PTRACE_REGS64): Delete macro.
+ * config/m68k/tm-sun3.h (SIG_SP_FP_OFFSET): Delete macro.
+ * config/ns32k/tm-ns32k.h (NUM_GENERAL_REGS): Delete macro.
+
+ * xcoffread.c (find_linenos): Replace "sec_ptr" and "bfd" with
+ "struct bfd_section" and "struct bfd".
+ * target.h (struct section_table): Ditto.
+ * rs6000-nat.c (xcoff_relocate_core): Ditto.
+ * solib-svr4.c (elf_locate_base): Ditto.
+ * pa64solib.c (dld_cache_t): Ditto.
+ * objfiles.h (struct obj_section): Ditto.
+ * objfiles.c (add_to_objfile_sections): Ditto.
+ * exec.c (bfdsec_to_vmap): Ditto.
+ (add_to_section_table): Ditto.
+ (build_section_table): Ditto.
+ * corelow.c (get_core_register_section): Ditto.
+ * coffread.c (find_linenos): Ditto.
+ * elfread.c (elf_interpreter): Delete #if0'd function.
+
+ * mips-tdep.c (mips_dump_tdep): Delete code prinint VX_NUM_REGS.
+ * config/sparc/tm-vxsparc.h (VX_NUM_REGS): Delete macro.
+ * config/mips/tm-vxmips.h (VX_NUM_REGS): Delete macro.
+ * config/m68k/tm-vx68.h (VX_NUM_REGS): Delete macro.
+
+ * arch-utils.h (generic_cannot_extract_struct_value_address):
+ Delete declaration.
+ * wince.c (_initialize_wince): Fix multi-line string.
+ * ia64-tdep.c (floatformat_valid): Convert to ISO C.
+
+2003-11-05 Elena Zannoni <ezannoni@redhat.com>
+
+ * top.c (execute_command): Fix broken logic for command execution
+ while inferior is running in async mode.
+
+2003-11-06 Mark Kettenis <kettenis@gnu.org>
+
+ * dwarf2-frame.c (execute_cfa_program): Mark register as
+ REG_SAVED_REG for DW_CFA_register opcode.
+
+2003-11-05 Mark Kettenis <kettenis@gnu.org>
+
+ * amd64fbsd-tdep.c (amd64fbsd_sc_reg_offset): Adjust offset of
+ %rsp, %rip and %eflags to match ABI-change.
+
+2003-11-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * ia64-tdep.c (struct gdbarch_tdep): Remove os_ident field.
+ (ia64_gdbarch_init): Don't bother calculating the os.
+ Instead use the gdbarch_info struct and look at the osabi field.
+ Also use gdbarch_list_lookup_by_info() to look for a
+ candidate gdbarch.
+
+2003-11-05 Kevin Buettner <kevinb@redhat.com>
+
+ * frv-tdep.c (frv_register_byte): Delete.
+ (frv_extract_return_value, frv_store_return_value)
+ (frv_extract_struct_value_address): Don't call frv_register_byte().
+ Convert to non-deprecated form.
+ (frv_gdbarch_init): Don't call set_gdbarch_deprecated_register_byte().
+ Convert calls to set_gdbarch_deprecated_extract_return_value(),
+ set_gdbarch_deprecated_store_return_value(), and
+ set_gdbarch_deprecated_extract_struct_value_address() into
+ non-deprecated forms.
+
+2003-11-05 Andrew Cagney <cagney@redhat.com>
+
+ * mips-tdep.c (mips_dump_tdep): Do not print
+ PRINT_EXTRA_FRAME_INFO.
+ * config/sparc/tm-sparc.h (DEPRECATED_PRINT_EXTRA_FRAME_INFO):
+ Rename PRINT_EXTRA_FRAME_INFO.
+ * mips-tdep.c (mips_print_extra_frame_info): Delete function.
+ * config/mips/tm-mips.h (PRINT_EXTRA_FRAME_INFO): Delete macro.
+ (mips_print_extra_frame_info): Delete declaration.
+ * stack.c (frame_info): Use DEPRECATED_PRINT_EXTRA_FRAME_INFO.
+
+2003-11-05 Elena Zannoni <ezannoni@redhat.com>
+
+ * coffread.c (coff_symtab_read): Remove passing of info parameter
+ to prim_record_minimal_symbol_and_info.
+
+2003-11-05 Elena Zannoni <ezannoni@redhat.com>
+
+ * coffread.c (process_coff_symbol): Delete CXUX_TARGET macro use.
+ (decode_base_type): Delete ifdeffed out code.
+
+2003-11-04 Andrew Cagney <cagney@redhat.com>
+
+ * symtab.c (find_active_alias): Delete function.
+ (lookup_block_symbol): Delete alias code.
+ * stabsread.c (resolve_live_range): Delete function.
+ (add_live_range): Delete function.
+ (resolve_symbol_reference): Delete function.
+ (define_symbol): Delete live range and alias code.
+ (scan_file_globals): Delete alias code.
+ * symtab.h (SYMBOL_RANGES): Delete macro.
+ (struct range_list): Delete structure.
+ (struct symbol): Delete field "ranges".
+ (SYMBOL_ALIASES): Delete macro.
+ (struct alias_list): Delete structure.
+ (struct symbol): Delete field "aliases".
+
+2003-11-04 Michael Snyder <msnyder@redhat.com>
+
+ * MAINTAINERS: Remove myself as owner of breakpoints and
+ of sparc/solaris.
+
+2003-11-03 Corinna Vinschen <vinschen@redhat.com>
+
+ * sh-tdep.c (sh_sh4_nofpu_register_name): New function.
+ (sh_sh4al_dsp_register_name): Ditto.
+ (sh4_nofpu_show_regs): Ditto.
+ (sh_gdbarch_init): Add cases for bfd_mach_sh4al_dsp, bfd_mach_sh4a,
+ bfd_mach_sh4_nofpu and bfd_mach_sh4a_nofpu.
+
+2003-11-03 Andrew Cagney <cagney@redhat.com>
+
+ * bcache.c: Include "gdb_assert.h".
+ (struct bcache): Add fields "expand_count" and
+ "expand_hash_count".
+ (expand_hash_table): Update the expand counts.
+ (print_bcache_statistics): Use XCALLOC, not alloca. Print stats
+ on object sizes and hashes.
+ * Makefile.in (bcache.o): Update dependencies.
+
+2003-11-03 Andrew Cagney <cagney@redhat.com>
+
+ * exec.c (xfer_memory): Eliminate xfer_fn.
+
+2003-10-31 Kevin Buettner <kevinb@redhat.com>
+
+ * frv-tdep.c (gdb_assert.h, sim-regno.h, gdb/sim-frv.h)
+ (opcodes/frv-desc.h): Include.
+ (iacc0h_regnum, iacc0l_regnum): Define.
+ (last_spr_regnum, frv_num_regs): Update.
+ (new_variant): Don't supply default names for holes in the SPRs.
+ Supply names for iacc0h_regnum and iacc0l_regnum.
+ (frv_register_type): Use symbolic constants first_fpr_regnum and
+ last_fpr_regnum instead of hardcoded constants 64 and 127. Use
+ builtin_type_int instead of builtin_type_int32.
+ (frv_register_sim_regno): New function.
+ (frv_gdbarch_init): Call set_gdbarch_register_sim_regno().
+ * Makefile.in (gdb_sim_frv_h): Define.
+ (frv-tdep.o): Update dependencies.
+
+2003-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * avr-tdep.c (avr_frame_this_id): Do not call
+ deprecated_inside_entry_file.
+ * m68hc11-tdep.c (m68hc11_frame_this_id): Ditto.
+ * m32r-tdep.c (m32r_frame_this_id): Ditto.
+ * d10v-tdep.c (d10v_frame_this_id): Ditto.
+ * arm-tdep.c (arm_prologue_this_id): Ditto.
+ * alpha-tdep.c (alpha_heuristic_frame_this_id): Ditto.
+
+2003-10-31 Jim Blandy <jimb@redhat.com>
+
+ * elfread.c (elf_symtab_read): Allocate correct number of tail
+ elements to sectinfo structure. (Fix from Woody LaRue.)
+
+2003-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * stack.c (return_command): Use get_frame_type, instead of
+ CALL_DUMMY_HAS_COMPLETED.
+ * inferior.h (CALL_DUMMY_HAS_COMPLETED): Delete definition.
+ * config/pa/tm-hppa.h (CALL_DUMMY_HAS_COMPLETED): Delete macro.
+
+2003-10-31 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-linux-tdep.c (x86_64_linux_sc_reg_offset): Don't
+ explicitly specify size of array.
+ (x86_64_linux_init_abi): Use ARRAY_SIZE to initialize
+ TDEP->sc_num_regs.
+
+2003-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * s390-tdep.c (s390_cannot_extract_struct_value_address): New
+ function.
+ (s390_gdbarch_init): Set extract_struct_value_address.
+ * arch-utils.c (generic_cannot_extract_struct_value_address):
+ Delete function.
+ * arch-utils.h (generic_cannot_extract_struct_value_address):
+ Delete definition.
+
+2003-10-31 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-nat.c (fetch_core_registers): Remove.
+ (linux_elf_core_fns): Remove.
+ (_initialize_i386_linux_nat): Remove.
+
+2003-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * solib-svr4.c: Update copyright. Include "bfd-target.h" and
+ "exec.h".
+ (exec_entry_point): New function.
+ (enable_break): Create a "tmp_bfd_target", use that and
+ entry_point_address when computing the relocation offset.
+ (svr4_relocate_main_executable): Ditto with exec_bfd and exec_ops.
+ * Makefile.in (solib-svr4.o): Update dependencies.
+
+2003-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * defs.h (XZALLOC): Define.
+ * target.h (struct target_ops): Add "to_data";
+ * bfd-target.h, bfd-target.c: New files.
+ * Makefile.in (SFILES): Add "bfd-target.c".
+ (COMMON_OBS): Add "bfd-target.o".
+ (bfd-target.o): Specify dependencies.
+ (bfd_target_h): Define.
+ * defs.h (XZALLOC): Define.
+
+2003-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): For 64-bit ABI, set
+ adjust_breakpoint_address.
+ * Makefile.in (ppc-sysv-tdep.o): Add $(target_h).
+ * ppc-tdep.h (ppc64_sysv_abi_adjust_breakpoint_address): Declare.
+ * ppc-sysv-tdep.c: Include "target.h". Update copyright.
+ (ppc64_sysv_abi_adjust_breakpoint_address): New function.
+
+2003-10-31 Andrew Cagney <cagney@redhat.com>
+
+ * target.h (struct target_ops): Replace "to_read_partial" and
+ "to_write_partial" with "to_xfer_partial". Update comments.
+ * target.c (debug_to_write_partial): Delete function.
+ (debug_to_xfer_partial): Replace debug_to_read_partial.
+ (add_target, update_current_target, setup_target_debug): Set
+ "to_xfer_partial" instead of "to_read_partial" and
+ "to_write_partial".
+ (default_xfer_partial): Replace "default_write_partial".
+ (default_read_partial): Delete.
+ (target_read_partial, target_write_partial): Call
+ "to_xfer_partial".
+ * remote.c (init_remote_ops): Set "to_xfer_partial".
+ (init_remote_async_ops): Ditto.
+ (remote_xfer_partial): Replace "remote_read_partial".
+
+2003-10-31 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.c (i386_supply_fpregset): Support floating-point
+ registers in `fxsave' format.
+ (i386_regset_from_core_section): Deal with ".reg-xfp" sections.
+
+2003-10-30 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-linux-tdep.c (i386_linux_gregset_reg_offset): New variable.
+ (i386_linux_init_abi): Initialize TDEP->gregset_reg_offset,
+ TDEP->gregset_num_regs and tdep->sizeof_gregset.
+
+ * i386-linux-tdep.c (i386_linux_sc_reg_offset): Don't explicitly
+ specify size of array.
+ (i386_linux_init_abi): Remove initialization of
+ TDEP->num_xmm_regs. Use I386_LINUX_NUM_REGS for number of
+ registers. Use ARRAY_SIZE to initialize TDEP->sc_num_regs.
+
+ * config/i386/fbsd64.mt (TDEPFILES): Add corelow.o.
+ * config/i386/fbsd64.mh (NATDEPFILES): Remove corelow.o and
+ core-regset.o.
+
+ * fbsd-proc.c (fbsd_make_corefile_notes): Put a "FreeBSD" label in
+ the ELF header.
+
+2003-10-29 Mark Kettenis <kettenis@gnu.org>
+
+ * config/i386/fbsd.mt (TDEPFILES): Add corelow.o.
+ * config/i386/fbsd.mh (NATDEPFILES): Remove corelow.o and
+ core-regset.o.
+
+ * fbsd-proc.c (fbsd_make_corefile_notes): Remove unecessary casts.
+
+ * corelow.c: Include "arch-utils.h", "regset.h" and
+ "gdb_assert.h".
+ (core_gdbarch): New variable.
+ (sniff_core_bfd): Don't sniff if we have support for register sets
+ in CORE_GDBARCH.
+ (core_close): Reset CORE_GDBARCH.
+ (core_open): Initialize CORE_GDBARCH.
+ (get_core_register_section): Use register sets if they are
+ supported by CORE_GDBARCH.
+ (get_core_registers): Don't print error message if we have support
+ for register sets in CORE_GDBARCH.
+
+2003-10-29 Andrew Cagney <cagney@redhat.com>
+
+ * ppc-linux-tdep.c (_initialize_ppc_linux_tdep): Instead of the
+ default PPC machine, register 32-bit and 64-bit PPC, and rs6k.
+
+2003-10-29 Mark Kettenis <kettenis@gnu.org>
+
+ * objfiles.h (clear_objfile_data): New prototype.
+ * objfiles.c (clear_objfile_data): New function.
+ * symfile.c (reread_symbols): Clear per-objfile data.
+
+2003-10-28 Jeff Johnston <jjohnstn@redhat.com>
+
+ * symfile.c (symbol_file_add_with_addrs_or_offsets): Switch to use
+ printf_unfiltered instead of printf_filtered for output messages.
+ (add_symbol_file_command): Ditto.
+ (reread_symbols): Ditto.
+ (overlay_auto_command): Ditto.
+ (overlay_manual_command): Ditto.
+ (overlay_off_command): Ditto.
+
+2003-10-27 Mark Kettenis <kettenis@gnu.org>
+
+ * arch-utils.c (deprecated_select_gdbarch_hack): New function.
+ (gdbarch_from_bfd): New function.
+ (set_gdbarch_from_file): Re-implement using gdbarch_from_bfd and
+ deprecated_select_gdbarch_hack.
+ * arch-utils.h (gdbarch_from_bfd): New prototype.
+
+2003-10-27 Andrew Cagney <cagney@redhat.com>
+
+ * osabi.c (gdbarch_init_osabi): Use info.bfd_arch_info instead of
+ arch_info. Use warning instead of fprintf_filtered. Do not use
+ deprecated bfd_printable_arch_mach.
+
+2003-10-26 Kevin Buettner <kevinb@redhat.com>
+
+ * frv-tdep.c (frv_register_raw_size, frv_register_virtual_size):
+ Delete.
+ (frv_register_type): Rename from frv_register_virtual_type. Add
+ ``struct gdbarch *'' parameter.
+ (frv_gdbarch_init): Delete calls to the following functions:
+ set_gdbarch_deprecated_size(),
+ set_gdbarch_deprecated_register_bytes(),
+ set_gdbarch_deprecated_register_raw_size(),
+ set_gdbarch_deprecated_max_register_raw_size(),
+ set_gdbarch_deprecated_register_virtual_size(),
+ set_gdbarch_deprecated_max_register_virtual_size(),
+ set_gdbarch_deprecated_register_virtual_size(),
+ set_gdbarch_deprecated_register_virtual_type().
+ Add call to function set_gdbarch_register_type().
+
+2003-10-26 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.h (FCS_REGNUM, FCOFF_REGNUM, FDS_REGNUM,
+ FDOFF_REGNUM): Remove defines.
+ * win32-nat.c (do_child_fetch_inferior_registers): Include
+ "i387-tdep.h".
+ (do_child_fetch_inferior_registers): Use I387_FISEG_REGNUM and
+ I387_FOP_REGNUM instead of FCS_REGNUM and FOP_REGNUM. Define and
+ undefine I387_ST0_REGNUM.
+
+ * i386-tdep.h (FPU_REG_RAW_SIZE): Remove define.
+ * x86-64-tdep.c (x86_64_store_return_value): Use
+ I386_MAX_REGISTER_SIZE instead of FPU_REG_RAW_SIZE.
+
+ Change register numbers to enumartion values.
+ * i386-tdep.h (enum i386_regnum): New.
+ (I386_EAX_REGNUM, I386_EDX_REGNUM, I386_ESP_REGNUM,
+ I386_EBP_REGNUM, I386_IP_REGNUM, I386_EFLAGS_REGNUM,
+ I386_ST0_REGNUM): Remove defines.
+ * i386-tdep.c (I386_EBX_REGNUM, I386_ECX_REGNUM, I386_ESI_REGNUM,
+ I386_EDI_REGNUM): Remove defines.
+
+2003-10-24 Andrew Cagney <cagney@redhat.com>
+
+ * target.c: Include "gdbcore.h".
+ (get_target_memory, get_target_memory_unsigned): New functions.
+ * target.h (get_target_memory, get_target_memory_unsigned): Declare.
+ * ppc-linux-tdep.c (ppc64_linux_convert_from_func_ptr_addr):
+ Use get_target_memory_unsigned.
+ * Makefile.in (target.o): Update dependencies.
+
+2003-10-24 Andrew Cagney <cagney@redhat.com>
+
+ * osabi.c (gdbarch_init_osabi): Fix typos, and "fortunatly"[sic].
+ * PROBLEMS, arch-utils.c, cli-out.c, command.h: Ditto.
+ * complaints.c, cris-tdep.c, disasm.c, dwarf2-frame.c: Ditto.
+ * frame.c, frame.h, infcall.c, infcmd.c, infrun.c: Ditto.
+ * kod.c, mips-tdep.c, regcache.c, regcache.h, remote.c: Ditto.
+
+ * osabi.c (gdbarch_init_osabi): Add comment on 32-bit vs 64-bit.
+ (can_run_code_for): Use the OO term "singleton".
+
+2003-10-23 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (stack.o): Add $(regcache_h).
+ * stack.c: Include "regcache.h"
+ (return_command): Rewrite. Use get_frame_id and
+ get_selected_frame. Eliminate "deprecated_selected_frame". Warn
+ about unhandled return-values.
+ * value.h (set_return_value): Delete declaration.
+ * values.c (set_return_value): Delete function.
+
+2003-10-23 Jeff Johnston <jjohnstn@redhat.com>
+
+ * ia64-tdep.c: (ia64_frame_cache): Add new prev_cfm field.
+ (pseudo_regs): Add comment regarding register stack registers.
+ (ia64_alloc_frame_cache): Initialize new prev_cfm field to 0.
+ (floatformat_valid): New static routine.
+ (floatformat_ia64_ext): Add name field and set up is_valid routine
+ to floatformat_valid().
+ (examine_prologue): For the previous cfm, use
+ frame_unwind_register()
+ if the cfm is not stored in a register-stack register. Save the
+ previous cfm value in the prev_cfm field. Add debug output.
+ (ia64_frame_this_id): Use frame_id_build_special() to also register
+ the bsp. Add debug output.
+ (ia64_sigtramp_frame_this_id): Ditto.
+ (ia64_frame_prev_register): Look at cache saved_regs for a few more
+ registers and also add some checks for framelessness before accepting
+ current register values for fields such as return address. For cfm,
+ use the cached prev_cfm field if available. Add comment to explain
+ PSR logic. Add debug output.
+ (ia64_sigtramp_frame_init_saved_regs): Save the bsp and sp addresses
+ as part of initialization.
+ (ia64_sigtramp_frame_cache): Hard-code stack size as it can't be
+ calculated. Cache the bsp and cfm values.
+ (ia64_sigtramp_frame_prev_register): Add logic to this routine out
+ instead of using ia64_frame_prev_register() which doesn't expect most
+ registers to be saved. The saved values for bsp and sp
+ can be taken from the cache. Add debug output.
+ (ia64_push_dummy_call): Use frame_id_build_special() to also register
+ the bsp.
+
+2003-10-23 Jim Blandy <jimb@redhat.com>
+
+ * osabi.c (gdbarch_init_osabi): A handler is okay if it's for an
+ architecture the current arch can run code for --- but not if it's
+ a superset.
+ (can_run_code_for): New function.
+
+2003-10-22 James E Wilson <wilson@specifixinc.com>
+
+ * MAINTAINERS: Move myself from paper trail section back to write
+ after approval section.
+
+2003-10-22 Andrew Cagney <cagney@redhat.com>
+
+ * exec.h: New file.
+ * win32-nat.c: Include "exec.h".
+ * solib.c: Include "exec.h".
+ * target.h (build_section_table): Delete declaration.
+ * somsolib.c: Include "exec.h".
+ (exec_ops): Delete extern declaration.
+ * rs6000-nat.c: Update copyright. Include "exec.h".
+ (exec_ops): Delete extern declaration.
+ * pa64solib.c: Update copyright. Include "exec.h".
+ (exec_ops): Delete extern declaration.
+ * exec.c: Update copyright. Include "exec.h".
+ * corelow.c: Update dependencies. Include "exec.h".
+ * Makefile.in (exec_h): Define.
+ (exec.o, somsolib.o): Update dependencies.
+ (pa64solib.o, corelow.o): Update dependencies.
+
+2003-10-22 Andrew Cagney <cagney@redhat.com>
+
+ * target.c: Include "gdb_assert.h" (target_read): Call
+ "target_read_partial", not "target_write_partial".
+ (default_read_partial, default_write_partial): New function.
+ (target_read_partial, target_write_partial): Simplify, assume that
+ there is always a read/write method.
+ (update_current_target, add_target): Always set "to_read_partial"
+ and "to_write_partial".
+ (target_write, target_read): Fail on a zero byte transfer.
+ * Makefile.in (target.o): Update dependencies.
+ * target.h: Update copyright date.
+ (target_object): Fix typo.
+
+2003-10-22 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (convert_from_func_ptr_addr): Convert to a pure
+ multi-arch method, add "targ" parameter.
+ (struct target_ops): Declare.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * Makefile.in (c-valprint.o): Update dependencies.
+ * arch-utils.h: Update copyright.
+ (convert_from_func_ptr_addr_identity): Declare.
+ * arch-utils.c (convert_from_func_ptr_addr_identity): New function.
+ * ia64-tdep.c (ia64_convert_from_func_ptr_addr): Update.
+ * rs6000-tdep.c (rs6000_convert_from_func_ptr_addr): Upate.
+ * ppc-linux-tdep.c (ppc64_linux_convert_from_func_ptr_addr): Update.
+ * infcall.c (find_function_addr, call_function_by_hand): Update.
+ * c-valprint.c: Include "target.h".
+ (print_function_pointer_address): Update.
+
+2003-10-22 Andrew Cagney <cagney@redhat.com>
+
+ * target.c (target_close): New function.
+ (debug_to_close): Use "target_close".
+ (push_target): Use "target_close".
+ (unpush_target): Use "target_close".
+ (pop_target): Use "target_close".
+ * target.h (struct target_ops): Add "to_xclose".
+ (target_open): Delete macro. Move comment to "to_open".
+ (target_close): Replace macro with function that takes a target.
+ * top.c (quit_target): Pass "current_target" to "target_close".
+
+2003-10-21 Elena Zannoni <ezannoni@redhat.com>
+
+ * minsyms.c (lookup_minimal_symbol_text): Remove unused parameter.
+ Remove SOFUN_ADDRESS_MAYBE_MISSING ifdeffed code.
+ * symtab.h (lookup_minimal_symbol_text): Update.
+ * breakpoint.c (create_overlay_event_breakpoint,
+ create_longjmp_breakpoint): Update callers.
+ * ppc-linux-tdep.c (ppc_linux_skip_trampoline_code): Update caller.
+ * symtab.c (find_pc_sect_line): Ditto.
+
+2003-10-21 Andrew Cagney <cagney@redhat.com>
+
+ * target.c (errno): Delete extern declaration.
+
+2003-10-20 Jeff Johnston <jjohnstn@redhat.com>
+
+ * ia64-tdep.c: Change all occurrences of
+ DEPRECATED_REGISTER_RAW_SIZE to use register_size() instead.
+ (ia64_frame_prev_register): Minor whitespace change.
+
+2003-10-20 Michael Chastain <mec@shout.net>
+
+ * config/djgpp/fnchange.lst: Add lines for:
+ sim/testsuite/sim/frv/interrupts/Ipipe-fr400.cgs,
+ sim/testsuite/sim/frv/interrupts/Ipipe-fr500.cgs,
+ sim/testsuite/sim/frv/interrupts/badalign-fr550.cgs,
+ sim/testsuite/sim/frv/interrupts/compound-fr550.cgs,
+ sim/testsuite/sim/frv/interrupts/data_store_error-fr550.cgs,
+ sim/testsuite/sim/frv/interrupts/fp_exception-fr550.cgs,
+ sim/testsuite/sim/frv/interrupts/insn_access_error-fr550.cgs.
+
+2003-10-20 Andrew Cagney <cagney@redhat.com>
+
+ * values.c (register_value_being_returned): Update comments. Use
+ "gdbarch_return_value" when available.
+ (using_struct_return): Ditto.
+ (set_return_value): Ditto. Use "gdbarch_return_value" when
+ available.. Print a warning, and not an error, when an unhandled
+ return type is encountered.
+ * infcmd.c: Include "gdb_assert.h".
+ (print_return_value): When gdbarch_return_value_p, and using
+ struct return, assume that the value is not available.
+ * defs.h (return_value_convention): Define.
+ * gdbarch.sh (gdbarch_return_value): New predicate method.
+ * gdbarch.h, gdbarch.c: Re-generate
+ * ppc-sysv-tdep.c (return_value_convention): Delete definition.
+
+2003-10-20 Andrew Cagney <cagney@redhat.com>
+
+ * symtab.c: Replace "struct sec" with "struct bfd_section".
+ * objfiles.c, linespec.c, blockframe.c, block.c: Ditto.
+
+2003-10-19 Michael Chastain <mec@shout.net>
+
+ * config/djgpp/fnchange.lst: Add lines for:
+ gdb/amd64nbsd-nat.c, gdb/amd64nbsd-tdep.c,
+ gdb/i386fbsd-nat.c, gdb/i386fbsd-tdep.c,
+ gdb/sparc64fbsd-nat.c, gdb/sparc64bsd-tdep.c.
+
+2003-10-19 Mark Kettenis <kettenis@gnu.org>
+
+ * amd64fbsd-nat.c (fetch_inferior_registers,
+ store_inferior_registers): Remove functions.
+ * config/i386/fbsd64.mh (NATDEPFILES): Add amd64bsd-nat.o.
+
+2003-10-18 Mark Kettenis <kettenis@gnu.org>
+
+ Add NetBSD/amd64 native configuration:
+ * x86-64-tdep.h (amd64nbsd_r_reg_offset): Add extern declarations.
+ * amd64nbsd-tdep.c: New file.
+ * amd64nbsd-nat.c: New file.
+ * amd64bsd-nat.c: New file.
+ * config/i386/nbsd64.mh: New file.
+ * config/i386/nbsd64.mt: New file.
+ * configure.host: Add x86_64-*-netbsd*.
+ * configure.tgt: Add x86_64-*-netbsd*.
+ * Makefile.in (amd64bsd-nat.o, amd64nbsd-nat.o, amd64nbsd-tdep.o):
+ New targets.
+ * NEWS (New native configurations): Mention NetBSD/amd64.
+
+2003-10-17 Michael Chastain <mec@shout.net>
+
+ * config/djgpp/fnchange.lst: Remove dead lines for:
+ bfd/elf32-i386qnx.c, bfd/elf32-ppcqnx.c, bfd/elf32-shqnx.c,
+ bfd/elf32-sh-lin.c, bfd/elf32-sh-nbsd.c, bfd/elf32-sh64-nbsd.c,
+ bfd/elf64-alpha-fbsd.c, bfd/elf64-sh64-nbsd.c,
+ gdb/alphanbsd-nat.c, gdb/config/i386/tm-i386mk.h,
+ gdb/config/i386/tm-i386v42mp.h, gdb/config/i386/xm-i386mach.h,
+ gdb/config/i386/xm-i386mk.h, gdb/config/i386/xm-i386v32.h,
+ gdb/config/m68k/apollo68v.mh, gdb/config/m68k/nm-apollo68v.h,
+ gdb/config/m68k/xm-apollo68v.h, gdb/config/m88k/tm-delta88v4.h,
+ gdb/config/mips/tm-bigmips64.h, gdb/config/mips/tm-embed64.h,
+ gdb/config/mips/tm-embedl.h, gdb/config/mips/tm-embedl64.h,
+ gdb/config/mips/tm-vr4300el.h, gdb/config/mips/tm-vr4xxxel.h,
+ gdb/config/mips/tm-vr5000el.h, gdb/config/sparc/tm-sparclet.h,
+ gdb/config/sparc/tm-sparclite.h,
+ gdb/gdbtk/generic/ChangeLog-2001,
+ gdb/gdbtk/library/ChangeLog-2001, gdb/remote-adapt.c,
+ gdb/remote-eb.c, gdb/remote-mm.c, gdb/remote-nrom.c,
+ gdb/remote-udi.c, gdb/remote-vx29k.c, gdb/remote-vx960.c,
+ gdb/sparclet-rom.c, gdb/sparclet-stub.c,
+ gdb/testsuite/gdb.mi/mi0-var-block.exp,
+ gdb/testsuite/gdb.mi/mi0-var-child.exp,
+ gdb/testsuite/gdb.mi/mi0-var-cmd.exp,
+ gdb/testsuite/gdb.mi/mi0-var-display.exp,
+ itcl/iwidgets3.0.0/demos/extfileselectionbox,
+ itcl/iwidgets3.0.0/demos/extfileselectiondialog,
+ itcl/iwidgets3.0.0/demos/fileselectionbox,
+ itcl/iwidgets3.0.0/demos/fileselectiondialog,
+ itcl/iwidgets3.0.0/demos/html/buttonbox.n.html,
+ itcl/iwidgets3.0.0/demos/html/canvasprintbox.n.html,
+ itcl/iwidgets3.0.0/demos/html/canvasprintdialog.n.html,
+ itcl/iwidgets3.0.0/demos/html/combobox.n.html,
+ itcl/iwidgets3.0.0/demos/html/dialog.n.html,
+ itcl/iwidgets3.0.0/demos/html/dialogshell.n.html,
+ itcl/iwidgets3.0.0/demos/html/entryfield.n.html,
+ itcl/iwidgets3.0.0/demos/html/feedback.n.html,
+ itcl/iwidgets3.0.0/demos/html/fileselectionbox.n.html,
+ itcl/iwidgets3.0.0/demos/html/fileselectiondialog.n.html,
+ itcl/iwidgets3.0.0/demos/html/hyperhelp.n.html,
+ itcl/iwidgets3.0.0/demos/html/iwidgets2.2.0UserCmds.html,
+ itcl/iwidgets3.0.0/demos/html/labeledwidget.n.html,
+ itcl/iwidgets3.0.0/demos/html/menubar.n.html,
+ itcl/iwidgets3.0.0/demos/html/messagedialog.n.html,
+ itcl/iwidgets3.0.0/demos/html/notebook.n.html,
+ itcl/iwidgets3.0.0/demos/html/optionmenu.n.html,
+ itcl/iwidgets3.0.0/demos/html/panedwindow.n.html,
+ itcl/iwidgets3.0.0/demos/html/promptdialog.n.html,
+ itcl/iwidgets3.0.0/demos/html/pushbutton.n.html,
+ itcl/iwidgets3.0.0/demos/html/radiobox.n.html,
+ itcl/iwidgets3.0.0/demos/html/scrolledcanvas.n.html,
+ itcl/iwidgets3.0.0/demos/html/scrolledframe.n.html,
+ itcl/iwidgets3.0.0/demos/html/scrolledhtml.n.html,
+ itcl/iwidgets3.0.0/demos/html/scrolledlistbox.n.html,
+ itcl/iwidgets3.0.0/demos/html/scrolledtext.n.html,
+ itcl/iwidgets3.0.0/demos/html/selectionbox.n.html,
+ itcl/iwidgets3.0.0/demos/html/selectiondialog.n.html,
+ itcl/iwidgets3.0.0/demos/html/shell.n.html,
+ itcl/iwidgets3.0.0/demos/html/spindate.n.html,
+ itcl/iwidgets3.0.0/demos/html/spinint.n.html,
+ itcl/iwidgets3.0.0/demos/html/spinner.n.html,
+ itcl/iwidgets3.0.0/demos/html/spintime.n.html,
+ itcl/iwidgets3.0.0/demos/html/tabnotebook.n.html,
+ itcl/iwidgets3.0.0/demos/html/tabset.n.html,
+ itcl/iwidgets3.0.0/demos/html/toolbar.n.html,
+ itcl/iwidgets3.0.0/demos/scrolledcanvas,
+ itcl/iwidgets3.0.0/demos/scrolledframe,
+ itcl/iwidgets3.0.0/demos/scrolledhtml,
+ itcl/iwidgets3.0.0/demos/scrolledlistbox,
+ itcl/iwidgets3.0.0/demos/scrolledtext,
+ itcl/iwidgets3.0.0/demos/selectionbox,
+ itcl/iwidgets3.0.0/demos/selectiondialog,
+ itcl/iwidgets3.0.0/doc/canvasprintbox.n,
+ itcl/iwidgets3.0.0/doc/canvasprintdialog.n,
+ itcl/iwidgets3.0.0/doc/extfileselectionbox.n,
+ itcl/iwidgets3.0.0/doc/extfileselectiondialog.n,
+ itcl/iwidgets3.0.0/doc/fileselectionbox.n,
+ itcl/iwidgets3.0.0/doc/fileselectiondialog.n,
+ itcl/iwidgets3.0.0/doc/scopedobject.n.backup,
+ itcl/iwidgets3.0.0/doc/scrolledcanvas.n,
+ itcl/iwidgets3.0.0/doc/scrolledframe.n,
+ itcl/iwidgets3.0.0/doc/scrolledhtml.n,
+ itcl/iwidgets3.0.0/doc/scrolledlistbox.n,
+ itcl/iwidgets3.0.0/doc/scrolledtext.n,
+ itcl/iwidgets3.0.0/doc/selectionbox.n,
+ itcl/iwidgets3.0.0/doc/selectiondialog.n,
+ itcl/iwidgets3.0.0/generic/canvasprintbox.itk,
+ itcl/iwidgets3.0.0/generic/canvasprintdialog.itk,
+ itcl/iwidgets3.0.0/generic/extfileselectionbox.itk,
+ itcl/iwidgets3.0.0/generic/extfileselectiondialog.itk,
+ itcl/iwidgets3.0.0/generic/fileselectionbox.itk,
+ itcl/iwidgets3.0.0/generic/fileselectiondialog.itk,
+ itcl/iwidgets3.0.0/generic/scrolledcanvas.itk,
+ itcl/iwidgets3.0.0/generic/scrolledframe.itk,
+ itcl/iwidgets3.0.0/generic/scrolledhtml.itk,
+ itcl/iwidgets3.0.0/generic/scrolledlistbox.itk,
+ itcl/iwidgets3.0.0/generic/scrolledtext.itk,
+ itcl/iwidgets3.0.0/generic/scrolledwidget.itk,
+ itcl/iwidgets3.0.0/generic/selectionbox.itk,
+ itcl/iwidgets3.0.0/generic/selectiondialog.itk,
+ itcl/iwidgets3.0.0/tests/canvasprintbox.test,
+ itcl/iwidgets3.0.0/tests/canvasprintdialog.test,
+ itcl/iwidgets3.0.0/tests/extfileselectionbox.test,
+ itcl/iwidgets3.0.0/tests/extfileselectiondialog.test,
+ itcl/iwidgets3.0.0/tests/fileselectionbox.test,
+ itcl/iwidgets3.0.0/tests/fileselectiondialog.test,
+ itcl/iwidgets3.0.0/tests/scrolledcanvas.test,
+ itcl/iwidgets3.0.0/tests/scrolledframe.test,
+ itcl/iwidgets3.0.0/tests/scrolledhtml.test,
+ itcl/iwidgets3.0.0/tests/scrolledlistbox.test,
+ itcl/iwidgets3.0.0/tests/scrolledtext.test,
+ itcl/iwidgets3.0.0/tests/selectionbox.test,
+ itcl/iwidgets3.0.0/tests/selectiondialog.test,
+ itcl/iwidgets3.0.0/unix/iwidgets.tcl.in,
+ itcl/iwidgets3.0.0/unix/pkgIndex.tcl.in,
+ tix/docs/Release-4.1.0.html, tix/docs/Release-4.1.0.txt,
+ tix/docs/Release-4.1a2.html, tix/docs/Release-4.1a2.txt,
+ tix/docs/Release-4.1a3.html, tix/docs/Release-4.1a3.txt,
+ tix/docs/Release-4.1b1.html, tix/docs/Release-4.1b1.txt,
+ tix/docs/Release-4.1b2.html, tix/docs/Release-4.1b2.txt,
+ tix/tixConfig.sh.in, tix/unix/tk4.2/pkgIndex.tcl.in,
+ tix/unix/tk8.0/pkgIndex.tcl.in, tix/unix/tk8.0/pkgIndex.tcl.in,
+ tix/unix/tk8.1/pkgIndex.tcl.in, tix/win/tkConsole41.c,
+ tix/win/tkConsole42.c, tix/win/tkConsole80a1.c,
+ tix/win/tkConsole80b1.c, tix/win/tkConsole81.c, tk/doc/tk4.0.ps,
+ tk/mac/tkMacProjects.sit.hqx.
+
+2003-10-17 Andrew Cagney <cagney@redhat.com>
+
+ * target.c (target_section_by_addr): New function.
+ (do_xfer_memory): Use "target_section_by_addr".
+ * target.h (target_section_by_addr): Declare.
+
+ * target.h (struct target_ops): Add "to_read_partial" and
+ "to_write_partial", delete "to_query".
+ (target_read_partial, target_write_partial): Declare.
+ (target_read, target_write): Declare.
+ (target_query): Delete macro.
+ * target.c (target_read_partial): New function.
+ (target_write_partial, target_read, target_write): New function.
+ (update_current_target): Delete inheritance of "to_query". Add
+ comments about "to_read_partial" and "to_write_partial".
+ (debug_to_partial_read, debug_to_partial_write): New functions.
+ (debug_to_query): Delete function.
+ (setup_target_debug): Set "to_read_partial" and "to_write_partial"
+ instead of "to_query".
+ * remote.c (remote_read_partial): Replace "remote_query".
+ (init_remote_ops): Set "to_read_partial" instead of "to_query".
+ (init_remote_async_ops): Ditto.
+ * kod.c (gdb_kod_query): Make "bufsize" a LONGEST. Use
+ "target_read_partial" instead of "target_query".
+ * avr-tdep.c (avr_io_reg_read_command): Make "bufsize" a LONGEST.
+ Use "target_read_partial" instead of "target_query".
+
+2003-10-17 Jeff Johnston <jjohnstn@redhat.com>
+
+ * frame.h (struct frame_id): Add new field: special_addr.
+ (frame_id_build_special): New prototype.
+ * frame.c (frame_id_build_special): New function.
+ (frame_id_build): Change to call frame_id_build_special().
+ (frame_id_eq): Change to also test special_addr field.
+ (frame_id_inner): Update comment.
+
+2003-10-17 Andrew Cagney <cagney@redhat.com>
+
+ * target.c (update_current_target): Perform the target cleanup.
+ Put the target stack beneath the squashed "current_target".
+ (add_target): Delete disabled call to "cleanup_target".
+ (cleanup_target): Delete function.
+ (push_target, unpush_target): Do not call "cleanup_target".
+
+2003-10-17 Andrew Cagney <cagney@redhat.com>
+
+ * target.c (target_stack): Change to a static target_ops.
+ (update_current_target): Walk the "struct target_ops" stack.
+ (pop_target, do_xfer_memory, target_info): Ditto.
+ (find_target_beneath): Ditto.
+ (push_target): Rewrite to use the "struct target_ops" stack.
+ (unpush_target): Ditto.
+ * target.h (struct target_stack_item): Delete definition.
+ (target_stack): Delete declaration.
+ (struct target_ops): Add field "beneath".
+
+2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
+
+ * gdb/config/h8300/tm-h8300.h (h8300_normal_mode): Add external
+ declaration.
+ * gdb/h8300-tdep.c (BINWORD): Update BINWORD for h8300_normal_mode
+ (h8300_examine_prologue): Use h8300_normal_mode flag
+ (h8300_gdbarch_init): Set architecture info for normal mode
+
+2003-10-16 Daniel Jacobowitz <drow@mvista.com>
+
+ * remote.c (remote_protocol_vcont): New variable.
+ (set_remote_protocol_vcont_packet_cmd): New function.
+ (show_remote_protocol_vcont_packet_cmd): New function.
+ (init_all_packet_configs): Handle remote_protocol_vcont.
+ (remote_vcont_probe): New function.
+ (remote_vcont_resume): New function.
+ (remote_resume): Use it.
+ (remote_async_resume): Call remote_resume.
+ (_initialize_remote): Add verbose-resume packet commands.
+
+2003-10-16 Andrew Cagney <cagney@redhat.com>
+
+ * infrun.c (handle_inferior_event): Add comment about
+ "frame_id_inner" being too weak.
+
+2003-10-16 Elena Zannoni <ezannoni@redhat.com>
+
+ * minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
+ second parameter, which is always null. Remove
+ SOFUN_ADDRESS_MAYBE_MISSING ifdeffed code.
+ * symtab.h (lookup_minimal_symbol_solib_trampoline): Update
+ accordingly.
+ * somsolib.c (som_solib_create_inferior_hook,
+ som_solib_desire_dynamic_linker_symbols): Update callers.
+ * hppa-tdep.c (hppa_fix_call_dummy): Ditto.
+
+2003-10-16 Kei Sakamoto <sakamoto.kei@renesas.com>
+
+ * remote-m32r-sdi.c : New file, interface to m32r on-chip
+ debug interface, SDI (Scalable Debug Interface).
+ * NEWS: Mention m32r SDI protocol was supported.
+ * Makefile.in (remote-m32r-sdi.o): Add build rule.
+ * config/m32r/m32r.mt (TDEPFILES) : Add remote-m32r-sdi.o.
+
+2003-10-15 Jeff Johnston <jjohnstn@redhat.com>
+
+ * ia64-linux-tdep.c: Include gdbcore.h.
+ (IA64_LINUX_SIGCONTEXT_OFFSET): Magic constant removed.
+ (ia64_linux_sigcontext_register_addr): Find the address of the
+ sigcontext area stored in the sigframe instead of using
+ a magic offset constant.
+
+2003-10-15 Andrew Cagney <cagney@redhat.com>
+
+ * remote.c (remote_search): Delete function.
+ * target.h (target_search): Delete disabled macro.
+ (struct target_ops): Delete disabled field "to_search".
+
+2003-10-14 Kevin Buettner <kevinb@redhat.com>
+
+ * frv-tdep.c (frv_frame_this_id): Call inside_entry_func()
+ instead of deprecated_inside_entry_file().
+
+2003-10-14 Corinna Vinschen <vinschen@redhat.com>
+
+ * sh-tdep.c: Fix copy/paste hangover in comment.
+ (sh_push_dummy_call_fpu): Accomodate double passing in little endian
+ mode.
+ (sh3e_sh4_extract_return_value): Ditto.
+
+2003-10-13 Richard Henderson <rth@redhat.com>
+
+ * f-typeprint.c (f_type_print_base): Handle TYPE_CODE_REF.
+ * f-valprint.c (f_val_print): Likewise. Tweak TYPE_CODE_PTR to
+ match c_val_print a bit closer.
+
+2003-10-13 Kevin Buettner <kevinb@redhat.com>
+
+ * frv-tdep.c (max_instrs_per_bundle, frv_instr_size): New constants.
+ (frv_gdbarch_adjust_breakpoint_address): New function.
+ (frv_gdbarch_init): Initialize ``gdbarch_adjust_breakpoint_address''
+ method.
+
+2003-10-13 Kevin Buettner <kevinb@redhat.com>
+
+ * breakpoint.h (struct breakpoint): Add new member
+ ``requested_address''.
+ * breakpoint.c (breakpoint_adjustment_warning)
+ (adjust_breakpoint_address): New static functions.
+ (print_it_typical): Issue warning if breakpoint's address is different
+ from its requested address.
+ (set_raw_breakpoint, set_longjmp_resume_breakpoint, watch_command_1)
+ (breakpoint_re_set_one): Set breakpoint's
+ ``requested_address'' field. Set ``address'' field to the
+ result of calling adjust_breakpoint_address() on the requested
+ address.
+
+2003-10-13 Kevin Buettner <kevinb@redhat.com>
+
+ * gdbarch.sh (ADJUST_BREAKPOINT_ADDRESS): New method.
+ * gdbarch.h, gdbarch.c: Regenerate.
+
+2003-10-11 Mark Kettenis <kettenis@gnu.org>
+
+ * i386bsd-tdep.c (i386bsd_init_abi): Use ARRAY_SIZE to initialize
+ TDEP->sc_num_regs.
+
+ * i386fbsd-tdep.c: New file.
+ (i386fbsd_sigtramp_start, i386fbsd_sigtramp_end,
+ i386fbsd_sc_reg_offset, i386fbsdaout_init_abi, i386fbsd_init_abi,
+ i386fbsd4_sc_reg_offset, i386fbsd4_init_abi): Move here from
+ i386bsd-tdep.c.
+ (_initialize_i386fbsd_tdep): New function.
+ (i386fbsd_r_reg_offset, i386fbsd4_r_reg_offset): New varibles.
+ (i386fbsdaout_init_abi): Initialize TDEP->gregset_reg_offset,
+ TDEP->gregset_num_regs, TDEP->sizeof_gregset and
+ TDEP->sizeof_fpregset. Use ARRAY_SIZE to initialize
+ TDEP->sc_num_regs.
+ (i386fbsd4_init_abi): Initialize TDEP->gregset_reg_offset,
+ TDEP->gregset_num_regs and TDEP->sizeof_gregset. Use ARRAY_SIZE
+ to initialize TDEP->sc_num_regs.
+ * i386bsd-tdep.c (i386fbsd_sigtramp_start, i386fbsd_sigtramp_end,
+ i386fbsd_sc_reg_offset, i386fbsdaout_init_abi, i386fbsd_init_abi,
+ i386fbsd4_sc_reg_offset, i386fbsd4_init_abi): Remove.
+ (_initialize_i386bsd_tdep): Don't register FreeBSD a.out and
+ FreeBSD ELF OS/ABI's here.
+ * Makefile.in (ALLDEPFILES): Add i386fbsd-tdep.c.
+ (i386fbsd-tdep.o): New target.
+ * config/i386/fbsd.mt (TDEPFILES): Add i386fbsd-tdep.o.
+ * config/i386/fbsd64.mt (TDEPFILES): Add i386fbsd-tdep.o.
+
+ * amd64fbsd-tdep.c (amd64fbsd_r_reg_offset): New variable.
+ (amd64fbsd_init_abi): Set TDEP->gregset_reg_offset,
+ TDEP->gregset_num_regs and TDEP->sizeof_gregset. Use ARRAY_SIZE
+ in initialization of TDEP->sc_num_regs.
+
+ * x86-64-tdep.c (x86_64_regset_from_core_section): New function.
+ (x86_64_init_abi): Initialize regset_from_core_section if
+ appropriate.
+
+ * i386-tdep.c (i386_regset_from_core_section): New function.
+ (i386_gdbarch_init): Initialize regset_from_core_section if
+ appropriate.
+ * i386-tdep.h (i386_regset_from_core_section): New declaration.
+
+ * i386-tdep.h (struct regset): Declare opaque.
+
+ * gdbarch.sh (regset_from_core_section): New method.
+ (struct regset): Declare opaque.
+ * gdbarch.c, gdbarch.h: Regenerated.
+
+2003-10-11 Alan Modra <amodra@bigpond.net.au>
+
+ * hppa-tdep.c (hppa_in_solib_call_trampoline): Don't refer directly to
+ _cooked_size and vma; Use bfd_section_size and bfd_get_section_vma.
+ Correct test for pc within section.
+
+2003-10-11 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbarch.sh: Remove trailing whitepsace from comments.
+
+2003-10-08 Roland McGrath <roland@redhat.com>
+
+ * gcore.c (make_mem_sec): Function removed, folded into ...
+ (gcore_create_callback): ... here. To omit a section, clear its
+ SEC_LOAD bit rather than zeroing its size.
+ Omit read-only sections only if they correspond to a known disk file.
+ (gcore_copy_callback): Ignore sections without SEC_LOAD flag set.
+
+2003-10-10 Michael Snyder <msnyder@redhat.com>
+
+ * d10v-tdep.c: Fix typo in comment.
+
+2003-10-10 Andrew Cagney <cagney@redhat.com>
+
+ * rs6000-tdep.c (e500_store_return_value): Delete function.
+ (e500_extract_return_value): Delete function.
+ (rs6000_gdbarch_init): When SYSV, set "extract_return_value" and
+ "restore_return_value" to "ppc_sysv_abi_extract_return_value" and
+ "ppc_sysv_abi_restore_return_value" where applicable.
+ * ppc-tdep.h: (ppc_sysv_abi_store_return_value): Declare.
+ (ppc_sysv_abi_extract_return_value): Declare.
+ (ppc_sysv_abi_broken_store_return_value): Declare.
+ (ppc_sysv_abi_broken_extract_return_value): Declare.
+ (ppc_sysv_abi_broken_use_struct_convention:) Delete declaration.
+ * ppc-sysv-tdep.c (return_value_convention): Move definition to
+ start of file.
+ (do_ppc_sysv_return_value): New function.
+ (ppc_sysv_abi_extract_return_value): New function.
+ (ppc_sysv_abi_store_return_value): New function.
+ (ppc_sysv_abi_broken_extract_return_value): New function.
+ (ppc_sysv_abi_broken_store_return_value): New function.
+ (ppc_sysv_abi_use_struct_convention): Call
+ do_ppc_sysv_return_value.
+
+2003-10-10 J. Brobecker <brobecker@gnat.com>
+
+ * blockframe.c (inside_main_func): No longer use symbol_lookup()
+ to lookup the main function symbol.
+
+2003-10-10 Corinna Vinschen <vinschen@redhat.com>
+
+ * sh-tdep.c (sh_treat_as_flt_p): New function to recognize float
+ types correctly.
+ (sh_push_dummy_call_fpu): Fix argument passing rules.
+ (sh3e_sh4_extract_return_value): Call sh_treat_as_flt_p to recognize
+ float types.
+ (sh3e_sh4_store_return_value): Ditto.
+
+2003-10-10 Elena Zannoni <ezannoni@redhat.com>
+
+ * sh-tdep.c (sh_use_struct_convention): Clarify one case in
+ comment.
+
+2003-10-10 Corinna Vinschen <vinschen@redhat.com>
+
+ * sh-tdep.c (sh_use_struct_convention): Clean up to have a
+ more readable code. Accomodate passing of bitfields.
+
+2003-10-10 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (ppc-sysv-tdep.o): Add $(gdb_assert_h).
+ * rs6000-tdep.c (rs6000_gdbarch_init): When 64 bit SysV ABI, set
+ push_dummy_call to ppc64_sysv_abi_push_dummy_call.
+ * ppc-sysv-tdep.c: Include "gdb_assert.h".
+ (ppc64_sysv_abi_push_dummy_call): New function.
+ (ppc64_sysv_abi_broken_push_dummy_call): New function.
+ * ppc-tdep.h (ppc64_sysv_abi_push_dummy_call): Declare.
+ (ppc64_sysv_abi_broken_push_dummy_call): Declare.
+
+2003-10-10 Kei Sakamoto <sakamoto.kei@renesas.com>
+
+ * NEWS: Replace "Hitachi" and "Mitsubishi" with "Renesas".
+ * README: Ditto.
+ * d10v-tdep.c: Ditto.
+ * h8300-tdep.c: Ditto.
+ * remote-e7000.c: Ditto.
+ * remote-hms.c: Ditto.
+ * ser-e7kpc.c: Ditto.
+ * sh-stub.c: Ditto.
+ * sh-tdep.c: Ditto.
+ * sh-tdep.h: Ditto.
+ * sh3-rom.c: Ditto.
+ * sh64-tdep.c: Ditto.
+ * top.c: Ditto.
+ * wince.c: Ditto.
+ * config/d10v/d10v.mt: Ditto.
+ * config/sh/embed.mt: Ditto.
+ * config/sh/linux.mt: Ditto.
+ * config/sh/tm-linux.h: Ditto.
+ * config/sh/tm-sh.h: Ditto.
+ * config/sh/wince.mt: Ditto.
+
+2003-10-09 Andrew Cagney <cagney@redhat.com>
+
+ * ppc-tdep.h (struct type): Declare opaque.
+ * x86-64-tdep.h (struct regcache): Declare opaque.
+ * sh-tdep.c (sh_do_fp_register): Delete "register" attribute, fix
+ coding style.
+
+2003-10-09 Andrew Cagney <cagney@redhat.com>
+
+ Changes from 2003-09-09 Jimi Xenidis <jimix@watson.ibm.com>:
+ * config/rs6000/tm-rs6000.h (SOFTWARE_SINGLE_STEP): Delete macro.
+ (SOFTWARE_SINGLE_STEP_P): Ditto.
+ * config/powerpc/tm-ppc-eabi.h (SOFTWARE_SINGLE_STEP_P): Ditto.
+ * config/powerpc/tm-linux.h (SOFTWARE_SINGLE_STEP): Ditto.
+ (SOFTWARE_SINGLE_STEP_P): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): When AIX, set
+ software_single_step to rs6000_software_single_step.
+
+2003-10-09 Andrew Cagney <cagney@redhat.com>
+
+ * MAINTAINERS: Mark m32r-elf as buildable with -Werror.
+
+2003-10-09 Michael Snyder <msnyder@redhat.com>
+
+ * frame.h: Fix typo in comment.
+ * dummy-frame.c: Fix typo in comment.
+ * d10v-tdep.c: Random whitespace/comment tweaks.
+
+2003-10-09 Elena Zannoni <ezannoni@redhat.com>
+
+ * sh-tdep.c (sh_gdbarch_init): Delete setting of push_dummy_code.
+ (sh_push_dummy_code): Delete function, it's only used for dummy calls
+ on stack.
+
+ Based on input by Stephen Clarke (stephen.clarke@superh.com):
+ * sh-tdep.c (sh_use_struct_convention): Add comment explaining ABI
+ in detail.
+
+2003-10-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * remote-mips.c (mips_initialize): Remove unneeded call to
+ get_selected_frame. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
+
+2003-10-09 Daniel Jacobowitz <drow@mvista.com>
+
+ * dwarf2expr.c (execute_stack_op): Don't treat the frame base as
+ a memory pointer.
+
+2003-10-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * lin-lwp.c (stop_and_resume_callback): Set the resumed flag
+ for any lwp we resume.
+ (running_callback): Add lwps that have pending status events
+ against them to be considered running.
+
+2003-10-08 Kei Sakamoto <sakamoto.kei@renesas.com>
+
+ * m32r-tdep.c : Include "dis-asm.h".
+ * Makefile.in (m32r-tdep.o): Update dependencies.
+
+2003-10-06 J. Brobecker <brobecker@gnat.com>
+
+ * completer.h (get_gdb_completer_word_break_characters): Delete.
+ * completer.c: include language.h.
+ (gdb_completer_word_break_characters): Delete.
+ (get_gdb_completer_word_break_characters): Delete.
+ (location_completer): Use the word break characters of the current
+ language.
+ (complete_line): Likewise.
+ (line_completion_function): Likewise.
+ (skip_quoted_chars): Likewise.
+ * Makefile.in (completer.o): Add dependency on language.h.
+ * top.c (init_main): Set the readline word break characters
+ to GDB's default word break characters.
+
+2003-10-06 J. Brobecker <brobecker@gnat.com>
+
+ * language.h (language_defn): new field, la_word_break_characters.
+ * language.c (unknown_language_defn): Set new field to
+ default_word_break_characters.
+ (auto_language_defn): Likewise.
+ (local_language_defn): Likewise.
+ * ada-lang.c (ada_language_defn): Likewise.
+ * c-lang.c (c_language_defn): Likewise.
+ (cplus_language_defn): Likewise.
+ (asm_language_defn): Likewise.
+ (minimal_language_defn): Likewise.
+ * f-lang.c (f_language_defn): Likewise.
+ * jv-lang.c (java_language_defn): Likewise.
+ * m2-lang.c (m2_language_defn): Likewise.
+ * objc-lang.c (objc_language_defn): Likewise.
+ * p-lang.c (pascal_language_defn): Likewise.
+ * scm-lang.c (scm_language_defn): Likewise.
+
+2003-10-06 Andrew Cagney <cagney@redhat.com>
+
+ * ppc-sysv-tdep.c: Re-indent.
+
+2003-10-06 J. Brobecker <brobecker@gnat.com>
+
+ * language.h (default_word_break_characters): Add prototype.
+ * language.c (default_word_break_characters): New function.
+
+2003-10-06 Andreas Schwab <schwab@suse.de>
+
+ * i386-tdep.c (i386_analyze_frame_setup): Also handle xorl/subl
+ with %eax.
+
+2003-10-06 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in (ALLDEPFILES): Remove "z8k-tdep.c" and
+ "h8500-tdep.c".
+ (z8k-tdep.o): Delete custom build rule.
+
+2003-10-06 Andrew Cagney <cagney@redhat.com>
+
+ * Makefile.in: Update all dependencies.
+
+ * MAINTAINERS: Mention that h8500, mn10200, and z8k were deleted.
+ No longer list PA as as obsolete candidate. List m32r as
+ broken instead of obsolete.
+
+ * config/nm-m3.h, config/h8500/h8500.mt: Delete obsolete files.
+ * config/h8500/tm-h8500.h, config/i386/nm-ptx4.h: Ditto.
+ * config/i386/nm-symmetry.h, config/i386/ptx.mh: Ditto.
+ * config/i386/ptx.mt, config/i386/ptx4.mh: Ditto.
+ * config/i386/ptx4.mt, config/i386/symmetry.mh: Ditto.
+ * config/i386/symmetry.mt, config/i386/tm-ptx.h: Ditto.
+ * config/i386/tm-ptx4.h, config/i386/tm-symmetry.h: Ditto.
+ * config/i386/xm-ptx.h, config/i386/xm-ptx4.h: Ditto.
+ * config/i386/xm-symmetry.h, config/mips/mipsm3.mh: Ditto.
+ * config/mips/mipsm3.mt, config/mips/tm-mipsm3.h: Ditto.
+ * config/mips/xm-mipsm3.h, config/mn10200/mn10200.mt: Ditto.
+ * config/mn10200/tm-mn10200.h, config/pa/hppabsd.mh: Ditto.
+ * config/pa/hppabsd.mt, config/pa/hppaosf.mh: Ditto.
+ * config/pa/hppaosf.mt, config/pa/hppapro.mt: Ditto.
+ * config/pa/nm-hppab.h, config/pa/nm-hppao.h: Ditto.
+ * config/pa/tm-hppab.h, config/pa/tm-hppao.h: Ditto.
+ * config/pa/tm-pro.h, config/pa/xm-hppab.h: Ditto.
+ * config/pa/xm-pa.h, config/sparc/sparclet.mt: Ditto.
+ * config/sparc/sparclite.mt, config/sparc/tm-sparclet.h: Ditto.
+ * config/sparc/tm-sparclite.h, config/z8k/tm-z8k.h: Ditto.
+ * config/z8k/z8k.mt: Ditto.
+
+ * NEWS: Mention that z8k-zilog-none, z8ksim, mn10200-*-*,
+ h8500hms, hppa*-*-bsd*, hppa*-*-osf*, hppa*-*-pro*,
+ mips*-*-mach3*, i[3456]86-sequent-sysv4*, i[3456]86-sequent-sysv*,
+ i[3456]86-sequent-bsd*, sparclet-*-*, sparclite-fujitsu-none, and
+ sparclite were removed.
+ * configure.host, configure.tgt: Remove corresponding tuples.
+
+ * breakpoint.c, breakpoint.h: Remove obsolete code.
+ * buildsym.c, dbxread.c, gdbtypes.c, mdebugread.c: Ditto.
+ * monitor.c, sparc-tdep.c, stabsread.c: Ditto.
+ * stabsread.h, xcoffread.c: Ditto.
+
+ * z8k-tdep.c, symm-tdep.c, symm-nat.c: Delete obsolete file.
+ * sparclet-stub.c, sparclet-rom.c: Delete obsolete file.
+ * sparcl-tdep.c, sparcl-stub.c, h8500-tdep.c: Delete obsolete file.
+ * m3-nat.c, mipsm3-nat.c, mn10200-tdep.c: Delete obsolete file.
+
+2003-10-06 David Lecomber <dsl@sources.redhat.com>
+
+ * f-valprint.c: Reformatting
+
+2003-10-06 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.c: Remove duplicate comment.
+
+ * x86-64-tdep.c (x86_64_store_return_value): Don't use
+ DEPRECATED_REGISTER_RAW_SIZE. Use symbolic names for register
+ names for return values. This fixes a bug since we looked at %rbx
+ instead of %rdx.
+
+2003-10-05 Mark Kettenis <kettenis@gnu.org>
+
+ * x86-64-tdep.c: Include "regset.h".
+
+ * i386-tdep.h (struct gdbarch_tdep): Add members gregset,
+ gregset_reg_offset, gregset_num_regs, sizeof_gregset, fpregset,
+ sizeof_fpregset.
+ * i386-tdep.c: Include "regset.h".
+ (i386_supply_gregset): New function.
+ (i386_supply_fpregset): New function.
+ (i386_gdbarch_init): Initialze register set-related members of
+ TDEP.
+ * x86-64-tdep.c (x86_64_supply_fpregset): New function.
+ (x86_64_init_abi): Initialize TDEP->sizeof_fpregset.
+
+2003-10-03 Andrew Cagney <cagney@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): When the 64 bit SysV ABI,
+ set extract_return_value, store_return_value and
+ use_struct_convention to ppc64_sysv_abi_extract_return_value,
+ ppc64_sysv_abi_store_return_value and
+ ppc64_sysv_abi_use_struct_convention.
+ * ppc-tdep.h (ppc64_sysv_abi_extract_return_value): Declare.
+ (ppc64_sysv_abi_store_return_value): Declare.
+ (ppc64_sysv_abi_use_struct_convention): Declare.
+ * ppc-sysv-tdep.c (enum return_value_convention): Define.
+ (ppc64_sysv_abi_extract_return_value): New function.
+ (ppc64_sysv_abi_store_return_value): New function.
+ (ppc64_sysv_abi_use_struct_convention): New function.
+ (ppc64_sysv_abi_return_value): New function.
+
+2003-10-03 Andrew Cagney <cagney@redhat.com>
+
+ * ppc-linux-tdep.c (ppc64_linux_convert_from_func_ptr_addr): Only
+ convert a descriptor to a function when it's in the ".opd"
+ section.
+
+2003-10-03 Corinna Vinschen <vinschen@redhat.com>
+
+ * sh-tdep.c (sh_push_dummy_call_fpu): Initialize flt_argreg and
+ reg_size to keep GCC silent.
+
+2003-10-03 Corinna Vinschen <vinschen@redhat.com>
+
+ * dwarf2-frame.c (struct comp_unit): Add tbase member to store
+ base for DW_EH_PE_textrel encodings.
+ (read_encoded_value): Add a DW_EH_PE_textrel case.
+ (dwarf2_build_frame_info): Set unit.tbase to beginning of text
+ section.
+
+2003-10-03 Mark Kettenis <kettenis@gnu.org>
+
+ * dwarf2-frame.c (dwarf2_build_frame_info): Fix comment.
+
+2003-10-02 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_REGISTER_RAW_SIZE): Rename
+ REGISTER_RAW_SIZE.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * aix-thread.c, alpha-tdep.h, arm-tdep.c, core-sol2.c: Update.
+ * cris-tdep.c, dve3900-rom.c, findvar.c, frame.c: Update.
+ * hppa-tdep.c, hppab-nat.c, hppah-nat.c, hppam3-nat.c: Update.
+ * hpux-thread.c, i386gnu-nat.c, ia64-aix-nat.c: Update.
+ * ia64-linux-nat.c, ia64-tdep.c, infcmd.c, infptrace.c: Update.
+ * infrun.c, irix5-nat.c, lynx-nat.c, mips-linux-tdep.c: Update.
+ * mips-nat.c, mips-tdep.c, mipsv4-nat.c, mn10300-tdep.c: Update.
+ * monitor.c, ns32k-tdep.c, ppc-linux-nat.c, regcache.c: Update.
+ * remote-e7000.c, remote-mips.c, remote-sim.c: Update.
+ * remote-vxmips.c, remote-vxsparc.c, remote.c: Update.
+ * rom68k-rom.c, rs6000-nat.c, rs6000-tdep.c, s390-tdep.c: Update.
+ * sh64-tdep.c, sparc-nat.c, sparc-tdep.c, stack.c: Update.
+ * target.c, tracepoint.c, v850-tdep.c, v850ice.c, valops.c: Update.
+ * vax-tdep.c, vax-tdep.h, x86-64-tdep.c, xstormy16-tdep.c: Update.
+ * config/m68k/tm-delta68.h, config/m68k/tm-vx68.h: Update.
+ * config/sparc/tm-sparc.h, config/sparc/tm-sparclynx.h: Update.
+
+2003-10-02 Jim Blandy <jimb@redhat.com>
+
+ * dwarf2read.c (struct die_info): Doc fix.
+
+2003-10-02 Corinna Vinschen <vinschen@redhat.com>
+
+ * sh-tdep.c: Running thru gdb_indent.sh.
+
+2003-10-02 Corinna Vinschen <vinschen@redhat.com>
+
+ * sh-tdep.c (sh_justify_value_in_reg): New function.
+ (sh_stack_allocsize): Ditto.
+ (flt_argreg_array): New array used for floating point argument
+ passing.
+ (sh_init_flt_argreg): New function.
+ (sh_next_flt_argreg): Ditto.
+ (sh_push_dummy_call_fpu): Simplify. Rename "odd_sized_struct" to
+ "pass_on_stack". Use new helper functions. Accomodate Renesas ABI.
+ Fix argument passing strategy.
+ (sh_push_dummy_call_nofpu): Ditto.
+
+2003-10-01 Andrew Cagney <cagney@redhat.com>
+
+ * value.h (register_value_being_returned): Declare. Replace
+ "value_being_returned".
+ * infcall.c (call_function_by_hand): Use
+ register_value_being_returned.
+ * infcmd.c (print_return_value): Call
+ "register_value_being_returned", handle struct return locally.
+ * values.c (register_value_being_returned): New function. Replace
+ "value_being_returned".
+
+2003-09-30 Elena Zannoni <ezannoni@redhat.com>
+
+ * linux-proc.c (linux_do_registers): New function.
+ (linux_make_note_section): Use linux_do_registers in case of
+ single threaded inferior programs.
+
+2003-10-01 Andrew Cagney <cagney@redhat.com>
+
+ * infcall.c (call_function_by_hand): When STRUCT_RETURN, always
+ use STRUCT_ADDR. When not using "struct return convention", pass
+ "0" to "value_being_returned". Add FIXMEs.
+ * infcmd.c (print_return_value): Pass an explicit 0/1 to
+ value_being_returned. Add comments.
+ * values.c (value_being_returned): Add fixme.
+ * hppa-tdep.c (hppa_extract_struct_value_address): Add FIXME.
+ (hppa_value_returned_from_stack): Add FIXME.
+
+2003-09-30 David Carlton <carlton@kealia.com>
+
+ * dwarf2read.c (struct die_info): Add 'parent' field; replace
+ 'has_children' and 'next' by 'child' and 'sibling'.
+ (read_comp_unit): Rework algorithm, breaking body into
+ read_die_and_children and read_die_and_siblings.
+ (read_die_and_children, read_die_and_siblings): New.
+ (read_full_die): Add 'has_children' argument; set it instead of
+ the die's 'has_children' field. Minor formatting cleanup.
+ (free_die_list): Use die->child and die->sibling instead of
+ die->next.
+ (dump_die_list): Ditto.
+ (sibling_die): Use die->sibling.
+ (psymtab_to_symtab_1): Use die's 'child' field in place of its
+ 'has_children' and 'next' fields.
+ (process_die, read_file_scope, read_func_scope)
+ (read_lexical_block_scope, read_structure_scope)
+ (read_enumeration, read_array_type, read_common_block)
+ (read_namespace, read_subroutine_type, dump_die): Ditto.
+
+2003-09-30 Andrew Cagney <cagney@redhat.com>
+
+ * rs6000-tdep.c (rs6000_gdbarch_init): Set the PowerOpen red zone
+ to 224, not 220.
+
+2003-09-30 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_REGISTER_VIRTUAL_SIZE): Rename
+ REGISTER_VIRTUAL_SIZE.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * vax-tdep.h, sparc-tdep.c, regcache.h: Update.
+ * regcache.c, mn10300-tdep.c, mips-tdep.c: Update.
+ * infcmd.c, frame.c, findvar.c, cris-tdep.c: Update.
+
+2003-09-29 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (DEPRECATED_REGISTER_VIRTUAL_TYPE): Rename
+ DEPRECATED_REGISTER_VIRTUAL_TYPE.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * arch-utils.c, hppa-tdep.c, regcache.c, regcache.h: Update.
+ * sh64-tdep.c, sparc-tdep.c: Update.
+
+ * remote-vxsparc.c (vx_read_register): Replace bzero with memset.
+ * remote-vxmips.c (vx_read_register): Ditto.
+ * remote-vx68.c (vx_read_register): Ditto.
+ * gnu-nat.c (inf_validate_procs): Ditto.
+
+2003-09-29 J. Brobecker <brobecker@gnat.com>
+
+ * infcall.c (call_function_by_hand): Fix build failure
+ introduced in the previous change to this file.
+
+2003-09-29 Andrew Cagney <cagney@redhat.com>
+
+ * NEWS: Mention Objective-C.
+
+2003-09-29 Jerome Guitton <guitton@act-europe.fr>
+
+ * arm-tdep.c (arm_make_prologue_cache): Use trad_frame_addr_p to
+ test if the register has been saved on the stack.
+ (arm_scan_prologue_cache): When analysing the instruction
+ "str lr, [sp, #-4]", save the address where lr has been stored.
+
+2003-09-28 Andrew Cagney <cagney@redhat.com>
+
+ * frame.c (frame_read_unsigned_register): Delete function.
+ * frame.h (frame_read_unsigned_register): Delete declaration.
+ * sparc-tdep.c (sparc_init_extra_frame_info): Use
+ get_frame_register_unsigned.
+ (sparc_frame_saved_pc, sparc_pop_frame): Ditto.
+ * m68hc11-tdep.c (m68hc11_print_register): Ditto.
+ * d10v-tdep.c (d10v_print_registers_info): Ditto.
+
+ * frame.h (frame_read_register): Delete declaration.
+ * frame.c (frame_read_register): Delete function.
+ * arch-utils.c (legacy_register_to_value): Use get_frame_register.
+ * sparc-tdep.c (sparc_fetch_pointer_argument): Ditto.
+ * rs6000-tdep.c (rs6000_fetch_pointer_argument): Ditto.
+ * mips-tdep.c (mips_register_to_value): Ditto.
+ * hppa-tdep.c (hppa_fetch_pointer_argument): Ditto.
+ * d10v-tdep.c (d10v_print_registers_info): Ditto.
+
+ * frame.c (frame_read_signed_register): Delete function.
+ (frame_read_unsigned_register): Update comments.
+ * frame.h (frame_read_signed_register): Delete declaration.
+ * h8300-tdep.c (h8300_print_register): Use
+ get_frame_register_signed.
+ * m68hc11-tdep.c (m68hc11_print_register): Ditto.
+
+ * config/pa/tm-hppa.h (DEPRECATED_VALUE_RETURNED_FROM_STACK):
+ Rename VALUE_RETURNED_FROM_STACK.
+ * infcmd.c (print_return_value): Update.
+ * infcall.c (call_function_by_hand): Update.
+
+2003-09-28 Mark Kettenis <kettenis@gnu.org>
+
+ * i387-tdep.c (i387_supply_fsave, i387_supply_fxsave): Add
+ regcache argument and reverse the order of the other two
+ arguments. Remove local regcache variable. Determine
+ architecture from REGCACHE. Update comments.
+ * x86-64-tdep.c (x86_64_supply_fxsave): Add regcache argument and
+ reverse the order of the other two arguments. Remove local
+ regcache variable. Determine architecture from REGCACHE. Update
+ comments.
+ * i387-tdep.h (i387_supply_fsave, i387_supply_fxsave): Adjust
+ prototypes. Update comments.
+ * x86-64-tdep.c (x86_64_supply_fxsave): Adjust prototype. Adjust
+ comment.
+ * amd64fbsd-nat.c (supply_fpregset, fetch_inferior_registers):
+ Update.
+ * go32-nat.c (fetch_register, go32_fetch_registers): Update.
+ * i386-interix-nat.c (supply_fpregset): Update.
+ * i386-linux-nat.c (supply_fpregset, supply_fpxregset): Update.
+ * i386-nto-tdep.c (i386nto_supply_fpregset): Update.
+ * i386gnu-nat.c (fetch_fpregs, supply_fpregset): Update.
+ * i386bsd-nat.c (supply_fpregset, fetch_inferior_registers): Update.
+ * i386nbsd-tdep.c (fetch_core_registers, fetch_elfcore_registers):
+ Update.
+ * i386obsd-tdep.c (fetch_core_registers): Update.
+ * i386v4-nat.c (supply_fpregset): Update.
+ * x86-64-linux-nat.c (supply_fpregset): Update.
+ * x86-64-linux-tdep.c (fetch_core_registers): Update.
+
+2003-09-27 Mark Kettenis <kettenis@gnu.org>
+
+ * i386-tdep.h: Put opaque declarations in alphabetical
+ order. Remove spurious whitespace.
+ (struct gdbarch_tdep): add st0_regnum and mm0_regnum members.
+ (i386_sse_regnum_p, i386_mxcsr_regnum_p): Remove prototypes.
+ * i386-tdep.c (MM0_REGNUM): Remove define.
+ (i386_mmx_regnum_p): Add gdbarch argument.
+ (i386_sse_regnum_p, i386_mxcsr_regnum_p): Add gdbarch argument.
+ Rewrite using new macro definitions for FPU/SSE registers.
+ (i386_fp_regnum_p, i386_fpc_regnum_p): Rewrite using new macro
+ definitions from i387-tdep.h.
+ (i386_register_name): Update.
+ (i386_stab_reg_to_regnum, i386_dwarf_reg_to_regnum): Update to use
+ new macro definitions for FPU/SSE registers.
+ (i386_extract_return_value): Determine whether floating-point
+ registers are present by examining REGCACHE's architecture.
+ (i386_store_return_value): Likewise. Use I386_MAX_REGISTER_SIZE
+ instead of FPU_REG_RAW_SIZE. Use new macro definitions for
+ FPU/SSE registers.
+ (i386_register_type): Update.
+ (i386_mmx_regnum_to_fp_regnum): Rewrite using new macro
+ definitions for FPU registers. Use REGCACHE's architecture to
+ determine the appropriate register numbers.
+ (i386_pseudo_register_read, i386_pseudo_register_write,
+ i386_register_reggroup_p): Update.
+ (i386_gdbarch_init): Initialize TDEP->st0_regnum and
+ TDEP->mm0_regnum.
+ * i387-tdep.h (I387_FCTRL_REGNUM, I387_FSTAT_REGNUM,
+ I387_FTAG_REGNUM, I387_FISEG_REGNUM, I387_FIOFF_REGNUM,
+ I387_FOSEG_REGNUM, I387_FOOFF_REGNUM, I387_FOP_REGNUM,
+ I387_XMM0_REGNUM, I387_MXCSR_REGNUM): New defines.
+ (i387_supply_fsave, i387_fill_fsave, i387_supply_fxsave,
+ i387_fill_fxsave): Change type of fsave/fxsave argument from `char
+ *' to `void *'.
+ * i387-tdep.c (i387_print_float_info, fsave_offset, FSAVE_ADDR,
+ i387_supply_fsave, i387_fill_fsave, fxsave_offset, FXSAVE_ADDR,
+ i387_supply_fxsave, i387_fill_fxsave): Update to use new macro
+ definitions for FPU/SSE registers.
+ (FXSAVE_MXCSR_ADDR): New define.
+ * x86-64-tdep.c (x86_64_init_abi): Override TDEP->st0_regnum and
+ TDEP->mm0_regnum.
+ (I387_FISEG_REGNUM, I387_FOSEG_REGNUM): Remove defines.
+ (I387_ST0_REGNUM): Define.
+
+ * regcache.h (get_regcache_arch): New prototype.
+ * regcache.c (get_regcache_arch): New function.
+
+ * x86-64-tdep.c (x86_64_store_return_value): Remove spurious
+ whitespace.
+
+ * i386-tdep.c (i386_num_register_names, i386_num_mmx_regs):
+ Initialize using ARRAY_SIZE.
+
+2003-09-27 Andrew Cagney <cagney@redhat.com>
+
+ * arch-utils.c (deprecated_init_frame_pc_default): Rename
+ "init_frame_pc_default".
+ * arch-utils.h (deprecated_init_frame_pc_default): Update.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sh64-tdep.c (sh64_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * h8300-tdep.c (h8300_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * config/pa/tm-hppa.h (DEPRECATED_INIT_FRAME_PC): Update.
+
+2003-09-26 Mark Kettenis <kettenis@gnu.org>
+
+ * regset.h: New file.
+ * Makefile.in (regset_h): Add.
+
+2003-09-25 Andrew Cagney <cagney@redhat.com>
+
+ * frame.h (deprecated_frame_saved_regs): Rename
+ get_frame_saved_regs.
+ * cris-tdep.c, frame.c, h8300-tdep.c, hppa-tdep.c: Update.
+ * mcore-tdep.c, mips-tdep.c, mn10300-tdep.c: Update.
+ * ns32k-tdep.c, ppc-linux-tdep.c, rs6000-tdep.c: Update.
+ * s390-tdep.c, sh64-tdep.c, stack.c: Update.
+ * v850-tdep.c, vax-tdep.c, xstormy16-tdep.c: Update.
+
+2003-09-25 Andrew Cagney <cagney@redhat.com>
+
+ * NEWS: Mention the new backtrace mechanism, DWARF 2 CFI, hosted
+ file I/O, multi-arch, TLS and NPTL, DWARF 2 Location Expressions,
+ and Java.
+ * PROBLEMS: Mention that mips*-*-*, powerpc*-*-*, sparc*-*-* and
+ arm*-*-* do not use the new frame code.
+
+2003-09-25 David Carlton <carlton@kealia.com>
+
+ * c-exp.y: Remove 'register' declarations.
+ * f-exp.y, jv-exp.y, m2-exp.y, objc-exp.y, p-exp.y: Ditto.
+
+2003-09-25 David Carlton <carlton@kealia.com>
+
+ * c-exp.y: Include cp-support.h. Add qualified_type.
+ (yylex): Delete nested type hack; add comments.
+ * cp-namespace.c (cp_lookup_nested_type): New function.
+ * cp-support.h: Declare cp_lookup_nested_type.
+ * eval.c (evaluate_subexp_standard): Call value_aggregate_elt
+ instead of value_struct_elt_for_reference.
+ * valops.c: Include cp-support.h.
+ (value_aggregate_elt): New function.
+ (value_namespace_elt): Ditto.
+ (value_struct_elt_for_reference): Make static.
+ * value.h: Delete declaration of value_struct_elt_for_reference;
+ add declaration for value_aggregate_elt.
+ * Makefile.in (c-exp.tab.o): Depend on $(cp_support_h).
+ (valops.o): Ditto.
+
+2003-09-25 Daniel Jacobowitz <drow@mvista.com>
+
+ * stack.c: Include "reggroups.h".
+ (frame_info): Only display registers in all_reggroup.
+ * Makefile.in (stack.o): Update dependencies.
+
+2003-09-25 Jerome Guitton <guitton@act-europe.fr>
+
+ * arm-tdep.c (arm_skip_prologue): Handle "sub ip, sp #n" and
+ "add ip, sp #n" in the prologue.
+ (arm_scan_prologue): Ditto.
+
+2003-09-25 Jerome Guitton <guitton@act-europe.fr>
+
+ * MAINTAINERS (write after approval): Add myself.
+
+2003-09-25 Andreas Schwab <schwab@suse.de>
+
+ * m68k-tdep.c: Include "dwarf2-frame.h".
+ (m68k_gdbarch_init): Add the DWARF CFI frame unwinder.
+ * Makefile.in (m68k-tdep.o): Update dependencies.
+
+2003-09-25 Corinna Vinschen <vinschen@redhat.com>
+
+ * sh-tdep.c (struct frame_extra_info): Remove.
+ (struct sh_frame_cache): New structure.
+ (GET_SOURCE_REG): New macro extracting source register of an opcode.
+ (GET_TARGET_REG): Ditto but target register.
+ (GET_PUSHED_REG): Remove.
+ (IS_MOV_ARG_TO_REG): New macro.
+ (IS_MOV_ARG_TO_IND_R14): New macro.
+ (IS_MOV_ARG_TO_IND_R14_WITH_DISP): New macro.
+ (IS_MOVW_PCREL_TO_REG): New macro.
+ (IS_MOVL_PCREL_TO_REG): New macro.
+ (IS_SUB_REG_FROM_SP): New macro.
+ (IS_ARG_MOV): Remove.
+ (IS_MOV_TO_R14): Remove.
+ (IS_RESTORE_FP): New macro.
+ (IS_RTS): New macro.
+ (IS_LDS): New macro.
+ (IS_MOV_FP_SP): New macro.
+ (IS_ADD_REG_TO_FP): New macro.
+ (IS_ADD_IMM_FP): New macro.
+ (sh_skip_prologue_hard_way): Remove.
+ (sh_saved_pc_after_call): Remove.
+ (sh_frame_chain): Remove.
+ (sh_find_callers_reg): Remove.
+ (sh_nofp_frame_init_saved_regs): Remove.
+ (sh_fp_frame_init_saved_regs): Remove.
+ (sh_init_extra_frame_info): Remove.
+ (sh_analyze_prologue): New function.
+ (sh_skip_prologue): Remove deprecated code. Rely on new function
+ sh_analyze_prologue when after_prologue fails.
+ (sh_frame_saved_pc): Remove.
+ (sh_alloc_frame_cache): New function.
+ (sh_frame_cache): Ditto.
+ (sh_frame_prev_register): Ditto.
+ (sh_frame_this_id): Ditto.
+ (sh_frame_unwind): New structure defining the heuristic frame
+ sniffer interface.
+ (sh_frame_sniffer): New function.
+ (sh_unwind_sp): Ditto.
+ (sh_unwind_pc): Ditto.
+ (sh_unwind_dummy_id): Ditto.
+ (sh_frame_base_address): Ditto.
+ (sh_frame_base): New structure defining new frame base code.
+ (sh_in_function_epilogue_p): New function.
+ (sh_gdbarch_init): Restructure and simplify to eliminate deprecated
+ code and to call all new code instead. Initialize dwarf2 and
+ heuristic frame sniffer.
+
+2003-09-24 Paul N. Hilfinger <hilfingr@nile.gnat.com>
+
+ * parser-defs.h (struct exp_descriptor): New definition, containing
+ language-specific info for printing, prefixifying, dumping, and
+ evaluating expressions.
+ (exp_descriptor_standard): Declare new variable.
+ (print_subexp): Make global and declare here (from expprint.c).
+ (dump_subexp): Ditto.
+ (dump_subexp_body_standard): Declare.
+ (operator_length_standard): Declare.
+ (op_name_standard): Declare.
+ (print_subexp): Declare.
+ (print_subexp_standard): Declare.
+
+ * language.h (struct language_defn): Add la_exp_desc field to hold
+ pointer to table for language-specific operators.
+ Remove evaluate_exp field, which is now in struct exp_descriptor.
+
+ * parse.c (operator_length): Move most code to new
+ operator_length_standard function. Use language-specific information.
+ (operator_length_standard): New function taking most code from
+ operator_length.
+ (exp_descriptor_standard): New constant.
+
+ * expression.h (enum exp_opcode): Add definitions of OP_EXTENDED0
+ and OP_EXTENDED_LAST.
+
+ * expprint.c (print_subexp): Use language-specific print_subexp.
+ Make global; remove static declaration.
+ Move most code to print_subexp_standard.
+ (print_subexp_standard): New function, containing code formerly in
+ print_subexp.
+ (op_name): Add expression to argument signature.
+ Use langauge-specific op_name.
+ Move most code to op_name_standard.
+ (op_name_standard): New function, containing code formerly in op_name.
+ (dump_subexp): Use new version of op_name function.
+ Use language-specific dump_subexp_body, and move most existing code to
+ dump_subexp_body_standard.
+ (dump_raw_expression): Use new op_name interface.
+ (dump_subexp_body): Move most code to dump_subexp_body_standard.
+ (dump_subexp_body_standard): New function, containing code formerly
+ in dump_subexp_body.
+
+ * language.c (unknown_language): Add default la_exp_desc field and
+ remove evaluate_exp field.
+ (auto_language): Ditto.
+ (local_language): Ditto.
+ * f-lang.c (f_language_defn): Ditto.
+ * c-lang.c (c_language_defn): Ditto.
+ (cplus_language_defn): Ditto.
+ (asm_language_defn): Ditto.
+ (minimal_language_defn): Ditto.
+ * p-lang.c (pascal_language_defn): Ditto.
+ * m2-lang.c (m2_language_defn): Ditto.
+ * objc-lang.c (objc_language_defn): Ditto.
+
+ * jv-lang.c (exp_descriptor_java): New variable, containing
+ Java-specific expression evaluator.
+ (java_language_defn): Add la_exp_desc field and remove evaluate_exp
+ field.
+ * scm-lang.c (exp_descriptor_scm): New variable, containing
+ Scheme-specific expression evaluator.
+ (scm_language_defn): Add la_exp_desc field and remove evaluate_exp
+ field.
+ * objc-lang.c (print_object_command): Take evaluate_exp from the
+ la_exp_desc field.
+
+ * Makefile.in (eval.o): Add dependency on parser-defs.h.
+
+ * eval.c: Include parser-defs.h for the full declaration of
+ la_exp_desc's type.
+ (evaluate_subexp): Get evaluate_exp out of la_exp_desc field.
+
+2003-09-23 Paul N. Hilfinger <hilfingr@nile.gnat.com>
+
+ * parser-defs.h (operator_length): Declare.
+
+ * parse.c (length_of_subexp): Use operator_length to get operator
+ lengths and arities for operators.
+ Move most code to new operator_length function.
+ (operator_length): New function absorbing most code from
+ length_of_subexp.
+ (prefixify_subexp): Remove large case and use operator_length instead.
+ (parse_exp_1): Use renamings:
+ dump_prefix_expression => dump_raw_expression and
+ dump_postfix_expression => dump_prefix_expression.
+
+ * expression.h (dump_prefix_expression): Rename to ...
+ (dump_raw_expression): New name.
+ (dump_postfix_expression): Rename to ...
+ (dump_prefix_expression): New name.
+
+ * expprint.c (dump_subexp): Make global. Add comment.
+ Move most existing code to dump_subexp_body.
+ (dump_subexp_body): New function.
+ (dump_prefix_expression): Rename to dump_raw_expression.
+ Remove attempt to print the expression via print_expression: it can't
+ work before the expression is prefixified.
+ (dump_raw_expression): Renamed from dump_prefix_expression.
+ (dump_postfix_expression): Rename to dump_prefix_expression, since
+ that's what it does.
+ Remove 'note' parameter, since this routine must be used on
+ prefixified expression.
+ (dump_prefix_expression): Renamed from dump_postfix_expression.
+
+2003-09-22 Jim Blandy <jimb@redhat.com>
+
+ * dwarf2read.c (read_array_type): When building the type for an
+ array of unspecified length, make sure to choose the upper bound
+ so that the array's total length comes out to be zero --- that's
+ how we represent such arrays.
+
+2003-09-22 Michael Chastain <mec@shout.net>
+
+ * MAINTAINERS: Rename gdb.c++ to gdb.cp.
+
+2003-09-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * top.c (quit_force): Fix indirect call to quit_target so
+ a struct qt_args pointer is passed.
+
+2003-09-22 Andrew Cagney <cagney@redhat.com>
+
+ * arch-utils.h (init_frame_pc_noop): Delete declaration.
+ * arch-utils.c (init_frame_pc_noop): Delete function.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Do not set
+ "init_frame_pc".
+ * mips-tdep.c (mips_gdbarch_init): Ditto.
+ * i386-interix-tdep.c (i386_interix_init_abi): Ditto.
+ * config/sparc/tm-sparc.h (init_frame_pc_noop): Delete
+ declaration.
+ (DEPRECATED_INIT_FRAME_PC): Delete macro.
+ * config/rs6000/tm-rs6000.h (init_frame_pc_noop): Delete
+ declaration.
+ (DEPRECATED_INIT_FRAME_PC): Delete macro.
+
+2003-09-22 Anthony Green <green@redhat.com>
+
+ * monitor.c (monitor_expect): Delete unused conflicting targ_ops
+ declaration.
+
+2003-09-20 Andrew Cagney <cagney@redhat.com>
+
+ * breakpoint.c: Eliminate ARGSUSED.
+ * buildsym.c, cli/cli-cmds.c, cli/cli-script.c: Ditto.
+ * coffread.c, corelow.c, dwarf2read.c, event-top.c: Ditto.
+ * exec.c, gcore.c, hpux-thread.c, infcmd.c, inflow.c: Ditto.
+ * infrun.c, inftarg.c, maint.c, ocd.c, printcmd.c: Ditto.
+ * procfs.c, regcache.c, remote-rdi.c, remote-sds.c: Ditto.
+ * remote.c, sol-thread.c, source.c, stabsread.c: Ditto.
+ * stack.c, symfile.c, target.c, top.c, typeprint.c: Ditto.
+ * utils.c, v850ice.c, valprint.c, values.c, win32-nat.c: Ditto.
+ * wince.c, remote-vx.c: Ditto.
+
+ * cli/cli-script.c: Remove "register" attributes.
+ * config/pa/tm-hppa.h: Ditto.
+ * cli/cli-decode.c: Ditto.
+ * cli/cli-cmds.c: Ditto.
+
+2003-09-19 Andrew Cagney <cagney@redhat.com>
+
+ * sparcnbsd-nat.c (getregs_supplies): Rename NPC_REGNUM to
+ DEPRECATED_NPC_REGNUM.
+ * sparc64nbsd-nat.c (getregs_supplies): Ditto.
+
+2003-09-19 Christopher Faylor <cgf@redhat.com>
+
+ * win32-nat.c (mappings): Remove HAVE_SSE conditional.
+
+2003-09-19 Jim Blandy <jimb@redhat.com>
+
+ * macrotab.c (macro_include): Use the correct comparison to find
+ the appropriate place for this inclusion in the list.
+
+2003-09-19 Andrew Cagney <cagney@redhat.com>
+
+ * config/pa/nm-hppah.h (NEED_TEXT_START_END): Delete.
+ (DEPRECATED_HPUX_TEXT_END): Define.
+ (deprecated_hpux_text_end): Declare.
+ (struct target_ops): Declare opaque.
+ * hppah-nat.c (text_end): Make static.
+ (deprecated_hpux_text_end): New function.
+ * exec.c (text_end): Delete global variable.
+ (NEED_TEXT_START_END): Do not define.
+ (exec_file_attach): Replace code computing "text_end" code with
+ call to DEPRECATED_HPUX_TEXT_END.
+
+2003-09-19 Andrew Cagney <cagney@redhat.com>
+
+ * utils.c (align_up, align_down): New functions.
+ * defs.h (align_up, align_down): Declare.
+ * ppc-sysv-tdep.c (align_up, align_down): Delete functions.
+ * s390-tdep.c: Replace "round_up" and "round_down" with "align_up"
+ and "align_down".
+ (round_up, round_down): Delete functions.
+ * mips-tdep.c: Replace ROUND_UP and ROUND_DOWN with "align_up" and
+ "align_down".
+ (ROUND_DOWN, ROUND_UP): Delete macros.
+ (mips_dump_tdep): Do not print "ROUND_UP" or "ROUND_DOWN".
+ * h8300-tdep.c: Replace "round_up" and "round_down" with
+ "align_up" and "align_down".
+ (round_up, round_down): Delete macros.
+ * frv-tdep.c: Replace ROUND_UP and ROUND_DOWN with "align_up" and
+ "align_down".
+ (ROUND_UP, ROUND_DOWN): Delete macros.
+
+2003-09-18 J. Brobecker <brobecker@gnat.com>
+
+ * hppa-hpux-tdep.c (_initialize_hppa_hpux_tdep): Remove a
+ hard-coded constant. Use the proper machine name instead.
+
+2003-09-17 Andrew Cagney <cagney@redhat.com>
+
+ * sparc-tdep.c (legacy_register_name): Delete function.
+ * mips-tdep.c (mips_dump_tdep): Do not print REGISTER_NAME.
+ (mips_gdbarch_init): Refer to MIPS_REGISTER_NAME in comments.
+ * infcmd.c (gdb_register_name): Delete variable.
+ * gdbarch.sh (SDB_REG_TO_REGNUM): Delete reference to
+ REGISTER_NAME and "tm.h".
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * dpx2-nat.c (regmap): Refer to REGISTER_NAME and not
+ REGISTER_NAMES in comments.
+ * remote-st.c (get_reg_name), i386b-nat.c (tregmap): Ditto.
+ * m68klinux-nat.c (regmap): Ditto.
+
+2003-09-17 Jim Blandy <jimb@redhat.com>
+
+ * Makefile.in (dis_asm_h): Note that this #includes "bfd.h".
+
+2003-09-17 Andrew Cagney <cagney@redhat.com>
+
+ * ppcnbsd-tdep.c (ppcnbsd_use_struct_convention): New function.
+ (ppcnbsd_init_abi): Set "use_struct_convention" to
+ "ppcnbsd_use_struct_convention".
+
+2003-09-17 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbarch.sh (DEPRECATED_REG_STRUCT_HAS_ADDR): Add comment.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ (stabs_argument_has_addr): New architecture method.
+ * arch-utils.h (default_stabs_argument_has_addr): New prototype.
+ * arch-utils.c: Include "buildsym.h".
+ (default_stabs_argument_has_addr): New function.
+ * stabsread.c (define_symbol): Use stabs_argument_has_addr
+ instead of DEPRECATED_REG_STRUCT_HAS_ADDR.
+
2003-09-30 David Carlton <carlton@kealia.com>
* Makefile.in (c-exp.tab.o): Depend on cp_support_h.
@@ -56,7 +2288,7 @@
* regcache.c, remote-vxsparc.c, sparc-linux-nat.c: Update.
* sparc-nat.c, sparc-tdep.c, sparc64-tdep.c: Update.
* sparcnbsd-tdep.c: Update.
-
+
2003-09-17 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_REGISTER_BYTE): Rename REGISTER_BYTE.
@@ -185,7 +2417,7 @@
* symmisc.c, symtab.c, top.c, tracepoint.c: Ditto.
* typeprint.c, utils.c, valarith.c, valops.c: Ditto.
* values.c, vax-tdep.c, xcoffread.c: Ditto.
-
+
2003-09-13 Andrew Cagney <cagney@redhat.com>
* config/pa/tm-hppa64.h (struct frame_info): Declare opaque.
@@ -236,7 +2468,7 @@
* gdbarch.c, gdbarch.h: Updated.
* infcall.c (call_function_by_hand): Update.
* stabsread.c (define_symbol): Updated.
-
+
* Makefile.in (xm-i386-sv32.h, tm-i386gas.h): Remove.
2003-09-12 Christopher Faylor <cgf@redhat.com>
@@ -638,7 +2870,7 @@
set_gdbarch_frame_align(), frame_unwind_append_sniffer(), and
frame_base_set_default().
* Makefile.in (frv-tdep.o): Update dependencies.
-
+
2003-09-09 Mark Kettenis <kettenis@gnu.org>
* dwarf2-frame.c (read_encoded_value): Add support for
@@ -669,13 +2901,13 @@
* configure.tgt: Add FIXME to sh-*-linux*.
* sh-tdep.c: Move sh64 support to sh64-tdep.c.
(sh_gdbarch_init): Always set correct sh_show_regs function
- pointer. Call sh64_gdbarch_init() if machine type is sh5.
+ pointer. Call sh64_gdbarch_init() if machine type is sh5.
* sh-tdep.h: Move sh64 support to sh64-tdep.c.
* sh64-tdep.c: New file, containing all sh64 related code from
sh-tdep.c.
* config/sh/embed.mt (TDEPFILES): Add sh64-tdep.o.
* config/sh/linux.mt (TDEPFILES): Ditto.
- * config/sh/nbsd.mt (TDEPFILES): Ditto.
+ * config/sh/nbsd.mt (TDEPFILES): Ditto.
* config/sh/tm-sh.h: Drop REGISTER_TYPE definition.
* config/sh/wince.mt (TDEPFILES): Ditto.
@@ -895,7 +3127,7 @@
* config/h8300/tm-h8300.h (GDB_MULTI_ARCH): Delete definition.
* config/frv/tm-frv.h (GDB_MULTI_ARCH): Delete definition.
* config/alpha/tm-alpha.h (GDB_MULTI_ARCH): Delete definition.
-
+
2003-08-30 Michael Chastain <mec@shout.net>
* Makefile.in: Remove tm-hp300bsd.h, tm-hp300hpux.h.
@@ -1038,7 +3270,7 @@
(_initialize_mips_tdep): Do not set deprecated_tm_print_insn.
(mips_gdbarch_init): Set "print_insn". Delete initialization of
deprecated_tm_print_insn_info.
-
+
2003-08-27 Andrew Cagney <cagney@redhat.com>
* s390-tdep.c (s390_readinstruction): Delete "info" parameter.
@@ -1117,7 +3349,7 @@
2003-08-26 Jeff Johnston <jjohnstn@redhat.com>
* ia64-tdep.c (examine_prologue): Only stop at predicated insns if
- we are frameless or the return address register is already known.
+ we are frameless or the return address register is already known.
2003-08-26 Andrew Cagney <cagney@redhat.com>
@@ -1127,7 +3359,7 @@
2003-08-26 Jeff Johnston <jjohnstn@redhat.com>
* ia64-tdep.c (ia64_convert_from_func_addr): New function.
- (ia64_gdbarch_init): Call set_gdbarch_convert_from_func_addr().
+ (ia64_gdbarch_init): Call set_gdbarch_convert_from_func_addr().
2003-08-26 Jason Merrill <jason@redhat.com>
@@ -1143,21 +3375,21 @@
2003-08-25 Jeff Johnston <jjohnstn@redhat.com>
- * ia64-tdep.c (pseudo_regs): New enum that lists gr32-gr127, p0-p63,
+ * ia64-tdep.c (pseudo_regs): New enum that lists gr32-gr127, p0-p63,
bof, and nat0-nat127 as pseudo-registers.
(ia64_frame_cache): New struct used to cache frame info.
(ia64_register_reggroup_p): New routine used to override default
- register grouping so registers without names are still saved and
+ register grouping so registers without names are still saved and
restored.
- (ia64_dwarf_reg_to_regnum): New routine to map gr32-gr127 to their
+ (ia64_dwarf_reg_to_regnum): New routine to map gr32-gr127 to their
pseudo values.
(ia64_pseudo_register_read): New routine to read pseudo-registers.
(ia64_pseudo_register_write): New routine to write pseudo-registers.
- (ia64_alloc_frame_cache): New routine to create a new
+ (ia64_alloc_frame_cache): New routine to create a new
ia64_frame_cache.
(examine_prologue): Change prototype to add next_frame pointer.
Assume frameless until otherwise proven. Verify that the cfm for
- current frame matches the cfm that should occur for the prologues
+ current frame matches the cfm that should occur for the prologues
alloc insn and if equal, mark as not frameless. At end of routine,
if not frameless, calculate registers for the previous frame and store
in the cache, if a cache is provided.
@@ -1178,7 +3410,7 @@
(ia64_extract_struct_value_address): Change to issue error message.
(ia64_frame_align): New routine to align sp.
(ia64_push_dummy_call): New routine based on ia64_push_arguments().
- (ia64_push_arguments): Removed. Logic moved to
+ (ia64_push_arguments): Removed. Logic moved to
ia64_push_dummy_call().
(ia64_push_return_address): Ditto.
(ia64_unwind_dummy_id): New function.
@@ -1319,7 +3551,7 @@
prototype.
(i387_supply_register): remove prototype.
Update comments.
-
+
2003-08-22 Michael Chastain <mec@shout.net>
* config/djgpp/fnchange.lst: Remove gdb/testsuite/gdb.c++/*.
@@ -1345,7 +3577,7 @@
call set_height_command. Remove redundant code that turns off
pagination if output isn't a terminal. Remove redundant call to
set_width_command.
-
+
2003-08-22 Mark Kettenis <kettenis@gnu.org>
* sparc64-tdep.h (sparc64_regnum): Fix comment.
@@ -1463,14 +3695,14 @@
is subject to DECR_PC_AFTER_BREAK.
(set_traceframe_context): Make "trace_line" an int.
Fixes suggested by Mark Newman <mark.newman@lmco.com>
-
+
2003-08-20 Michael Snyder <msnyder@redhat.com>
* sh-tdep.h (struct gdbarch_tdep): New member FLOAT_ARGLAST_REG.
- * sh-tdep.c (sh_gdbarch_init): For sh2e, sh3e, and sh4, set
- FLOAT_ARG0_REGNUM and FLOAT_ARGLAST_REGNUM, to be used for
+ * sh-tdep.c (sh_gdbarch_init): For sh2e, sh3e, and sh4, set
+ FLOAT_ARG0_REGNUM and FLOAT_ARGLAST_REGNUM, to be used for
argument passing.
- (sh_push_dummy_call_fpu, sh_push_dummy_call_nofpu): New
+ (sh_push_dummy_call_fpu, sh_push_dummy_call_nofpu): New
functions, replace sh_push_dummy_call.
(sh_gdbarch_init): Set push_dummy_call to one of new methods.
@@ -1509,7 +3741,7 @@
2003-08-19 Shrinivas Atre <shrinivasa@kpitcummins.com>
* MAINTAINERS (write after approval): Add myself.
-
+
2003-08-18 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (FRAME_RED_ZONE_SIZE): New architecture method.
@@ -1544,7 +3776,7 @@
Define.
* i386-linux-nat.c: Include "linux-nat.h".
(child_post_startup_inferior): New function.
-
+
2003-08-18 Mark Kettenis <kettenis@gnu.org>
* i386-tdep.c (i386_analyze_register_saves): Handle register saves
@@ -1651,7 +3883,7 @@
(hppa64_hpux_frame_find_saved_regs_in_sigtramp): New function.
* config/pa/tm-hppa64.h: Remove macros that are no longer
necessary now that the gdbarch vector is properly setup.
- Transform some macros into function calls. Some minor cleanup.
+ Transform some macros into function calls. Some minor cleanup.
* config/pa/tm-hppah.h: Update function calls in macros
following the function renaming in hppa-hpux-tdep.c.
* Makefile.in (hppa_tdep_h): New variable.
@@ -1999,7 +4231,7 @@ Fri Aug 8 00:28:38 UTC 2003 Brendan Conoboy <blc@redhat.com>
* configure.tgt: Recognize m32r-*-*.
* config/m32r/tm-m32r.h: Delete file.
* config/m32r/m32r.mt: New file.
- * m32r-rom.c (m32r_upload_command): Use hostent only when
+ * m32r-rom.c (m32r_upload_command): Use hostent only when
gethostname succeeds, in order to avoid a compilation
warning.
* m32r-tdep.c (m32r_store_return_value): Add a cast to remove a
@@ -2039,7 +4271,7 @@ Fri Aug 8 00:28:38 UTC 2003 Brendan Conoboy <blc@redhat.com>
2003-07-30 Michael Snyder <msnyder@redhat.com>
* value.h (value_being_returned): Add a struct_addr argument.
- * infcall.c (call_function_by_hand): Pass struct_addr to
+ * infcall.c (call_function_by_hand): Pass struct_addr to
value_being_returned.
* infcmd.c (print_return_value): Pass zero as struct_addr.
* values.c (value_being_returned): If struct_addr is passed,
@@ -2212,7 +4444,7 @@ Fri Aug 8 00:28:38 UTC 2003 Brendan Conoboy <blc@redhat.com>
2003-07-23 Michal Ludvig <mludvig@suse.cz>
Elena Zannoni <ezannoni@redhat.com>
- * linespec.c (decode_line_2): Avoid crash if
+ * linespec.c (decode_line_2): Avoid crash if
find_function_start_sal() returns empty record.
2003-07-23 Andreas Schwab <schwab@suse.de>
@@ -2248,7 +4480,7 @@ Fri Aug 8 00:28:38 UTC 2003 Brendan Conoboy <blc@redhat.com>
(struct gdbarch_data): Delete member "free".
(register_gdbarch_data): Do not initialize "free".
* gdbarch.h, gdbarch.c: Re-generate.
-
+
2003-07-22 Andrew Cagney <cagney@redhat.com>
* configure.in (build_warnings): Add -Wformat-nonliteral.
@@ -2294,7 +4526,7 @@ Fri Aug 8 00:28:38 UTC 2003 Brendan Conoboy <blc@redhat.com>
2003-07-20 Stephane Carrez <stcarrez@nerim.fr>
- * m68hc11-tdep.c (m68hc11_pseudo_register_read): Use
+ * m68hc11-tdep.c (m68hc11_pseudo_register_read): Use
regcache_cooked_read_unsigned instead of read_register.
(m68hc11_saved_pc_after_call): Likewise.
(m68hc11_pseudo_register_write): Use regcache_cooked_write_unsigned
@@ -2374,7 +4606,7 @@ Fri Aug 8 00:28:38 UTC 2003 Brendan Conoboy <blc@redhat.com>
Update a comment.
Save the computed prev_sp.
(avr_saved_regs_unwinder): Remove function.
- (avr_frame_prev_register): Use PC unwind logic from
+ (avr_frame_prev_register): Use PC unwind logic from
avr_saved_regs_unwinder(), otherwise use trad_frame_prev_register().
2003-07-16 Andrew Cagney <cagney@redhat.com>
@@ -2554,7 +4786,7 @@ Fri Aug 8 00:28:38 UTC 2003 Brendan Conoboy <blc@redhat.com>
2003-07-15 Michal Ludvig <mludvig@suse.cz>
* x86-64-linux-nat.c (regmap): Removed.
- (supply_gregset, fill_gregset): Call
+ (supply_gregset, fill_gregset): Call
x86_64_linux_(fill,supply)_gregset functions.
* x86-64-linux-tdep.c (USER_*): New defines.
(user_to_gdb_regmap, x86_64_core_fns): New structure.
@@ -2631,19 +4863,19 @@ Fri Aug 8 00:28:38 UTC 2003 Brendan Conoboy <blc@redhat.com>
* gdbarch.sh: Simplify predicate methods. Remove need to provide
pre-default. Note: re-generate has no effect.
-
+
2003-07-10 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: When a variable, but not a function, compare against
0. Fix problem in previous patch.
* gdbarch.c: Re-generate.
-
+
2003-07-10 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Use gdb_assert instead of internal_error. Compare
functions against NULL, not 0.
* gdbarch.c: Re-generate.
-
+
2003-07-10 Fred Fish <fnf@ninemoons.com>
* coff-solib.h (SOLIB_LOADED_LIBRARY_PATHNAME): Default to a
@@ -2675,9 +4907,9 @@ Fri Aug 8 00:28:38 UTC 2003 Brendan Conoboy <blc@redhat.com>
* m68klinux-tdep.c (m68k_linux_init_abi): Set struct_return to
reg_struct_return.
-2003-07-09 Joel Brobecker <brobecker@gnat.com>
+2003-07-09 Joel Brobecker <brobecker@gnat.com>
- * somread.c (som_symfile_offsets): Fix compilation error.
+ * somread.c (som_symfile_offsets): Fix compilation error.
2003-07-09 Andrew Cagney <cagney@redhat.com>
diff --git a/gdb/MAINTAINERS b/gdb/MAINTAINERS
index d47dbbc..ecf0df0 100644
--- a/gdb/MAINTAINERS
+++ b/gdb/MAINTAINERS
@@ -85,7 +85,7 @@ maintainer works with the native maintainer when resolving API issues.
h8300 --target=h8300hms ,-Werror
Maintenance only
- h8500 (--target=h8500hms OBSOLETE)
+ h8500 Deleted.
i386 --target=i386-elf ,-Werror
Mark Kettenis kettenis@gnu.org
@@ -96,7 +96,7 @@ maintainer works with the native maintainer when resolving API issues.
(--target=ia64-elf broken)
Kevin Buettner kevinb@redhat.com
- m32r (--target=m32r-elf OBSOLETE)
+ m32r --target=m32r-elf ,-Werror
m68hc11 --target=m68hc11-elf ,-Werror ,
Stephane Carrez stcarrez@nerim.fr
@@ -112,7 +112,7 @@ maintainer works with the native maintainer when resolving API issues.
mips --target=mips-elf ,-Werror
Andrew Cagney cagney@redhat.com
- mn10200 (--target=mn10200-elf OBSOLETE)
+ mn10200 Deleted.
mn10300 --target=mn10300-elf ,-Werror
Maintenance only
@@ -122,7 +122,6 @@ maintainer works with the native maintainer when resolving API issues.
pa (--target=hppa-elf broken)
Maintenance only
- OBSOLETE candidate, not multi-arch
powerpc --target=powerpc-eabi ,-Werror
Kevin Buettner kevinb@redhat.com
@@ -152,7 +151,7 @@ maintainer works with the native maintainer when resolving API issues.
xstormy16 --target=xstormy16-elf ,-Werror
Corinna Vinschen vinschen@redhat.com
- z8k (--target=z8k-coff OBSOLETE)
+ z8k Deleted.
All developers recognized by this file can make arbitrary changes to
OBSOLETE targets.
@@ -200,7 +199,7 @@ GNU/Linux ARM native Scott Bambrough scottb@netwinder.org
Solaris/x86 native & host (devolved)
Peter Schauer Peter.Schauer@regent.e-technik.tu-muenchen.de
Solaris/SPARC native & host (devolved)
- Michael Snyder msnyder@redhat.com
+ (Global Maintainers)
@@ -234,7 +233,7 @@ tracing bytecode stuff Jim Blandy jimb@redhat.com
tracing Michael Snyder msnyder@redhat.com
threads Michael Snyder msnyder@redhat.com
Mark Kettenis kettenis@gnu.org
-breakpoints Michael Snyder msnyder@redhat.com
+breakpoints (Global Maintainers)
language support (Blanket Write Privs Maintainers)
C++ Daniel Jacobowitz dan@debian.org
Java support (Global Maintainers)
@@ -254,7 +253,7 @@ testsuite (Global Maintainers)
lib Fernando Nasser fnasser@redhat.com
Mark Salter msalter@redhat.com
gdbtk (gdb.gdbtk) Keith Seitz keiths@redhat.com
- c++ (gdb.c++) Michael Chastain mec@shout.net
+ 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
@@ -321,7 +320,7 @@ Kevin Buettner kevinb@redhat.com
Andrew Cagney ac131313@redhat.com
David Carlton carlton@kealia.com
Stephane Carrez stcarrez@nerim.fr
-Michael Chastain mec@shout.net
+Michael Chastain mec.gnu@mindspring.com
Eric Christopher echristo@redhat.com
Nick Clifton nickc@redhat.com
Brendan Conoboy blc@redhat.com
@@ -335,6 +334,7 @@ Ben Elliston bje@wasabisystems.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
@@ -399,6 +399,7 @@ D Venkatasubramanian dvenkat@noida.hcltech.com
Corinna Vinschen vinschen@redhat.com
Keith Walker keith.walker@arm.com
Kris Warkentin kewarken@qnx.com
+Jim Wilson wilson@specifixinc.com
Elena Zannoni ezannoni@redhat.com
Eli Zaretskii eliz@gnu.org
@@ -422,7 +423,6 @@ Anthony Green (Java) green at redhat dot com
Folks that have been caught up in a paper trail:
Jim Kingdon jkingdon@engr.sgi.com
-Jim Wilson wilson@specifixinc.com
--
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 270007e..dac5496 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -511,7 +511,9 @@ TARGET_FLAGS_TO_PASS = \
SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
ax-general.c ax-gdb.c \
- bcache.c block.c blockframe.c breakpoint.c buildsym.c \
+ bcache.c \
+ bfd-target.c \
+ block.c blockframe.c breakpoint.c buildsym.c \
c-exp.y c-lang.c c-typeprint.c c-valprint.c \
charset.c cli-out.c coffread.c coff-pe-read.c \
complaints.c completer.c corefile.c \
@@ -576,7 +578,7 @@ coff_sym_h = $(INCLUDE_DIR)/coff/sym.h
coff_symconst_h = $(INCLUDE_DIR)/coff/symconst.h
coff_ecoff_h = $(INCLUDE_DIR)/coff/ecoff.h
coff_internal_h = $(INCLUDE_DIR)/coff/internal.h
-dis_asm_h = $(INCLUDE_DIR)/dis-asm.h
+dis_asm_h = $(INCLUDE_DIR)/dis-asm.h $(bfd_h)
elf_reloc_macros_h = $(INCLUDE_DIR)/elf/reloc-macros.h
elf_sh_h = $(INCLUDE_DIR)/elf/sh.h
elf_arm_h = $(INCLUDE_DIR)/elf/arm.h $(elf_reloc_macros_h)
@@ -588,9 +590,11 @@ demangle_h = $(INCLUDE_DIR)/demangle.h
obstack_h = $(INCLUDE_DIR)/obstack.h
opcode_m68hc11_h = $(INCLUDE_DIR)/opcode/m68hc11.h
readline_h = $(READLINE_SRC)/readline.h
+frv_desc_h = $(OPCODES_SRC)/frv-desc.h
sh_opc_h = $(OPCODES_SRC)/sh-opc.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_sh_h = $(INCLUDE_DIR)/gdb/sim-sh.h
splay_tree_h = $(INCLUDE_DIR)/splay-tree.h
@@ -634,6 +638,7 @@ arm_tdep_h = arm-tdep.h
ax_gdb_h = ax-gdb.h
ax_h = ax.h $(doublest_h)
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)
buildsym_h = buildsym.h
@@ -662,6 +667,7 @@ dwarf2loc_h = dwarf2loc.h
environ_h = environ.h
event_loop_h = event-loop.h
event_top_h = event-top.h
+exec_h = exec.h $(target_h)
expression_h = expression.h $(symtab_h) $(doublest_h)
f_lang_h = f-lang.h
frame_base_h = frame-base.h
@@ -686,6 +692,7 @@ gdbthread_h = gdbthread.h $(breakpoint_h) $(frame_h)
gdbtypes_h = gdbtypes.h
gdb_vfork_h = gdb_vfork.h
gdb_wait_h = gdb_wait.h
+glibc_tdep_h = glibc-tdep.h
gnu_nat_h = gnu-nat.h
gregset_h = gregset.h
hppa_tdep_h = hppa-tdep.h
@@ -730,6 +737,7 @@ ppc_tdep_h = ppc-tdep.h
proc_utils_h = proc-utils.h
regcache_h = regcache.h
reggroups_h = reggroups.h
+regset_h = regset.h
remote_fileio_h = remote-fileio.h
remote_h = remote.h
remote_utils_h = remote-utils.h $(target_h)
@@ -865,8 +873,10 @@ TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
$(SUBDIR_CLI_SRCS)
TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
-COMMON_OBS = version.o block.o blockframe.o breakpoint.o findvar.o regcache.o \
- charset.o dictionary.o disasm.o dummy-frame.o \
+COMMON_OBS = version.o \
+ bfd-target.o \
+ blockframe.o breakpoint.o findvar.o regcache.o \
+ charset.o disasm.o dummy-frame.o \
source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \
block.o symtab.o symfile.o symmisc.o linespec.o dictionary.o \
infcall.o \
@@ -1259,12 +1269,13 @@ ALLDEPFILES = \
coff-solib.c \
core-sol2.c core-regset.c core-aout.c corelow.c \
dcache.c delta68-nat.c dpx2-nat.c exec.c fork-child.c \
- go32-nat.c h8300-tdep.c h8500-tdep.c \
+ glibc-tdep.c \
+ go32-nat.c h8300-tdep.c \
hppa-tdep.c hppa-hpux-tdep.c \
hppab-nat.c hppah-nat.c hpread.c \
i386-tdep.c i386b-nat.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 \
+ i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \
i387-tdep.c \
i386-linux-tdep.c i386-nat.c \
i386gnu-nat.c i386gnu-tdep.c \
@@ -1286,7 +1297,7 @@ ALLDEPFILES = \
ppcnbsd-nat.o ppcnbsd-tdep.o \
procfs.c \
remote-e7000.c \
- remote-hms.c remote-mips.c \
+ remote-hms.c remote-m32r-sdi.c remote-mips.c \
remote-rdp.c remote-sim.c \
remote-st.c remote-utils.c dcache.c \
remote-vx.c \
@@ -1303,8 +1314,7 @@ ALLDEPFILES = \
vx-share/xdr_ld.c vx-share/xdr_ptrace.c vx-share/xdr_rdb.c \
win32-nat.c \
xcoffread.c xcoffsolib.c \
- xstormy16-tdep.c \
- z8k-tdep.c
+ xstormy16-tdep.c
# Some files need explict build rules (due to -Werror problems) or due
# to sub-directory fun 'n' games.
@@ -1362,13 +1372,6 @@ v850ice.o: $(srcdir)/v850ice.c
valprint.o: $(srcdir)/valprint.c
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $(srcdir)/valprint.c
-# FIXME: z8k-tdep.c calls _initialize_gdbtypes(). Since that isn't
-# declared -Wimplicit fails. It should be using the GDBARCH framework.
-# cagney 1999-09-02.
-z8k-tdep.o: $(srcdir)/z8k-tdep.c
- $(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) \
- $(srcdir)/z8k-tdep.c
-
#
# YACC/LEX dependencies
#
@@ -1561,20 +1564,27 @@ alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_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)
+amd64bsd-nat.o: amd64bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
+ $(gdb_assert_h) $(x86_64_tdep_h) $(amd64_nat_h)
amd64fbsd-nat.o: amd64fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(gdb_assert_h) $(gregset_h) $(x86_64_tdep_h) $(amd64_nat_h)
+amd64nbsd-nat.o: amd64nbsd-nat.c $(defs_h) $(gdb_assert_h) \
+ $(x86_64_tdep_h) $(amd64_nat_h)
amd64fbsd-tdep.o: amd64fbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
$(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \
$(x86_64_tdep_h)
+amd64nbsd-tdep.o: amd64nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
+ $(gdbcore_h) $(osabi_h) $(gdb_assert_h) $(nbsd_tdep_h) \
+ $(x86_64_tdep_h)
amd64-nat.o: amd64-nat.c $(defs_h) $(gdbarch_h) $(regcache_h) \
$(gdb_assert_h) $(i386_tdep_h) $(x86_64_tdep_h)
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) $(gdbcmd_h) \
- $(inferior_h) $(gdb_string_h) $(regcache_h) $(gdb_assert_h) \
- $(sim_regno_h) $(version_h) $(floatformat_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) $(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)
+ $(gdb_string_h) $(regcache_h) $(arm_tdep_h) $(glibc_tdep_h) $(gregset_h)
arm-linux-tdep.o: arm-linux-tdep.c $(defs_h) $(target_h) $(value_h) \
$(gdbtypes_h) $(floatformat_h) $(gdbcore_h) $(frame_h) $(regcache_h) \
$(doublest_h) $(solib_svr4_h) $(osabi_h) $(arm_tdep_h) $(symtab_h) \
@@ -1598,7 +1608,10 @@ ax-gdb.o: ax-gdb.c $(defs_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) \
$(target_h) $(ax_h) $(ax_gdb_h) $(gdb_string_h) $(block_h) \
$(regcache_h)
ax-general.o: ax-general.c $(defs_h) $(ax_h) $(value_h) $(gdb_string_h)
-bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) $(gdb_string_h)
+bcache.o: bcache.c $(defs_h) $(gdb_obstack_h) $(bcache_h) \
+ $(gdb_string_h) $(gdb_assert_h)
+bfd-target.o: bfd-target.c $(defs_h) $(target_h) $(bfd_target_h) \
+ $(gdb_assert_h) $(gdb_string_h)
block.o: block.c $(defs_h) $(block_h) $(symtab_h) $(symfile_h) \
$(gdb_obstack_h) $(cp_support_h)
blockframe.o: blockframe.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
@@ -1638,7 +1651,8 @@ coff-solib.o: coff-solib.c $(defs_h) $(frame_h) $(bfd_h) $(gdbcore_h) \
complaints.o: complaints.c $(defs_h) $(complaints_h) $(gdb_assert_h) \
$(command_h) $(gdbcmd_h)
completer.o: completer.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
- $(filenames_h) $(cli_decode_h) $(gdbcmd_h) $(completer_h)
+ $(filenames_h) $(cli_decode_h) $(gdbcmd_h) $(completer_h) \
+ $(language_h)
copying.o: copying.c $(defs_h) $(command_h) $(gdbcmd_h)
core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(regcache_h) \
$(gdb_dirent_h) $(gdb_stat_h)
@@ -1647,7 +1661,7 @@ corefile.o: corefile.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symtab_h) \
$(dis_asm_h) $(gdb_stat_h) $(completer_h)
corelow.o: corelow.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
$(symtab_h) $(command_h) $(bfd_h) $(target_h) $(gdbcore_h) \
- $(gdbthread_h) $(regcache_h) $(symfile_h)
+ $(gdbthread_h) $(regcache_h) $(symfile_h) $(exec_h)
core-regset.o: core-regset.c $(defs_h) $(command_h) $(gdbcore_h) \
$(inferior_h) $(target_h) $(gdb_string_h) $(gregset_h)
core-sol2.o: core-sol2.c $(defs_h) $(gdb_string_h) $(regcache_h) \
@@ -1675,8 +1689,8 @@ c-typeprint.o: c-typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
$(language_h) $(demangle_h) $(c_lang_h) $(typeprint_h) $(cp_abi_h) \
$(gdb_string_h)
c-valprint.o: c-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
- $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \
- $(c_lang_h) $(cp_abi_h)
+ $(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) \
+ $(language_h) $(c_lang_h) $(cp_abi_h) $(target_h)
d10v-tdep.o: d10v-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
$(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \
$(gdb_string_h) $(value_h) $(inferior_h) $(dis_asm_h) $(symfile_h) \
@@ -1689,7 +1703,7 @@ 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) $(symfile_h) $(objfiles_h) $(buildsym_h) $(stabsread_h) \
$(gdb_stabs_h) $(demangle_h) $(language_h) $(complaints_h) \
- $(cp_abi_h) $(aout_aout64_h) $(aout_stab_gnu_h) $(gdb_assert_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)
@@ -1735,7 +1749,8 @@ elfread.o: elfread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(elf_bfd_h) \
environ.o: environ.c $(defs_h) $(environ_h) $(gdb_string_h)
eval.o: eval.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(value_h) $(expression_h) $(target_h) $(frame_h) $(language_h) \
- $(f_lang_h) $(cp_abi_h) $(infcall_h) $(objc_lang_h) $(block_h)
+ $(f_lang_h) $(cp_abi_h) $(infcall_h) $(objc_lang_h) $(block_h) \
+ $(parser_defs_h)
event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \
$(gdb_string_h)
event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \
@@ -1743,7 +1758,8 @@ event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \
$(gdbcmd_h)
exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \
$(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \
- $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) $(xcoffsolib_h)
+ $(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) $(xcoffsolib_h) \
+ $(exec_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)
@@ -1769,15 +1785,17 @@ frame-unwind.o: frame-unwind.c $(defs_h) $(frame_h) $(frame_unwind_h) \
$(gdb_assert_h) $(dummy_frame_h)
frv-tdep.o: frv-tdep.c $(defs_h) $(gdb_string_h) $(inferior_h) $(symfile_h) \
$(gdbcore_h) $(arch_utils_h) $(regcache_h) $(frame_h) \
- $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(dis_asm_h)
+ $(frame_unwind_h) $(frame_base_h) $(trad_frame_h) $(dis_asm_h) \
+ $(gdb_assert_h) $(sim_regno_h) $(gdb_sim_frv_h) $(frv_desc_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)
f-valprint.o: f-valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(value_h) $(valprint_h) $(language_h) \
$(f_lang_h) $(frame_h) $(gdbcore_h) $(command_h) $(block_h)
-gcore.o: gcore.c $(defs_h) $(cli_decode_h) $(inferior_h) $(gdbcore_h) \
- $(elf_bfd_h) $(symfile_h) $(objfiles_h) $(infcall_h)
+gcore.o: gcore.c $(defs_h) $(elf_bfd_h) $(infcall_h) $(inferior_h) \
+ $(gdbcore_h) $(objfiles_h) $(symfile_h) $(cli_decode_h) \
+ $(gdb_assert_h)
gdbarch.o: gdbarch.c $(defs_h) $(arch_utils_h) $(gdbcmd_h) $(inferior_h) \
$(symcat_h) $(floatformat_h) $(gdb_assert_h) $(gdb_string_h) \
$(gdb_events_h) $(reggroups_h) $(osabi_h) $(symfile_h) \
@@ -1804,7 +1822,6 @@ go32-nat.o: go32-nat.c $(defs_h) $(inferior_h) $(gdb_wait_h) $(gdbcore_h) \
h8300-tdep.o: h8300-tdep.c $(defs_h) $(value_h) $(inferior_h) $(symfile_h) \
$(arch_utils_h) $(regcache_h) $(gdbcore_h) $(objfiles_h) $(gdbcmd_h) \
$(gdb_assert_h) $(dis_asm_h)
-# OBSOLETE h8500-tdep.o: h8500-tdep.c
hpacc-abi.o: hpacc-abi.c $(defs_h) $(value_h) $(gdb_regex_h) $(gdb_string_h) \
$(gdbtypes_h) $(gdbcore_h) $(cp_abi_h)
hppab-nat.o: hppab-nat.c $(defs_h) $(inferior_h) $(target_h) $(regcache_h)
@@ -1816,10 +1833,9 @@ hppam3-nat.o: hppam3-nat.c $(defs_h) $(inferior_h) $(floatformat_h) \
$(regcache_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) $(symtab_h) $(infcall_h) \
+ $(gdb_assert_h) $(infttrace_h) $(symtab_h) $(infcall_h) $(dis_asm_h) \
$(a_out_encap_h) $(gdb_stat_h) $(gdb_wait_h) $(gdbcore_h) \
- $(gdbcmd_h) $(target_h) $(symfile_h) $(objfiles_h) $(hppa_tdep_h) \
- $(dis_asm_h)
+ $(gdbcmd_h) $(target_h) $(symfile_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) \
@@ -1835,6 +1851,8 @@ 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)
+i386fbsd-tdep.o: i386fbsd-tdep.c $(defs_h) $(arch_utils_h) $(osabi_h) \
+ $(i386_tdep_h) $(i387_tdep_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)
@@ -1852,7 +1870,7 @@ i386-linux-nat.o: i386-linux-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) \
i386-linux-tdep.o: i386-linux-tdep.c $(defs_h) $(gdbcore_h) $(frame_h) \
$(value_h) $(regcache_h) $(inferior_h) $(reggroups_h) $(symtab_h) \
$(symfile_h) $(objfiles_h) $(solib_svr4_h) $(osabi_h) $(i386_tdep_h) \
- $(i386_linux_tdep_h)
+ $(i386_linux_tdep_h) $(glibc_tdep_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)
@@ -1872,9 +1890,9 @@ i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \
$(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(floatformat_h) \
$(frame_h) $(frame_base_h) $(frame_unwind_h) $(inferior_h) \
$(gdbcmd_h) $(gdbcore_h) $(objfiles_h) $(osabi_h) $(regcache_h) \
- $(reggroups_h) $(symfile_h) $(symtab_h) $(target_h) $(value_h) \
- $(dis_asm_h) $(gdb_assert_h) $(gdb_string_h) $(i386_tdep_h) \
- $(i387_tdep_h)
+ $(reggroups_h) $(regset_h) $(symfile_h) $(symtab_h) $(target_h) \
+ $(value_h) $(dis_asm_h) $(gdb_assert_h) $(gdb_string_h) \
+ $(i386_tdep_h) $(i387_tdep_h)
i386v4-nat.o: i386v4-nat.c $(defs_h) $(value_h) $(inferior_h) $(regcache_h) \
$(i386_tdep_h) $(i387_tdep_h) $(gregset_h)
i386v-nat.o: i386v-nat.c $(defs_h) $(frame_h) $(inferior_h) $(language_h) \
@@ -1924,8 +1942,6 @@ infttrace.o: infttrace.c $(defs_h) $(frame_h) $(inferior_h) $(target_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)
-irix4-nat.o: irix4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) \
- $(gregset_h)
irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
$(regcache_h) $(gdb_string_h) $(gregset_h)
jv-lang.o: jv-lang.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
@@ -1973,8 +1989,7 @@ m32r-tdep.o: m32r-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
$(frame_base_h) $(symtab_h) $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) \
$(gdb_string_h) $(value_h) $(inferior_h) $(symfile_h) $(objfiles_h) \
$(language_h) $(arch_utils_h) $(regcache_h) $(trad_frame_h) \
- $(gdb_assert_h)
-# OBSOLETE m3-nat.o: m3-nat.c
+ $(gdb_assert_h) $(dis_asm_h)
m68hc11-tdep.o: m68hc11-tdep.c $(defs_h) $(frame_h) $(frame_unwind_h) \
$(frame_base_h) $(dwarf2_frame_h) $(trad_frame_h) $(symtab_h) \
$(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(gdb_string_h) $(value_h) \
@@ -1993,10 +2008,11 @@ 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-stub.o: m68k-stub.c
-m68k-tdep.o: m68k-tdep.c $(defs_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)
+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)
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) \
@@ -2034,7 +2050,6 @@ mips-linux-nat.o: mips-linux-nat.c $(defs_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)
-# OBSOLETE mipsm3-nat.o: mipsm3-nat.c
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)
@@ -2053,7 +2068,6 @@ mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \
$(elf_bfd_h) $(symcat_h) $(sim_regno_h) $(dis_asm_h)
mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
$(regcache_h) $(gregset_h)
-# OBSOLETE mn10200-tdep.o: mn10200-tdep.c
mn10300-tdep.o: mn10300-tdep.c $(defs_h) $(frame_h) $(inferior_h) \
$(target_h) $(value_h) $(bfd_h) $(gdb_string_h) $(gdbcore_h) \
$(symfile_h) $(regcache_h) $(arch_utils_h) $(gdb_assert_h) \
@@ -2098,7 +2112,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)
+ $(regcache_h) $(exec_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) \
@@ -2125,7 +2139,8 @@ 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)
ppc-sysv-tdep.o: ppc-sysv-tdep.c $(defs_h) $(gdbcore_h) $(inferior_h) \
- $(regcache_h) $(value_h) $(gdb_string_h) $(ppc_tdep_h)
+ $(regcache_h) $(value_h) $(gdb_string_h) $(gdb_assert_h) \
+ $(ppc_tdep_h) $(target_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) \
@@ -2169,6 +2184,8 @@ remote-fileio.o: remote-fileio.c $(defs_h) $(gdb_string_h) $(gdbcmd_h) \
$(remote_fileio_h)
remote-hms.o: remote-hms.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(regcache_h)
+remote-m32r-sdi.o: remote-m32r-sdi.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) \
+ $(inferior_h) $(target_h) $(regcache_h) $(gdb_string_h) $(serial_h)
remote-mips.o: remote-mips.c $(defs_h) $(inferior_h) $(bfd_h) $(symfile_h) \
$(gdbcmd_h) $(gdbcore_h) $(serial_h) $(target_h) $(remote_utils_h) \
$(gdb_string_h) $(gdb_stat_h) $(regcache_h)
@@ -2252,22 +2269,23 @@ ser-unix.o: ser-unix.c $(defs_h) $(serial_h) $(ser_unix_h) $(terminal_h) \
sh3-rom.o: sh3-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(srec_h) $(arch_utils_h) $(regcache_h) $(gdb_string_h) \
$(sh_tdep_h)
+sh64-tdep.o: sh64-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \
+ $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \
+ $(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \
+ $(regcache_h) $(doublest_h) $(osabi_h) $(elf_bfd_h) $(solib_svr4_h) \
+ $(elf_sh_h) $(gdb_sim_sh_h)
shnbsd-nat.o: shnbsd-nat.c $(defs_h) $(inferior_h) $(sh_tdep_h) \
$(shnbsd_tdep_h)
shnbsd-tdep.o: shnbsd-tdep.c $(defs_h) $(gdbcore_h) $(regcache_h) $(value_h) \
$(osabi_h) $(solib_svr4_h) $(nbsd_tdep_h) $(sh_tdep_h) \
$(shnbsd_tdep_h)
sh-stub.o: sh-stub.c
-sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \
- $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \
- $(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \
- $(regcache_h) $(doublest_h) $(osabi_h) $(sh_tdep_h) $(elf_bfd_h) \
- $(solib_svr4_h) $(elf_sh_h) $(gdb_sim_sh_h)
-sh64-tdep.o: sh64-tdep.c $(defs_h) $(frame_h) $(symtab_h) $(symfile_h) \
- $(gdbtypes_h) $(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) \
- $(inferior_h) $(gdb_string_h) $(arch_utils_h) $(floatformat_h) \
- $(regcache_h) $(doublest_h) $(osabi_h) $(elf_bfd_h) \
- $(solib_svr4_h) $(elf_sh_h) $(gdb_sim_sh_h)
+sh-tdep.o: sh-tdep.c $(defs_h) $(frame_h) $(frame_base_h) $(frame_unwind_h) \
+ $(dwarf2_frame_h) $(symtab_h) $(symfile_h) $(gdbtypes_h) $(gdbcmd_h) \
+ $(gdbcore_h) $(value_h) $(dis_asm_h) $(inferior_h) $(gdb_string_h) \
+ $(gdb_assert_h) $(arch_utils_h) $(floatformat_h) $(regcache_h) \
+ $(doublest_h) $(osabi_h) $(sh_tdep_h) $(elf_bfd_h) $(solib_svr4_h) \
+ $(elf_sh_h) $(gdb_sim_sh_h)
solib-aix5.o: solib-aix5.c $(defs_h) $(gdb_string_h) $(elf_external_h) \
$(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(gdbcore_h) \
$(command_h) $(target_h) $(frame_h) $(gdb_regex_h) $(inferior_h) \
@@ -2275,7 +2293,7 @@ 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) $(solist_h)
+ $(completer_h) $(filenames_h) $(solist_h) $(exec_h)
solib-irix.o: solib-irix.c $(defs_h) $(symtab_h) $(bfd_h) $(symfile_h) \
$(objfiles_h) $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h)
solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) $(solib_svr4_h)
@@ -2286,17 +2304,18 @@ solib-sunos.o: solib-sunos.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) \
$(bcache_h) $(regcache_h)
solib-svr4.o: solib-svr4.c $(defs_h) $(elf_external_h) $(elf_common_h) \
$(elf_mips_h) $(symtab_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
- $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) $(solib_svr4_h)
+ $(gdbcore_h) $(target_h) $(inferior_h) $(solist_h) $(solib_svr4_h) \
+ $(bfd_target_h) $(exec_h)
sol-thread.o: sol-thread.c $(defs_h) $(gdbthread_h) $(target_h) \
$(inferior_h) $(gdb_stat_h) $(gdbcmd_h) $(gdbcore_h) $(regcache_h) \
- $(symfile_h) $(gregset_h)
+ $(symfile_h) $(gdb_string_h) $(gregset_h)
somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
$(objfiles_h) $(buildsym_h) $(stabsread_h) $(gdb_stabs_h) \
$(complaints_h) $(gdb_string_h) $(demangle_h) $(som_h) $(libhppa_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)
+ $(regcache_h) $(gdb_assert_h) $(exec_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) \
@@ -2314,12 +2333,8 @@ sparc64-tdep.o: sparc64-tdep.c $(defs_h) $(arch_utils_h) $(floatformat_h) \
$(gdb_assert_h) $(gdb_string_h) $(sparc64_tdep_h)
sparcbsd-nat.o: sparcbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(sparc64_tdep_h) $(sparcbsd_nat_h)
-# OBSOLETE sparclet-rom.o: sparclet-rom.c
-# OBSOLETE sparclet-stub.o: sparclet-stub.c
sparc-linux-nat.o: sparc-linux-nat.c $(defs_h) $(regcache_h) $(sparc_tdep_h) \
$(gregset_h)
-# OBSOLETE sparcl-stub.o: sparcl-stub.c
-# OBSOLETE sparcl-tdep.o: sparcl-tdep.c
sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
$(regcache_h) $(sparc_tdep_h) $(gdb_wait_h)
sparcnbsd-nat.o: sparcnbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
@@ -2341,7 +2356,7 @@ stack.o: stack.c $(defs_h) $(gdb_string_h) $(value_h) $(symtab_h) \
$(gdbtypes_h) $(expression_h) $(language_h) $(frame_h) $(gdbcmd_h) \
$(gdbcore_h) $(target_h) $(source_h) $(breakpoint_h) $(demangle_h) \
$(inferior_h) $(annotate_h) $(ui_out_h) $(block_h) $(stack_h) \
- $(gdb_assert_h) $(dictionary_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) \
@@ -2359,8 +2374,6 @@ 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) \
$(dictionary_h) $(gdb_string_h)
-# OBSOLETE symm-nat.o: symm-nat.c
-# OBSOLETE symm-tdep.o: symm-tdep.c
symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
$(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \
$(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \
@@ -2370,7 +2383,8 @@ symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
$(cp_support_h)
target.o: target.c $(defs_h) $(gdb_string_h) $(target_h) $(gdbcmd_h) \
$(symtab_h) $(inferior_h) $(bfd_h) $(symfile_h) $(objfiles_h) \
- $(gdb_wait_h) $(dcache_h) $(regcache_h)
+ $(gdb_wait_h) $(dcache_h) $(regcache_h) $(gdb_assert_h) \
+ $(gdbcore_h)
thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \
$(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(command_h) \
$(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) $(ui_out_h)
@@ -2406,6 +2420,8 @@ utils.o: utils.c $(defs_h) $(gdb_assert_h) $(gdb_string_h) $(event_top_h) \
$(filenames_h) $(inferior_h) $(mmalloc_h)
uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \
$(regcache_h) $(gregset_h)
+glibc-tdep.o: glibc-tdep.c $(defs_h) $(frame_h) $(symtab_h) \
+ $(symfile_h) $(objfiles_h) $(glibc_tdep_h)
v850ice.o: v850ice.c $(defs_h) $(gdb_string_h) $(frame_h) $(symtab_h) \
$(inferior_h) $(breakpoint_h) $(symfile_h) $(target_h) $(objfiles_h) \
$(gdbcore_h) $(value_h) $(command_h) $(regcache_h)
@@ -2418,7 +2434,8 @@ valarith.o: valarith.c $(defs_h) $(value_h) $(symtab_h) $(gdbtypes_h) \
valops.o: valops.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(value_h) $(frame_h) \
$(inferior_h) $(gdbcore_h) $(target_h) $(demangle_h) $(language_h) \
$(gdbcmd_h) $(regcache_h) $(cp_abi_h) $(block_h) $(infcall_h) \
- $(dictionary_h) $(cp_support_h) $(gdb_string_h) $(gdb_assert_h)
+ $(dictionary_h) $(cp_support_h) $(gdb_string_h) $(gdb_assert_h) \
+ $(cp_support_h)
valprint.o: valprint.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
$(value_h) $(gdbcore_h) $(gdbcmd_h) $(target_h) $(language_h) \
$(annotate_h) $(valprint_h) $(floatformat_h) $(doublest_h)
@@ -2433,10 +2450,10 @@ vax-tdep.o: vax-tdep.c $(defs_h) $(symtab_h) $(opcode_vax_h) $(gdbcore_h) \
$(gdb_string_h) $(osabi_h) $(dis_asm_h) $(vax_tdep_h)
w89k-rom.o: w89k-rom.c $(defs_h) $(gdbcore_h) $(target_h) $(monitor_h) \
$(serial_h) $(xmodem_h) $(regcache_h)
-win32-nat.o: win32-nat.c $(defs_h) $(tm_h) $(frame_h) $(inferior_h) \
- $(target_h) $(gdbcore_h) $(command_h) $(completer_h) $(regcache_h) \
- $(top_h) $(i386_tdep_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
- $(gdb_string_h) $(gdbthread_h) $(gdbcmd_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) \
+ $(i386_tdep_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
+ $(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(exec_h)
wince.o: wince.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcore_h) \
$(command_h) $(buildsym_h) $(symfile_h) $(objfiles_h) \
$(gdb_string_h) $(gdbthread_h) $(gdbcmd_h) $(wince_stub_h) \
@@ -2453,7 +2470,8 @@ x86-64-linux-tdep.o: x86-64-linux-tdep.c $(defs_h) $(inferior_h) \
x86-64-tdep.o: x86-64-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) \
- $(symfile_h) $(gdb_assert_h) $(x86_64_tdep_h) $(i387_tdep_h)
+ $(regset_h) $(symfile_h) $(gdb_assert_h) $(x86_64_tdep_h) \
+ $(i387_tdep_h)
xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \
$(coff_internal_h) $(libcoff_h) $(coff_xcoff_h) $(libxcoff_h) \
$(coff_rs6000_h) $(symtab_h) $(gdbtypes_h) $(symfile_h) \
@@ -2465,7 +2483,6 @@ xmodem.o: xmodem.c $(defs_h) $(serial_h) $(target_h) $(xmodem_h)
xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(value_h) $(inferior_h) \
$(symfile_h) $(arch_utils_h) $(regcache_h) $(gdbcore_h) \
$(objfiles_h) $(dis_asm_h)
-# OBSOLETE z8k-tdep.o: z8k-tdep.c
#
# gdb/cli/ dependencies
diff --git a/gdb/NEWS b/gdb/NEWS
index 1a2784a..e5bc43d 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -3,6 +3,14 @@
*** Changes since GDB 6.0:
+* New native configurations
+
+NetBSD/amd64 x86_64-*-netbsd*
+
+* New debugging protocols
+
+M32R with SDI protocol m32r-*-elf*
+
* "set prompt-escape-char" command deleted.
The command "set prompt-escape-char" has been deleted. This command,
@@ -13,9 +21,83 @@ tested, nor mentioned in the NEWS file.
SGI Irix-4.x mips-sgi-irix4 or iris4
SGI Iris (MIPS) running Irix V3: mips-sgi-irix or iris
+Z8000 simulator z8k-zilog-none or z8ksim
+Matsushita MN10200 w/simulator mn10200-*-*
+H8/500 simulator h8500-hitachi-hms or h8500hms
+HP/PA running BSD hppa*-*-bsd*
+HP/PA running OSF/1 hppa*-*-osf*
+HP/PA Pro target hppa*-*-pro*
+PMAX (MIPS) running Mach 3.0 mips*-*-mach3*
+Sequent family i[3456]86-sequent-sysv4*
+ i[3456]86-sequent-sysv*
+ i[3456]86-sequent-bsd*
+Tsqware Sparclet sparclet-*-*
+Fujitsu SPARClite sparclite-fujitsu-none or sparclite
*** Changes in GDB 6.0:
+* Objective-C
+
+Support for debugging the Objective-C programming language has been
+integrated into GDB.
+
+* New backtrace mechanism (includes DWARF 2 Call Frame Information).
+
+DWARF 2's Call Frame Information makes available compiler generated
+information that more exactly describes the program's run-time stack.
+By using this information, GDB is able to provide more robust stack
+backtraces.
+
+The i386, amd64 (nee, x86-64), Alpha, m68hc11, ia64, and m32r targets
+have been updated to use a new backtrace mechanism which includes
+DWARF 2 CFI support.
+
+* Hosted file I/O.
+
+GDB's remote protocol has been extended to include support for hosted
+file I/O (where the remote target uses GDB's file system). See GDB's
+remote protocol documentation for details.
+
+* All targets using the new architecture framework.
+
+All of GDB's targets have been updated to use the new internal
+architecture framework. The way is now open for future GDB releases
+to include cross-architecture native debugging support (i386 on amd64,
+ppc32 on ppc64).
+
+* GNU/Linux's Thread Local Storage (TLS)
+
+GDB now includes support for for the GNU/Linux implementation of
+per-thread variables.
+
+* GNU/Linux's Native POSIX Thread Library (NPTL)
+
+GDB's thread code has been updated to work with either the new
+GNU/Linux NPTL thread library or the older "LinuxThreads" library.
+
+* Separate debug info.
+
+GDB, in conjunction with BINUTILS, now supports a mechanism for
+automatically loading debug information from a separate file. Instead
+of shipping full debug and non-debug versions of system libraries,
+system integrators can now instead ship just the stripped libraries
+and optional debug files.
+
+* DWARF 2 Location Expressions
+
+DWARF 2 Location Expressions allow the compiler to more completely
+describe the location of variables (even in optimized code) to the
+debugger.
+
+GDB now includes preliminary support for location expressions (support
+for DW_OP_piece is still missing).
+
+* Java
+
+A number of long standing bugs that caused GDB to die while starting a
+Java application have been fixed. GDB's Java support is now
+considered "useable".
+
* GNU/Linux support for fork, vfork, and exec.
The "catch fork", "catch exec", "catch vfork", and "set follow-fork-mode"
@@ -67,7 +149,7 @@ FreeBSD/amd64 x86_64-*-freebsd*
* Multi-arched targets.
HP/PA HPUX11 hppa*-*-hpux*
-Mitsubishi M32R/D w/simulator m32r-*-elf*
+Renesas M32R/D w/simulator m32r-*-elf*
* OBSOLETE configurations and files
diff --git a/gdb/PROBLEMS b/gdb/PROBLEMS
index 7480633..cf60d53 100644
--- a/gdb/PROBLEMS
+++ b/gdb/PROBLEMS
@@ -3,6 +3,26 @@
See also: http://www.gnu.org/software/gdb/bugs/
+mips*-*-*
+powerpc*-*-*
+sparc*-*-*
+
+GDB's SPARC, MIPS and PowerPC targets, in 6.0, have not been updated
+to use the new frame mechanism.
+
+People encountering problems with these targets should consult GDB's
+web pages and mailing lists (http://www.gnu.org/software/gdb/) to see
+if there is an update.
+
+arm-*-*
+
+GDB's ARM target, in 6.0, has not been updated to use the new frame
+mechanism.
+
+Fortunately the ARM target, in the GDB's mainline sources, has been
+updated so people encountering problems should consider downloading a
+more current GDB (http://www.gnu.org/software/gdb/current).
+
gdb/1091: Constructor breakpoints ignored
gdb/1193: g++ 3.3 creates multiple constructors: gdb 5.3 can't set breakpoints
diff --git a/gdb/README b/gdb/README
index bae1a2e..d2fb8ab 100644
--- a/gdb/README
+++ b/gdb/README
@@ -462,9 +462,9 @@ Linux.
There are a number of remote interfaces for talking to existing ROM
monitors and other hardware:
- remote-e7000.c Hitachi E7000 ICE
+ remote-e7000.c Renesas E7000 ICE
remote-est.c EST emulator
- remote-hms.c Hitachi Micro Systems H8/300 monitor
+ remote-hms.c Renesas Micro Systems H8/300 monitor
remote-mips.c MIPS remote debugging protocol
remote-rdi.c ARM with Angel monitor
remote-rdp.c ARM with Demon monitor
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 13d393d..4ebbf44 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -8036,6 +8036,7 @@ const struct language_defn ada_language_defn = {
1, /* c-style arrays (FIXME?) */
0, /* String lower bound (FIXME?) */
&builtin_type_ada_char,
+ default_word_break_characters,
LANG_MAGIC
};
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index da75f21..18ee0b1 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -852,7 +852,7 @@ pd_enable (void)
return;
/* Check application word size. */
- arch64 = REGISTER_RAW_SIZE (0) == 8;
+ arch64 = DEPRECATED_REGISTER_RAW_SIZE (0) == 8;
/* Check whether the application is pthreaded. */
stub_name = NULL;
@@ -1281,7 +1281,7 @@ 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) == REGISTER_RAW_SIZE (PC_REGNUM));
+ gdb_assert (sizeof (*iar) == DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM));
if (register_cached (PC_REGNUM))
regcache_collect (PC_REGNUM, iar);
@@ -1316,7 +1316,7 @@ 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) == REGISTER_RAW_SIZE (PC_REGNUM));
+ gdb_assert (sizeof (*iar) == DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM));
if (register_cached (PC_REGNUM))
regcache_collect (PC_REGNUM, iar);
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index ddf2744..325cf19 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -1136,11 +1136,6 @@ alpha_heuristic_frame_this_id (struct frame_info *next_frame,
struct alpha_heuristic_unwind_cache *info
= alpha_heuristic_frame_unwind_cache (next_frame, this_prologue_cache, 0);
- /* This is meant to halt the backtrace at "_start". Make sure we
- don't halt it at a generic dummy frame. */
- if (deprecated_inside_entry_file (info->start_pc))
- return;
-
*this_id = frame_id_build (info->vfp, info->start_pc);
}
diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h
index 9afe7be..828a3c6 100644
--- a/gdb/alpha-tdep.h
+++ b/gdb/alpha-tdep.h
@@ -23,8 +23,9 @@
#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; REGISTER_RAW_SIZE is the
- real way to know how big a register is. */
+ 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 ALPHA_REGISTER_SIZE 8
/* Number of machine registers. */
diff --git a/gdb/amd64fbsd-nat.c b/gdb/amd64fbsd-nat.c
index ed2d39b..2354fa3 100644
--- a/gdb/amd64fbsd-nat.c
+++ b/gdb/amd64fbsd-nat.c
@@ -129,7 +129,7 @@ fill_gregset (gregset_t *gregsetp, int regnum)
void
supply_fpregset (fpregset_t *fpregsetp)
{
- x86_64_supply_fxsave ((const char *) fpregsetp, -1);
+ x86_64_supply_fxsave (current_regcache, -1, fpregsetp);
}
/* Fill register REGNUM (if it is a floating-point register) in
@@ -141,77 +141,6 @@ fill_fpregset (fpregset_t *fpregsetp, int regnum)
{
x86_64_fill_fxsave ((char *) fpregsetp, regnum);
}
-
-/* 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 || amd64_native_gregset_supplies_p (regnum))
- {
- struct reg regs;
-
- if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &regs, 0) == -1)
- perror_with_name ("Couldn't get registers");
-
- amd64_supply_native_gregset (current_regcache, &regs, -1);
- if (regnum != -1)
- return;
- }
-
- if (regnum == -1 || regnum >= FP0_REGNUM)
- {
- struct fpreg fpregs;
-
- if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
- perror_with_name ("Couldn't get floating point status");
-
- x86_64_supply_fxsave ((const char *) &fpregs, -1);
- }
-}
-
-/* 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 || amd64_native_gregset_supplies_p (regnum))
- {
- struct reg regs;
-
- if (ptrace (PT_GETREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &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)
- perror_with_name ("Couldn't write registers");
-
- if (regnum != -1)
- return;
- }
-
- if (regnum == -1 || regnum >= FP0_REGNUM)
- {
- struct fpreg fpregs;
-
- if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
- perror_with_name ("Couldn't get floating point status");
-
- x86_64_fill_fxsave ((char *) &fpregs, regnum);
-
- if (ptrace (PT_SETFPREGS, PIDGET (inferior_ptid),
- (PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
- perror_with_name ("Couldn't write floating point status");
- }
-}
/* Provide a prototype to silence -Wmissing-prototypes. */
diff --git a/gdb/amd64fbsd-tdep.c b/gdb/amd64fbsd-tdep.c
index 9f6c217..bb44ec0 100644
--- a/gdb/amd64fbsd-tdep.c
+++ b/gdb/amd64fbsd-tdep.c
@@ -1,4 +1,5 @@
/* Target-dependent code for FreeBSD/amd64.
+
Copyright 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -48,6 +49,26 @@ amd64fbsd_sigcontext_addr (struct frame_info *next_frame)
/* FreeBSD 5.1-RELEASE or later. */
+/* Mapping between the general-purpose registers in `struct reg'
+ format and GDB's register cache layout.
+
+ Note that some registers are 32-bit, but since we're little-endian
+ we get away with that. */
+
+/* From <machine/reg.h>. */
+static int amd64fbsd_r_reg_offset[] =
+{
+ 14 * 8, 11 * 8, /* %rax, %rbx */
+ 13 * 8, 12 * 8, /* %rcx, %rdx */
+ 9 * 8, 8 * 8, /* %rsi, %rdi */
+ 10 * 8, 20 * 8, /* %rbp, %rsp */
+ 7 * 8, 6 * 8, 5 * 8, 4 * 8, /* %r8 ... */
+ 3 * 8, 2 * 8, 1 * 8, 0 * 8, /* ... %r15 */
+ 17 * 8, 19 * 8, /* %rip, %eflags */
+ -1, -1, /* %ds, %es */
+ -1, -1 /* %fs, %gs */
+};
+
/* Location of the signal trampoline. */
CORE_ADDR amd64fbsd_sigtramp_start = 0x7fffffffffc0;
CORE_ADDR amd64fbsd_sigtramp_end = 0x7fffffffffe0;
@@ -62,7 +83,7 @@ int amd64fbsd_sc_reg_offset[X86_64_NUM_GREGS] =
24 + 1 * 8, /* %rsi */
24 + 0 * 8, /* %rdi */
24 + 8 * 8, /* %rbp */
- 24 + 21 * 8, /* %rsp */
+ 24 + 22 * 8, /* %rsp */
24 + 4 * 8, /* %r8 */
24 + 5 * 8, /* %r9 */
24 + 9 * 8, /* %r10 */
@@ -71,8 +92,8 @@ int amd64fbsd_sc_reg_offset[X86_64_NUM_GREGS] =
24 + 12 * 8, /* %r13 */
24 + 13 * 8, /* %r14 */
24 + 14 * 8, /* %r15 */
- 24 + 18 * 8, /* %rip */
- 24 + 20 * 8, /* %eflags */
+ 24 + 19 * 8, /* %rip */
+ 24 + 21 * 8, /* %eflags */
-1, /* %ds */
-1, /* %es */
-1, /* %fs */
@@ -87,13 +108,17 @@ amd64fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Obviously FreeBSD is BSD-based. */
i386bsd_init_abi (info, gdbarch);
+ tdep->gregset_reg_offset = amd64fbsd_r_reg_offset;
+ tdep->gregset_num_regs = ARRAY_SIZE (amd64fbsd_r_reg_offset);
+ tdep->sizeof_gregset = 22 * 8;
+
x86_64_init_abi (info, gdbarch);
tdep->sigtramp_start = amd64fbsd_sigtramp_start;
tdep->sigtramp_end = amd64fbsd_sigtramp_end;
tdep->sigcontext_addr = amd64fbsd_sigcontext_addr;
tdep->sc_reg_offset = amd64fbsd_sc_reg_offset;
- tdep->sc_num_regs = X86_64_NUM_GREGS;
+ tdep->sc_num_regs = ARRAY_SIZE (amd64fbsd_sc_reg_offset);
}
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index e344ec0..8d5720c 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -23,6 +23,7 @@
#include "defs.h"
#include "arch-utils.h"
+#include "buildsym.h"
#include "gdbcmd.h"
#include "inferior.h" /* enum CALL_DUMMY_LOCATION et.al. */
#include "gdb_string.h"
@@ -30,6 +31,8 @@
#include "gdb_assert.h"
#include "sim-regno.h"
+#include "osabi.h"
+
#include "version.h"
#include "floatformat.h"
@@ -99,6 +102,12 @@ generic_skip_trampoline_code (CORE_ADDR pc)
return 0;
}
+CORE_ADDR
+generic_skip_solib_resolver (CORE_ADDR pc)
+{
+ return 0;
+}
+
int
generic_in_solib_call_trampoline (CORE_ADDR pc, char *name)
{
@@ -199,23 +208,15 @@ deprecated_register_convertible_not (int num)
}
-/* Under some ABI's that specify the `struct convention' for returning
- structures by value, by the time we've returned from the function,
- the return value is sitting there in the caller's buffer, but GDB
- has no way to find the address of that buffer.
-
- On such architectures, use this function as your
- extract_struct_value_address method. When asked to a struct
- returned by value in this fashion, GDB will print a nice error
- message, instead of garbage. */
CORE_ADDR
-generic_cannot_extract_struct_value_address (char *dummy)
+core_addr_identity (CORE_ADDR addr)
{
- return 0;
+ return addr;
}
CORE_ADDR
-core_addr_identity (CORE_ADDR addr)
+convert_from_func_ptr_addr_identity (struct gdbarch *gdbarch, CORE_ADDR addr,
+ struct target_ops *targ)
{
return addr;
}
@@ -227,14 +228,7 @@ no_op_reg_to_regnum (int reg)
}
CORE_ADDR
-init_frame_pc_noop (int fromleaf, struct frame_info *prev)
-{
- /* Do nothing, implies return the same PC value. */
- return get_frame_pc (prev);
-}
-
-CORE_ADDR
-init_frame_pc_default (int fromleaf, struct frame_info *prev)
+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));
@@ -300,7 +294,7 @@ generic_register_size (int regnum)
/* 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 (REGISTER_VIRTUAL_TYPE (regnum)); /* OK */
+ return TYPE_LENGTH (DEPRECATED_REGISTER_VIRTUAL_TYPE (regnum)); /* OK */
}
/* Assume all registers are adjacent. */
@@ -344,7 +338,7 @@ legacy_register_to_value (struct frame_info *frame, int regnum,
struct type *type, void *to)
{
char from[MAX_REGISTER_SIZE];
- frame_read_register (frame, regnum, from);
+ get_frame_register (frame, regnum, from);
DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, type, from, to);
}
@@ -359,6 +353,23 @@ legacy_value_to_register (struct frame_info *frame, int regnum,
put_frame_register (frame, regnum, to);
}
+int
+default_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
+{
+ if (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()
+ && DEPRECATED_REG_STRUCT_HAS_ADDR (processing_gcc_compilation, type))
+ {
+ CHECK_TYPEDEF (type);
+
+ return (TYPE_CODE (type) == TYPE_CODE_STRUCT
+ || TYPE_CODE (type) == TYPE_CODE_UNION
+ || TYPE_CODE (type) == TYPE_CODE_SET
+ || TYPE_CODE (type) == TYPE_CODE_BITSTRING);
+ }
+
+ return 0;
+}
+
/* Functions to manipulate the endianness of the target. */
@@ -478,17 +489,72 @@ set_architecture (char *ignore_args, int from_tty, struct cmd_list_element *c)
show_architecture (NULL, from_tty);
}
+/* Try to select a global architecture that matches "info". Return
+ non-zero if the attempt succeds. */
+int
+gdbarch_update_p (struct gdbarch_info info)
+{
+ struct gdbarch *new_gdbarch = gdbarch_find_by_info (info);
+
+ /* If there no architecture by that name, reject the request. */
+ if (new_gdbarch == NULL)
+ {
+ if (gdbarch_debug)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_update_p: "
+ "Architecture not found\n");
+ return 0;
+ }
+
+ /* If it is the same old architecture, accept the request (but don't
+ swap anything). */
+ if (new_gdbarch == current_gdbarch)
+ {
+ if (gdbarch_debug)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_update_p: "
+ "Architecture 0x%08lx (%s) unchanged\n",
+ (long) new_gdbarch,
+ gdbarch_bfd_arch_info (new_gdbarch)->printable_name);
+ return 1;
+ }
+
+ /* It's a new architecture, swap it in. */
+ if (gdbarch_debug)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_update_p: "
+ "New architecture 0x%08lx (%s) selected\n",
+ (long) new_gdbarch,
+ gdbarch_bfd_arch_info (new_gdbarch)->printable_name);
+ deprecated_current_gdbarch_select_hack (new_gdbarch);
+
+ return 1;
+}
+
+/* Return the architecture for ABFD. If no suitable architecture
+ could be find, return NULL. */
+
+struct gdbarch *
+gdbarch_from_bfd (bfd *abfd)
+{
+ struct gdbarch *old_gdbarch = current_gdbarch;
+ struct gdbarch *new_gdbarch;
+ struct gdbarch_info info;
+
+ gdbarch_info_init (&info);
+ info.abfd = abfd;
+ return gdbarch_find_by_info (info);
+}
+
/* Set the dynamic target-system-dependent parameters (architecture,
byte-order) using information found in the BFD */
void
set_gdbarch_from_file (bfd *abfd)
{
- struct gdbarch_info info;
- gdbarch_info_init (&info);
- info.abfd = abfd;
- if (! gdbarch_update_p (info))
+ struct gdbarch *gdbarch;
+
+ gdbarch = gdbarch_from_bfd (abfd);
+ if (gdbarch == NULL)
error ("Architecture of file not recognized.\n");
+ deprecated_current_gdbarch_select_hack (gdbarch);
}
/* Initialize the current architecture. Update the ``set
@@ -608,7 +674,7 @@ initialize_current_architecture (void)
/* Initialize a gdbarch info to values that will be automatically
overridden. Note: Originally, this ``struct info'' was initialized
- using memset(0). Unfortunatly, that ran into problems, namely
+ using memset(0). Unfortunately, that ran into problems, namely
BFD_ENDIAN_BIG is zero. An explicit initialization function that
can explicitly set each field to a well defined value is used. */
@@ -620,6 +686,54 @@ gdbarch_info_init (struct gdbarch_info *info)
info->osabi = GDB_OSABI_UNINITIALIZED;
}
+/* Similar to init, but this time fill in the blanks. Information is
+ obtained from the specified architecture, global "set ..." options,
+ and explicitly initialized INFO fields. */
+
+void
+gdbarch_info_fill (struct gdbarch *gdbarch, struct gdbarch_info *info)
+{
+ /* "(gdb) set architecture ...". */
+ if (info->bfd_arch_info == NULL
+ && !target_architecture_auto
+ && gdbarch != NULL)
+ info->bfd_arch_info = gdbarch_bfd_arch_info (gdbarch);
+ if (info->bfd_arch_info == NULL
+ && info->abfd != NULL
+ && bfd_get_arch (info->abfd) != bfd_arch_unknown
+ && bfd_get_arch (info->abfd) != bfd_arch_obscure)
+ info->bfd_arch_info = bfd_get_arch_info (info->abfd);
+ if (info->bfd_arch_info == NULL
+ && gdbarch != NULL)
+ info->bfd_arch_info = gdbarch_bfd_arch_info (gdbarch);
+
+ /* "(gdb) set byte-order ...". */
+ if (info->byte_order == BFD_ENDIAN_UNKNOWN
+ && !target_byte_order_auto
+ && gdbarch != NULL)
+ info->byte_order = gdbarch_byte_order (gdbarch);
+ /* From the INFO struct. */
+ if (info->byte_order == BFD_ENDIAN_UNKNOWN
+ && info->abfd != NULL)
+ info->byte_order = (bfd_big_endian (info->abfd) ? BFD_ENDIAN_BIG
+ : bfd_little_endian (info->abfd) ? BFD_ENDIAN_LITTLE
+ : BFD_ENDIAN_UNKNOWN);
+ /* From the current target. */
+ if (info->byte_order == BFD_ENDIAN_UNKNOWN
+ && gdbarch != NULL)
+ info->byte_order = gdbarch_byte_order (gdbarch);
+
+ /* "(gdb) set osabi ...". Handled by gdbarch_lookup_osabi. */
+ if (info->osabi == GDB_OSABI_UNINITIALIZED)
+ info->osabi = gdbarch_lookup_osabi (info->abfd);
+ if (info->osabi == GDB_OSABI_UNINITIALIZED
+ && gdbarch != NULL)
+ info->osabi = gdbarch_osabi (gdbarch);
+
+ /* Must have at least filled in the architecture. */
+ gdb_assert (info->bfd_arch_info != NULL);
+}
+
/* */
extern initialize_file_ftype _initialize_gdbarch_utils; /* -Wmissing-prototypes */
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h
index d2e6829..fbc7aa2 100644
--- a/gdb/arch-utils.h
+++ b/gdb/arch-utils.h
@@ -1,6 +1,7 @@
/* Dynamic architecture support for GDB, the GNU debugger.
- Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002, 2003 Free Software Foundation,
+ Inc.
This file is part of GDB.
@@ -75,9 +76,10 @@ extern int core_addr_greaterthan (CORE_ADDR lhs, CORE_ADDR rhs);
extern const struct floatformat *default_float_format (struct gdbarch *gdbarch);
extern const struct floatformat *default_double_format (struct gdbarch *gdbarch);
-/* Identity function on a CORE_ADDR. Just returns its parameter. */
+/* Identity functions on a CORE_ADDR. Just return the "addr". */
extern CORE_ADDR core_addr_identity (CORE_ADDR addr);
+extern gdbarch_convert_from_func_ptr_addr_ftype convert_from_func_ptr_addr_identity;
/* No-op conversion of reg to regnum. */
@@ -85,9 +87,7 @@ extern int no_op_reg_to_regnum (int reg);
/* Versions of init_frame_pc(). Do nothing; do the default. */
-extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
-
-extern CORE_ADDR init_frame_pc_default (int fromleaf, struct frame_info *prev);
+extern CORE_ADDR deprecated_init_frame_pc_default (int fromleaf, struct frame_info *prev);
/* Do nothing version of elf_make_msymbol_special. */
@@ -110,6 +110,8 @@ extern gdbarch_virtual_frame_pointer_ftype legacy_virtual_frame_pointer;
extern CORE_ADDR generic_skip_trampoline_code (CORE_ADDR pc);
+extern CORE_ADDR generic_skip_solib_resolver (CORE_ADDR pc);
+
extern int generic_in_solib_call_trampoline (CORE_ADDR pc, char *name);
extern int generic_in_solib_return_trampoline (CORE_ADDR pc, char *name);
@@ -138,6 +140,9 @@ extern void legacy_register_to_value (struct frame_info *frame, int regnum,
extern void legacy_value_to_register (struct frame_info *frame, int regnum,
struct type *type, const void *from);
+extern int default_stabs_argument_has_addr (struct gdbarch *gdbarch,
+ struct type *type);
+
/* For compatibility with older architectures, returns
(LEGACY_SIM_REGNO_IGNORE) when the register doesn't have a valid
name. */
@@ -148,4 +153,15 @@ extern int legacy_register_sim_regno (int regnum);
default values are not zero. */
extern void gdbarch_info_init (struct gdbarch_info *info);
+/* Similar to init, but this time fill in the blanks. Information is
+ obtained from the specified architecture, global "set ..." options,
+ and explicitly initialized INFO fields. */
+extern void gdbarch_info_fill (struct gdbarch *gdbarch,
+ struct gdbarch_info *info);
+
+/* Return the architecture for ABFD. If no suitable architecture
+ could be find, return NULL. */
+
+extern struct gdbarch *gdbarch_from_bfd (bfd *abfd);
+
#endif
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index b5fb496..c91c0fd 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -31,11 +31,7 @@
#include "osabi.h"
#include "arm-tdep.h"
-
-/* For shared library handling. */
-#include "symtab.h"
-#include "symfile.h"
-#include "objfiles.h"
+#include "glibc-tdep.h"
/* Under ARM GNU/Linux the traditional way of performing a breakpoint
is to execute a particular software interrupt, rather than use a
@@ -348,36 +344,6 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
with. Before the fixup/resolver code returns, it actually calls
the requested function and repairs &GOT[n+3]. */
-/* Find the minimal symbol named NAME, and return both the minsym
- struct and its objfile. This probably ought to be in minsym.c, but
- everything there is trying to deal with things like C++ and
- SOFUN_ADDRESS_MAYBE_TURQUOISE, ... Since this is so simple, it may
- be considered too special-purpose for general consumption. */
-
-static struct minimal_symbol *
-find_minsym_and_objfile (char *name, struct objfile **objfile_p)
-{
- struct objfile *objfile;
-
- ALL_OBJFILES (objfile)
- {
- struct minimal_symbol *msym;
-
- ALL_OBJFILE_MSYMBOLS (objfile, msym)
- {
- if (DEPRECATED_SYMBOL_NAME (msym)
- && strcmp (DEPRECATED_SYMBOL_NAME (msym), name) == 0)
- {
- *objfile_p = objfile;
- return msym;
- }
- }
- }
-
- return 0;
-}
-
-
/* Fetch, and possibly build, an appropriate link_map_offsets structure
for ARM linux targets using the struct offsets defined in <link.h>.
Note, however, that link.h is not actually referred to in this file.
@@ -421,61 +387,10 @@ arm_linux_svr4_fetch_link_map_offsets (void)
return lmp;
}
-static CORE_ADDR
-skip_hurd_resolver (CORE_ADDR pc)
-{
- /* The HURD dynamic linker is part of the GNU C library, so many
- GNU/Linux distributions use it. (All ELF versions, as far as I
- know.) An unresolved PLT entry points to "_dl_runtime_resolve",
- which calls "fixup" to patch the PLT, and then passes control to
- the function.
-
- We look for the symbol `_dl_runtime_resolve', and find `fixup' in
- the same objfile. If we are at the entry point of `fixup', then
- we set a breakpoint at the return address (at the top of the
- stack), and continue.
-
- It's kind of gross to do all these checks every time we're
- called, since they don't change once the executable has gotten
- started. But this is only a temporary hack --- upcoming versions
- of GNU/Linux will provide a portable, efficient interface for
- debugging programs that use shared libraries. */
-
- struct objfile *objfile;
- struct minimal_symbol *resolver
- = find_minsym_and_objfile ("_dl_runtime_resolve", &objfile);
-
- if (resolver)
- {
- struct minimal_symbol *fixup
- = lookup_minimal_symbol ("fixup", NULL, objfile);
-
- if (fixup && SYMBOL_VALUE_ADDRESS (fixup) == pc)
- return (DEPRECATED_SAVED_PC_AFTER_CALL (get_current_frame ()));
- }
-
- return 0;
-}
-
-/* See the comments for SKIP_SOLIB_RESOLVER at the top of infrun.c.
- This function:
- 1) decides whether a PLT has sent us into the linker to resolve
- a function reference, and
- 2) if so, tells us where to set a temporary breakpoint that will
- trigger when the dynamic linker is done. */
-
CORE_ADDR
arm_linux_skip_solib_resolver (CORE_ADDR pc)
{
- CORE_ADDR result;
-
- /* Plug in functions for other kinds of resolvers here. */
- result = skip_hurd_resolver (pc);
-
- if (result)
- return result;
-
- return 0;
+ return glibc_skip_solib_resolver (pc);
}
/* The constants below were determined by examining the following files
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 3ba072d1..6faca9f 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -455,6 +455,12 @@ arm_skip_prologue (CORE_ADDR pc)
if (inst == 0xe1a0c00d) /* mov ip, sp */
continue;
+ if ((inst & 0xfffff000) == 0xe28dc000) /* add ip, sp #n */
+ continue;
+
+ if ((inst & 0xfffff000) == 0xe24dc000) /* sub ip, sp #n */
+ continue;
+
/* Some prologues begin with "str lr, [sp, #-4]!". */
if (inst == 0xe52de004) /* str lr, [sp, #-4]! */
continue;
@@ -707,7 +713,7 @@ thumb_scan_prologue (CORE_ADDR prev_pc, struct arm_prologue_cache *cache)
static void
arm_scan_prologue (struct frame_info *next_frame, struct arm_prologue_cache *cache)
{
- int regno, sp_offset, fp_offset;
+ int regno, sp_offset, fp_offset, ip_offset;
CORE_ADDR prologue_start, prologue_end, current_pc;
CORE_ADDR prev_pc = frame_pc_unwind (next_frame);
@@ -808,7 +814,7 @@ arm_scan_prologue (struct frame_info *next_frame, struct arm_prologue_cache *cac
in which case it is often (but not always) replaced by
"str lr, [sp, #-4]!". - Michael Snyder, 2002-04-23] */
- sp_offset = fp_offset = 0;
+ sp_offset = fp_offset = ip_offset = 0;
for (current_pc = prologue_start;
current_pc < prologue_end;
@@ -818,11 +824,29 @@ arm_scan_prologue (struct frame_info *next_frame, struct arm_prologue_cache *cac
if (insn == 0xe1a0c00d) /* mov ip, sp */
{
+ ip_offset = 0;
+ continue;
+ }
+ else if ((insn & 0xfffff000) == 0xe28dc000) /* add ip, sp #n */
+ {
+ unsigned imm = insn & 0xff; /* immediate value */
+ unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */
+ imm = (imm >> rot) | (imm << (32 - rot));
+ ip_offset = imm;
+ continue;
+ }
+ else if ((insn & 0xfffff000) == 0xe24dc000) /* sub ip, sp #n */
+ {
+ unsigned imm = insn & 0xff; /* immediate value */
+ unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */
+ imm = (imm >> rot) | (imm << (32 - rot));
+ ip_offset = -imm;
continue;
}
else if (insn == 0xe52de004) /* str lr, [sp, #-4]! */
{
- /* Function is frameless: extra_info defaults OK? */
+ sp_offset -= 4;
+ cache->saved_regs[ARM_LR_REGNUM].addr = sp_offset;
continue;
}
else if ((insn & 0xffff0000) == 0xe92d0000)
@@ -859,7 +883,7 @@ arm_scan_prologue (struct frame_info *next_frame, struct arm_prologue_cache *cac
unsigned imm = insn & 0xff; /* immediate value */
unsigned rot = (insn & 0xf00) >> 7; /* rotate amount */
imm = (imm >> rot) | (imm << (32 - rot));
- fp_offset = -imm;
+ fp_offset = -imm + ip_offset;
cache->framereg = ARM_FP_REGNUM;
}
else if ((insn & 0xfffff000) == 0xe24dd000) /* sub sp, sp #n */
@@ -944,7 +968,7 @@ arm_make_prologue_cache (struct frame_info *next_frame)
/* Calculate actual addresses of saved registers using offsets
determined by arm_scan_prologue. */
for (reg = 0; reg < NUM_REGS; reg++)
- if (cache->saved_regs[reg].addr != 0)
+ if (trad_frame_addr_p (cache->saved_regs, reg))
cache->saved_regs[reg].addr += cache->prev_sp;
return cache;
@@ -970,7 +994,7 @@ arm_prologue_this_id (struct frame_info *next_frame,
/* This is meant to halt the backtrace at "_start". Make sure we
don't halt it at a generic dummy frame. */
- if (func <= LOWEST_PC || deprecated_inside_entry_file (func))
+ if (func <= LOWEST_PC)
return;
/* If we've hit a wall, stop. */
@@ -1079,7 +1103,7 @@ arm_make_sigtramp_cache (struct frame_info *next_frame)
cache->framereg = ARM_SP_REGNUM;
cache->prev_sp
= read_memory_integer (cache->saved_regs[cache->framereg].addr,
- REGISTER_RAW_SIZE (cache->framereg));
+ DEPRECATED_REGISTER_RAW_SIZE (cache->framereg));
return cache;
}
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 90bf910..9ef84c0 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -970,11 +970,6 @@ avr_frame_this_id (struct frame_info *next_frame,
/* The FUNC is easy. */
func = frame_func_unwind (next_frame);
- /* This is meant to halt the backtrace at "_start". Make sure we
- don't halt it at a generic dummy frame. */
- if (deprecated_inside_entry_file (func))
- return;
-
/* Hopefully the prologue analysis either correctly determined the
frame's base (which is the SP from the previous frame), or set
that base to "NULL". */
@@ -1359,7 +1354,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
static void
avr_io_reg_read_command (char *args, int from_tty)
{
- int bufsiz = 0;
+ LONGEST bufsiz = 0;
char buf[400];
char query[400];
char *p;
@@ -1367,22 +1362,23 @@ avr_io_reg_read_command (char *args, int from_tty)
unsigned int val;
int i, j, k, step;
- if (!current_target.to_query)
+ /* Just get the maximum buffer size. */
+ bufsiz = target_read_partial (&current_target, TARGET_OBJECT_AVR,
+ NULL, NULL, 0, 0);
+ if (bufsiz < 0)
{
fprintf_unfiltered (gdb_stderr,
"ERR: info io_registers NOT supported by current "
"target\n");
return;
}
-
- /* Just get the maximum buffer size. */
- target_query ((int) 'R', 0, 0, &bufsiz);
if (bufsiz > sizeof (buf))
bufsiz = sizeof (buf);
/* Find out how many io registers the target has. */
strcpy (query, "avr.io_reg");
- target_query ((int) 'R', query, buf, &bufsiz);
+ target_read_partial (&current_target, TARGET_OBJECT_AVR, query, buf, 0,
+ bufsiz);
if (strncmp (buf, "", bufsiz) == 0)
{
@@ -1413,7 +1409,8 @@ avr_io_reg_read_command (char *args, int from_tty)
j = nreg - i; /* last block is less than 8 registers */
snprintf (query, sizeof (query) - 1, "avr.io_reg:%x,%x", i, j);
- target_query ((int) 'R', query, buf, &bufsiz);
+ target_read_partial (&current_target, TARGET_OBJECT_AVR, query, buf,
+ 0, bufsiz);
p = buf;
for (k = i; k < (i + j); k++)
diff --git a/gdb/bcache.c b/gdb/bcache.c
index 5a310f3..ec8b777 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -2,7 +2,7 @@
Written by Fred Fish <fnf@cygnus.com>
Rewritten by Jim Blandy <jimb@cygnus.com>
- Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -25,6 +25,7 @@
#include "gdb_obstack.h"
#include "bcache.h"
#include "gdb_string.h" /* For memcpy declaration */
+#include "gdb_assert.h"
#include <stddef.h>
#include <stdlib.h>
@@ -37,8 +38,15 @@
struct bstring
{
+ /* Hash chain. */
struct bstring *next;
- size_t length;
+ /* Assume the data length is no more than 64k. */
+ unsigned short length;
+ /* The half hash hack. This contains the upper 16 bits of the hash
+ value and is used as a pre-check when comparing two strings and
+ avoids the need to do length or memcmp calls. It proves to be
+ roughly 100% effective. */
+ unsigned short half_hash;
union
{
@@ -71,6 +79,17 @@ struct bcache
long unique_size; /* size of unique strings, in bytes */
long total_size; /* total number of bytes cached, including dups */
long structure_size; /* total size of bcache, including infrastructure */
+ /* Number of times that the hash table is expanded and hence
+ re-built, and the corresponding number of times that a string is
+ [re]hashed as part of entering it into the expanded table. The
+ total number of hashes can be computed by adding TOTAL_COUNT to
+ expand_hash_count. */
+ unsigned long expand_count;
+ unsigned long expand_hash_count;
+ /* Number of times that the half-hash compare hit (compare the upper
+ 16 bits of hash values) hit, but the corresponding combined
+ length/data compare missed. */
+ unsigned long half_hash_miss_count;
};
/* The old hash function was stolen from SDBM. This is what DB 3.0 uses now,
@@ -117,6 +136,11 @@ expand_hash_table (struct bcache *bcache)
struct bstring **new_buckets;
unsigned int i;
+ /* Count the stats. Every unique item needs to be re-hashed and
+ re-entered. */
+ bcache->expand_count++;
+ bcache->expand_hash_count += bcache->unique_count;
+
/* Find the next size. */
new_num_buckets = bcache->num_buckets * 2;
for (i = 0; i < (sizeof (sizes) / sizeof (sizes[0])); i++)
@@ -174,6 +198,8 @@ expand_hash_table (struct bcache *bcache)
void *
bcache (const void *addr, int length, struct bcache *bcache)
{
+ unsigned long full_hash;
+ unsigned short half_hash;
int hash_index;
struct bstring *s;
@@ -184,13 +210,24 @@ bcache (const void *addr, int length, struct bcache *bcache)
bcache->total_count++;
bcache->total_size += length;
- hash_index = hash (addr, length) % bcache->num_buckets;
+ full_hash = hash (addr, length);
+ half_hash = (full_hash >> 16);
+ hash_index = full_hash % bcache->num_buckets;
- /* Search the hash bucket for a string identical to the caller's. */
+ /* Search the hash bucket for a string identical to the caller's.
+ As a short-circuit first compare the upper part of each hash
+ values. */
for (s = bcache->bucket[hash_index]; s; s = s->next)
- if (s->length == length
- && ! memcmp (&s->d.data, addr, length))
- return &s->d.data;
+ {
+ if (s->half_hash == half_hash)
+ {
+ if (s->length == length
+ && ! memcmp (&s->d.data, addr, length))
+ return &s->d.data;
+ else
+ bcache->half_hash_miss_count++;
+ }
+ }
/* The user's string isn't in the list. Insert it after *ps. */
{
@@ -199,6 +236,7 @@ bcache (const void *addr, int length, struct bcache *bcache)
memcpy (&new->d.data, addr, length);
new->length = length;
new->next = bcache->bucket[hash_index];
+ new->half_hash = half_hash;
bcache->bucket[hash_index] = new;
bcache->unique_count++;
@@ -265,12 +303,16 @@ print_bcache_statistics (struct bcache *c, char *type)
int occupied_buckets;
int max_chain_length;
int median_chain_length;
+ int max_entry_size;
+ int median_entry_size;
- /* Count the number of occupied buckets, and measure chain lengths. */
+ /* Count the number of occupied buckets, tally the various string
+ lengths, and measure chain lengths. */
{
unsigned int b;
- int *chain_length
- = (int *) alloca (c->num_buckets * sizeof (*chain_length));
+ int *chain_length = XCALLOC (c->num_buckets + 1, int);
+ int *entry_size = XCALLOC (c->unique_count + 1, int);
+ int stringi = 0;
occupied_buckets = 0;
@@ -286,7 +328,10 @@ print_bcache_statistics (struct bcache *c, char *type)
while (s)
{
+ gdb_assert (b < c->num_buckets);
chain_length[b]++;
+ gdb_assert (stringi < c->unique_count);
+ entry_size[stringi++] = s->length;
s = s->next;
}
}
@@ -295,6 +340,8 @@ print_bcache_statistics (struct bcache *c, char *type)
/* To compute the median, we need the set of chain lengths sorted. */
qsort (chain_length, c->num_buckets, sizeof (chain_length[0]),
compare_ints);
+ qsort (entry_size, c->unique_count, sizeof (entry_size[0]),
+ compare_ints);
if (c->num_buckets > 0)
{
@@ -306,6 +353,19 @@ print_bcache_statistics (struct bcache *c, char *type)
max_chain_length = 0;
median_chain_length = 0;
}
+ if (c->unique_count > 0)
+ {
+ max_entry_size = entry_size[c->unique_count - 1];
+ median_entry_size = entry_size[c->unique_count / 2];
+ }
+ else
+ {
+ max_entry_size = 0;
+ median_entry_size = 0;
+ }
+
+ xfree (chain_length);
+ xfree (entry_size);
}
printf_filtered (" Cached '%s' statistics:\n", type);
@@ -321,6 +381,15 @@ print_bcache_statistics (struct bcache *c, char *type)
print_percentage (c->total_size - c->unique_size, c->total_size);
printf_filtered ("\n");
+ printf_filtered (" Max entry size: %d\n", max_entry_size);
+ printf_filtered (" Average entry size: ");
+ if (c->unique_count > 0)
+ printf_filtered ("%ld\n", c->unique_size / c->unique_count);
+ else
+ printf_filtered ("(not applicable)\n");
+ printf_filtered (" Median entry size: %d\n", median_entry_size);
+ printf_filtered ("\n");
+
printf_filtered (" Total memory used by bcache, including overhead: %ld\n",
c->structure_size);
printf_filtered (" Percentage memory overhead: ");
@@ -330,6 +399,12 @@ print_bcache_statistics (struct bcache *c, char *type)
printf_filtered ("\n");
printf_filtered (" Hash table size: %3d\n", c->num_buckets);
+ printf_filtered (" Hash table expands: %lu\n",
+ c->expand_count);
+ printf_filtered (" Hash table hashes: %lu\n",
+ c->total_count + c->expand_hash_count);
+ printf_filtered (" Half hash misses: %lu\n",
+ c->half_hash_miss_count);
printf_filtered (" Hash table population: ");
print_percentage (occupied_buckets, c->num_buckets);
printf_filtered (" Median hash chain length: %3d\n",
diff --git a/gdb/bcache.h b/gdb/bcache.h
index 61fbbe6..6c3a63d 100644
--- a/gdb/bcache.h
+++ b/gdb/bcache.h
@@ -2,7 +2,7 @@
Written by Fred Fish <fnf@cygnus.com>
Rewritten by Jim Blandy <jimb@cygnus.com>
- Copyright 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -48,20 +48,95 @@
You shouldn't modify the strings you get from a bcache, because:
- You don't necessarily know who you're sharing space with. If I
- stick eight bytes of text in a bcache, and then stick an
- eight-byte structure in the same bcache, there's no guarantee
- those two objects don't actually comprise the same sequence of
- bytes. If they happen to, the bcache will use a single byte
- string for both of them. Then, modifying the structure will
- change the string. In bizarre ways.
+ stick eight bytes of text in a bcache, and then stick an eight-byte
+ structure in the same bcache, there's no guarantee those two
+ objects don't actually comprise the same sequence of bytes. If
+ they happen to, the bcache will use a single byte string for both
+ of them. Then, modifying the structure will change the string. In
+ bizarre ways.
- Even if you know for some other reason that all that's okay,
- there's another problem. A bcache stores all its strings in a
- hash table. If you modify a string's contents, you will probably
- change its hash value. This means that the modified string is
- now in the wrong place in the hash table, and future bcache
- probes will never find it. So by mutating a string, you give up
- any chance of sharing its space with future duplicates. */
+ there's another problem. A bcache stores all its strings in a hash
+ table. If you modify a string's contents, you will probably change
+ its hash value. This means that the modified string is now in the
+ wrong place in the hash table, and future bcache probes will never
+ find it. So by mutating a string, you give up any chance of
+ sharing its space with future duplicates.
+
+
+ Size of bcache VS hashtab:
+
+ For bcache, the most critical cost is size (or more exactly the
+ overhead added by the bcache). It turns out that the bcache is
+ remarkably efficient.
+
+ Assuming a 32-bit system (the hash table slots are 4 bytes),
+ ignoring alignment, and limit strings to 255 bytes (1 byte length)
+ we get ...
+
+ bcache: This uses a separate linked list to track the hash chain.
+ The numbers show roughly 100% occupancy of the hash table and an
+ average chain length of 4. Spreading the slot cost over the 4
+ chain elements:
+
+ 4 (slot) / 4 (chain length) + 1 (length) + 4 (chain) = 6 bytes
+
+ hashtab: This uses a more traditional re-hash algorithm where the
+ chain is maintained within the hash table. The table occupancy is
+ kept below 75% but we'll assume its perfect:
+
+ 4 (slot) x 4/3 (occupancy) + 1 (length) = 6 1/3 bytes
+
+ So a perfect hashtab has just slightly larger than an average
+ bcache.
+
+ It turns out that an average hashtab is far worse. Two things
+ hurt:
+
+ - Hashtab's occupancy is more like 50% (it ranges between 38% and
+ 75%) giving a per slot cost of 4x2 vs 4x4/3.
+
+ - the string structure needs to be aligned to 8 bytes which for
+ hashtab wastes 7 bytes, while for bcache wastes only 3.
+
+ This gives:
+
+ hashtab: 4 x 2 + 1 + 7 = 16 bytes
+
+ bcache 4 / 4 + 1 + 4 + 3 = 9 bytes
+
+ The numbers of GDB debugging GDB support this. ~40% vs ~70% overhead.
+
+
+ Speed of bcache VS hashtab (the half hash hack):
+
+ While hashtab has a typical chain length of 1, bcache has a chain
+ length of round 4. This means that the bcache will require
+ something like double the number of compares after that initial
+ hash. In both cases the comparison takes the form:
+
+ a.length == b.length && memcmp (a.data, b.data, a.length) == 0
+
+ That is lengths are checked before doing the memcmp.
+
+ For GDB debugging GDB, it turned out that all lengths were 24 bytes
+ (no C++ so only psymbols were cached) and hence, all compares
+ required a call to memcmp. As a hack, two bytes of padding
+ (mentioned above) are used to store the upper 16 bits of the
+ string's hash value and then that is used in the comparison vis:
+
+ a.half_hash == b.half_hash && a.length == b.length && memcmp
+ (a.data, b.data, a.length)
+
+ The numbers from GDB debugging GDB show this to be a remarkable
+ 100% effective (only necessary length and memcmp tests being
+ performed).
+
+ Mind you, looking at the wall clock, the same GDB debugging GDB
+ showed only marginal speed up (0.780 vs 0.773s). Seems GDB is too
+ busy doing something else :-(
+
+*/
struct bcache;
diff --git a/gdb/block.c b/gdb/block.c
index 8729a24..28b1181 100644
--- a/gdb/block.c
+++ b/gdb/block.c
@@ -71,7 +71,7 @@ block_function (const struct block *bl)
is NULL, we don't pass this information back to the caller. */
struct blockvector *
-blockvector_for_pc_sect (CORE_ADDR pc, struct sec *section,
+blockvector_for_pc_sect (CORE_ADDR pc, struct bfd_section *section,
int *pindex, struct symtab *symtab)
{
struct block *b;
@@ -136,7 +136,7 @@ blockvector_for_pc (CORE_ADDR pc, int *pindex)
in the specified section, or 0 if there is none. */
struct block *
-block_for_pc_sect (CORE_ADDR pc, struct sec *section)
+block_for_pc_sect (CORE_ADDR pc, struct bfd_section *section)
{
struct blockvector *bl;
int index;
diff --git a/gdb/blockframe.c b/gdb/blockframe.c
index 9da0086..381a61a 100644
--- a/gdb/blockframe.c
+++ b/gdb/blockframe.c
@@ -83,22 +83,35 @@ deprecated_inside_entry_file (CORE_ADDR addr)
int
inside_main_func (CORE_ADDR pc)
{
+ struct minimal_symbol *msymbol;
+
if (pc == 0)
return 1;
if (symfile_objfile == 0)
return 0;
+ msymbol = lookup_minimal_symbol (main_name (), NULL, symfile_objfile);
+
/* If the addr range is not set up at symbol reading time, set it up
now. This is for DEPRECATED_FRAME_CHAIN_VALID_ALTERNATE. I do
this for coff, because it is unable to set it up and symbol
reading time. */
- if (symfile_objfile->ei.main_func_lowpc == INVALID_ENTRY_LOWPC &&
- symfile_objfile->ei.main_func_highpc == INVALID_ENTRY_HIGHPC)
+ if (msymbol != NULL
+ && symfile_objfile->ei.main_func_lowpc == INVALID_ENTRY_LOWPC
+ && symfile_objfile->ei.main_func_highpc == INVALID_ENTRY_HIGHPC)
{
- struct symbol *mainsym;
+ /* 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
+ such as Ada for instance may find more than one match. So 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));
- mainsym = lookup_symbol_linkage (main_name ());
if (mainsym && SYMBOL_CLASS (mainsym) == LOC_BLOCK)
{
symfile_objfile->ei.main_func_lowpc =
@@ -111,8 +124,6 @@ inside_main_func (CORE_ADDR pc)
/* Not in the normal symbol tables, see if "main" is in the partial
symbol table. If it's not, then give up. */
{
- struct minimal_symbol *msymbol
- = lookup_minimal_symbol (main_name (), NULL, symfile_objfile);
if (msymbol != NULL && MSYMBOL_TYPE (msymbol) == mst_text)
{
struct obj_section *osect
@@ -283,7 +294,7 @@ get_frame_function (struct frame_info *frame)
Returns 0 if function is not known. */
struct symbol *
-find_pc_sect_function (CORE_ADDR pc, struct sec *section)
+find_pc_sect_function (CORE_ADDR pc, struct bfd_section *section)
{
struct block *b = block_for_pc_sect (pc, section);
if (b == 0)
@@ -306,7 +317,7 @@ find_pc_function (CORE_ADDR pc)
static CORE_ADDR cache_pc_function_low = 0;
static CORE_ADDR cache_pc_function_high = 0;
static char *cache_pc_function_name = 0;
-static struct sec *cache_pc_function_section = NULL;
+static struct bfd_section *cache_pc_function_section = NULL;
/* Clear cache, e.g. when symbol table is discarded. */
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 152aa3c..1cbd006 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -97,6 +97,10 @@ struct breakpoint *set_raw_breakpoint (struct symtab_and_line, enum bptype);
static void check_duplicates (struct breakpoint *);
+static void breakpoint_adjustment_warning (CORE_ADDR, CORE_ADDR, int, int);
+
+static CORE_ADDR adjust_breakpoint_address (CORE_ADDR bpaddr);
+
static void describe_other_breakpoints (CORE_ADDR, asection *);
static void breakpoints_info (char *, int);
@@ -124,7 +128,7 @@ typedef enum
}
insertion_state_t;
-static int remove_breakpoint (struct breakpoint *, insertion_state_t);
+static int remove_breakpoint (struct bp_location *, insertion_state_t);
static enum print_stop_action print_it_typical (bpstat);
@@ -231,6 +235,15 @@ static int overlay_events_enabled;
B ? (TMP=B->next, 1): 0; \
B = TMP)
+/* Similar iterators for the low-level breakpoints. */
+
+#define ALL_BP_LOCATIONS(B) for (B = bp_location_chain; B; B = B->next)
+
+#define ALL_BP_LOCATIONS_SAFE(B,TMP) \
+ for (B = bp_location_chain; \
+ B ? (TMP=B->next, 1): 0; \
+ B = TMP)
+
/* True if SHIFT_INST_REGS defined, false otherwise. */
int must_shift_inst_regs =
@@ -245,10 +258,12 @@ int must_shift_inst_regs =
int show_breakpoint_hit_counts = 1;
-/* Chain of all breakpoints defined. */
+/* Chains of all breakpoints defined. */
struct breakpoint *breakpoint_chain;
+struct bp_location *bp_location_chain;
+
/* Number of last breakpoint made. */
int breakpoint_count;
@@ -548,7 +563,7 @@ condition_command (char *arg, int from_tty)
/* I don't know if it matters whether this is the string the user
typed in or the decompiled expression. */
b->cond_string = savestring (arg, strlen (arg));
- b->cond = parse_exp_1 (&arg, block_for_pc (b->address), 0);
+ b->cond = parse_exp_1 (&arg, block_for_pc (b->loc->address), 0);
if (*arg)
error ("Junk at end of expression");
}
@@ -560,7 +575,6 @@ condition_command (char *arg, int from_tty)
error ("No breakpoint number %d.", bnum);
}
-/* ARGSUSED */
static void
commands_command (char *arg, int from_tty)
{
@@ -611,7 +625,7 @@ int
read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
{
int status;
- struct breakpoint *b;
+ struct bp_location *b;
CORE_ADDR bp_addr = 0;
int bp_size = 0;
@@ -619,19 +633,14 @@ read_memory_nobpt (CORE_ADDR memaddr, char *myaddr, unsigned len)
/* No breakpoints on this machine. */
return target_read_memory (memaddr, myaddr, len);
- ALL_BREAKPOINTS (b)
+ ALL_BP_LOCATIONS (b)
{
- if (b->type == bp_none)
- warning ("reading through apparently deleted breakpoint #%d?",
- b->number);
+ if (b->owner->type == bp_none)
+ warning ("reading through apparently deleted breakpoint #%d?",
+ b->owner->number);
- /* memory breakpoint? */
- if (b->type == bp_watchpoint
- || b->type == bp_hardware_watchpoint
- || b->type == bp_read_watchpoint
- || b->type == bp_access_watchpoint)
+ if (b->loc_type != bp_loc_software_breakpoint)
continue;
- /* bp in memory? */
if (!b->inserted)
continue;
/* Addresses and length of the part of the breakpoint that
@@ -732,373 +741,396 @@ insert_catchpoint (struct ui_out *uo, void *args)
return 0;
}
-/* insert_breakpoints is used when starting or continuing the program.
- remove_breakpoints is used when the program stops.
- Both return zero if successful,
- or an `errno' value if could not write the inferior. */
+/* 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.
-int
-insert_breakpoints (void)
+ NOTE drow/2003-09-09: This routine could be broken down to an object-style
+ method for each breakpoint or catchpoint type. */
+static int
+insert_bp_location (struct bp_location *bpt,
+ struct ui_file *tmp_error_stream,
+ int *disabled_breaks, int *process_warning,
+ int *hw_breakpoint_error)
{
- struct breakpoint *b, *temp;
- int return_val = 0; /* return success code. */
int val = 0;
- int disabled_breaks = 0;
- int hw_breakpoint_error = 0;
-#ifdef ONE_PROCESS_WRITETEXT
- int process_warning = 0;
-#endif
-
- struct ui_file *tmp_error_stream = mem_fileopen ();
- make_cleanup_ui_file_delete (tmp_error_stream);
- /* Explicitly mark the warning -- this will only be printed if
- there was an error. */
- fprintf_unfiltered (tmp_error_stream, "Warning:\n");
+ /* Permanent breakpoints cannot be inserted or removed. Disabled
+ breakpoints should not be inserted. */
+ if (bpt->owner->enable_state != bp_enabled)
+ return 0;
- ALL_BREAKPOINTS_SAFE (b, temp)
- {
- /* Permanent breakpoints cannot be inserted or removed. Disabled
- breakpoints should not be inserted. */
- if (b->enable_state != bp_enabled)
- continue;
+ if (bpt->inserted || bpt->duplicate)
+ return 0;
- if ((b->type == bp_watchpoint
- || b->type == bp_hardware_watchpoint
- || b->type == bp_read_watchpoint
- || b->type == bp_access_watchpoint) && (!b->val))
- {
- struct value *val;
- val = evaluate_expression (b->exp);
- release_value (val);
- if (VALUE_LAZY (val))
- value_fetch_lazy (val);
- b->val = val;
- }
- if (b->type != bp_watchpoint
- && b->type != bp_hardware_watchpoint
- && b->type != bp_read_watchpoint
- && b->type != bp_access_watchpoint
- && b->type != bp_catch_fork
- && b->type != bp_catch_vfork
- && b->type != bp_catch_exec
- && b->type != bp_catch_throw
- && b->type != bp_catch_catch
- && !b->inserted
- && !b->duplicate)
- {
- /* "Normal" instruction breakpoint: either the standard
- trap-instruction bp (bp_breakpoint), or a
- bp_hardware_breakpoint. */
-
- /* First check to see if we have to handle an overlay. */
- if (overlay_debugging == ovly_off
- || b->section == NULL
- || !(section_is_overlay (b->section)))
- {
- /* No overlay handling: just set the breakpoint. */
+ if (bpt->loc_type == bp_loc_software_breakpoint
+ || bpt->loc_type == bp_loc_hardware_breakpoint)
+ {
+ /* First check to see if we have to handle an overlay. */
+ if (overlay_debugging == ovly_off
+ || bpt->section == NULL
+ || !(section_is_overlay (bpt->section)))
+ {
+ /* No overlay handling: just set the breakpoint. */
- if (b->type == bp_hardware_breakpoint)
- val = target_insert_hw_breakpoint (b->address,
- b->shadow_contents);
- else
- val = target_insert_breakpoint (b->address, b->shadow_contents);
- }
- else
- {
- /* This breakpoint is in an overlay section.
- Shall we set a breakpoint at the LMA? */
- if (!overlay_events_enabled)
- {
- /* Yes -- overlay event support is not active,
- so we must try to set a breakpoint at the LMA.
- This will not work for a hardware breakpoint. */
- if (b->type == bp_hardware_breakpoint)
- warning ("hardware breakpoint %d not supported in overlay!\n",
- b->number);
- else
- {
- CORE_ADDR addr = overlay_unmapped_address (b->address,
- b->section);
- /* Set a software (trap) breakpoint at the LMA. */
- val = target_insert_breakpoint (addr, b->shadow_contents);
- if (val != 0)
- fprintf_unfiltered (tmp_error_stream,
- "Overlay breakpoint %d failed: in ROM?",
- b->number);
- }
- }
- /* Shall we set a breakpoint at the VMA? */
- if (section_is_mapped (b->section))
- {
- /* Yes. This overlay section is mapped into memory. */
- if (b->type == bp_hardware_breakpoint)
- val = target_insert_hw_breakpoint (b->address,
- b->shadow_contents);
- else
- val = target_insert_breakpoint (b->address,
- b->shadow_contents);
- }
- else
- {
- /* No. This breakpoint will not be inserted.
- No error, but do not mark the bp as 'inserted'. */
- continue;
- }
- }
+ if (bpt->loc_type == bp_loc_hardware_breakpoint)
+ val = target_insert_hw_breakpoint (bpt->address,
+ bpt->shadow_contents);
+ else
+ val = target_insert_breakpoint (bpt->address,
+ bpt->shadow_contents);
+ }
+ else
+ {
+ /* This breakpoint is in an overlay section.
+ Shall we set a breakpoint at the LMA? */
+ if (!overlay_events_enabled)
+ {
+ /* Yes -- overlay event support is not active,
+ so we must try to set a breakpoint at the LMA.
+ This will not work for a hardware breakpoint. */
+ if (bpt->loc_type == bp_loc_hardware_breakpoint)
+ warning ("hardware breakpoint %d not supported in overlay!\n",
+ bpt->owner->number);
+ else
+ {
+ CORE_ADDR addr = overlay_unmapped_address (bpt->address,
+ bpt->section);
+ /* Set a software (trap) breakpoint at the LMA. */
+ val = target_insert_breakpoint (addr, bpt->shadow_contents);
+ if (val != 0)
+ fprintf_unfiltered (tmp_error_stream,
+ "Overlay breakpoint %d failed: in ROM?",
+ bpt->owner->number);
+ }
+ }
+ /* Shall we set a breakpoint at the VMA? */
+ if (section_is_mapped (bpt->section))
+ {
+ /* Yes. This overlay section is mapped into memory. */
+ if (bpt->loc_type == bp_loc_hardware_breakpoint)
+ val = target_insert_hw_breakpoint (bpt->address,
+ bpt->shadow_contents);
+ else
+ val = target_insert_breakpoint (bpt->address,
+ bpt->shadow_contents);
+ }
+ else
+ {
+ /* No. This breakpoint will not be inserted.
+ No error, but do not mark the bp as 'inserted'. */
+ return 0;
+ }
+ }
- if (val)
- {
- /* Can't set the breakpoint. */
+ if (val)
+ {
+ /* Can't set the breakpoint. */
#if defined (DISABLE_UNSETTABLE_BREAK)
- if (DISABLE_UNSETTABLE_BREAK (b->address))
- {
- /* See also: disable_breakpoints_in_shlibs. */
- val = 0;
- b->enable_state = bp_shlib_disabled;
- if (!disabled_breaks)
- {
- fprintf_unfiltered (tmp_error_stream,
- "Cannot insert breakpoint %d.\n",
- b->number);
- fprintf_unfiltered (tmp_error_stream,
- "Temporarily disabling shared library breakpoints:\n");
- }
- disabled_breaks = 1;
- fprintf_unfiltered (tmp_error_stream,
- "breakpoint #%d\n", b->number);
- }
- else
+ if (DISABLE_UNSETTABLE_BREAK (bpt->address))
+ {
+ /* See also: disable_breakpoints_in_shlibs. */
+ val = 0;
+ bpt->owner->enable_state = bp_shlib_disabled;
+ if (!*disabled_breaks)
+ {
+ fprintf_unfiltered (tmp_error_stream,
+ "Cannot insert breakpoint %d.\n",
+ bpt->owner->number);
+ fprintf_unfiltered (tmp_error_stream,
+ "Temporarily disabling shared library breakpoints:\n");
+ }
+ *disabled_breaks = 1;
+ fprintf_unfiltered (tmp_error_stream,
+ "breakpoint #%d\n", bpt->owner->number);
+ }
+ else
#endif
- {
+ {
#ifdef ONE_PROCESS_WRITETEXT
- process_warning = 1;
+ *process_warning = 1;
#endif
- if (b->type == bp_hardware_breakpoint)
- {
- hw_breakpoint_error = 1;
- fprintf_unfiltered (tmp_error_stream,
- "Cannot insert hardware breakpoint %d.\n",
- b->number);
- }
- else
- {
- fprintf_unfiltered (tmp_error_stream,
- "Cannot insert breakpoint %d.\n",
- b->number);
- fprintf_filtered (tmp_error_stream,
- "Error accessing memory address ");
- print_address_numeric (b->address, 1, tmp_error_stream);
- fprintf_filtered (tmp_error_stream, ": %s.\n",
- safe_strerror (val));
- }
+ if (bpt->loc_type == bp_loc_hardware_breakpoint)
+ {
+ *hw_breakpoint_error = 1;
+ fprintf_unfiltered (tmp_error_stream,
+ "Cannot insert hardware breakpoint %d.\n",
+ bpt->owner->number);
+ }
+ else
+ {
+ fprintf_unfiltered (tmp_error_stream,
+ "Cannot insert breakpoint %d.\n",
+ bpt->owner->number);
+ fprintf_filtered (tmp_error_stream,
+ "Error accessing memory address ");
+ print_address_numeric (bpt->address, 1, tmp_error_stream);
+ fprintf_filtered (tmp_error_stream, ": %s.\n",
+ safe_strerror (val));
+ }
- }
- }
- else
- b->inserted = 1;
+ }
+ }
+ else
+ bpt->inserted = 1;
- if (val)
- return_val = val; /* remember failure */
- }
- else if (ep_is_exception_catchpoint (b)
- && !b->inserted
- && !b->duplicate)
+ return val;
+ }
- {
- /* If we get here, we must have a callback mechanism for exception
- events -- with g++ style embedded label support, we insert
- ordinary breakpoints and not catchpoints. */
- val = target_insert_breakpoint (b->address, b->shadow_contents);
- if (val)
- {
- /* Couldn't set breakpoint for some reason */
- fprintf_unfiltered (tmp_error_stream,
- "Cannot insert catchpoint %d; disabling it.\n",
- b->number);
- fprintf_filtered (tmp_error_stream,
- "Error accessing memory address ");
- print_address_numeric (b->address, 1, tmp_error_stream);
- fprintf_filtered (tmp_error_stream, ": %s.\n",
- safe_strerror (val));
- b->enable_state = bp_disabled;
- }
- else
- {
- /* Bp set, now make sure callbacks are enabled */
- /* Format possible error msg */
- char *message = xstrprintf ("Error inserting catchpoint %d:\n",
- b->number);
- struct cleanup *cleanups = make_cleanup (xfree, message);
- int val;
- args_for_catchpoint_enable args;
- args.kind = b->type == bp_catch_catch ?
- EX_EVENT_CATCH : EX_EVENT_THROW;
- args.enable_p = 1;
- val = catch_errors (cover_target_enable_exception_callback,
- &args, message, RETURN_MASK_ALL);
- do_cleanups (cleanups);
- if (val != 0 && val != -1)
- {
- b->inserted = 1;
- }
- /* Check if something went wrong; val == 0 can be ignored */
- if (val == -1)
- {
- /* something went wrong */
- fprintf_unfiltered (tmp_error_stream,
- "Cannot insert catchpoint %d; disabling it.\n",
- b->number);
- b->enable_state = bp_disabled;
- }
- }
+ else if (bpt->loc_type == bp_loc_hardware_watchpoint
+ /* NOTE drow/2003-09-08: This state only exists for removing
+ watchpoints. It's not clear that it's necessary... */
+ && bpt->owner->disposition != disp_del_at_next_stop)
+ {
+ /* FIXME drow/2003-09-08: This code sets multiple hardware watchpoints
+ based on the expression. Ideally this should happen at a higher level,
+ and there should be one bp_location for each computed address we
+ must watch. As soon as a many-to-one mapping is available I'll
+ convert this. */
- if (val)
- return_val = val; /* remember failure */
- }
+ struct frame_info *saved_frame;
+ int saved_level, within_current_scope;
+ struct value *mark = value_mark ();
+ struct value *v;
- else if ((b->type == bp_hardware_watchpoint ||
- b->type == bp_read_watchpoint ||
- b->type == bp_access_watchpoint)
- && b->disposition != disp_del_at_next_stop
- && !b->inserted
- && !b->duplicate)
- {
- struct frame_info *saved_frame;
- int saved_level, within_current_scope;
- struct value *mark = value_mark ();
- struct value *v;
+ /* Save the current frame and level 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);
+
+ /* Determine if the watchpoint is within scope. */
+ if (bpt->owner->exp_valid_block == NULL)
+ within_current_scope = 1;
+ else
+ {
+ struct frame_info *fi;
+ fi = frame_find_by_id (bpt->owner->watchpoint_frame);
+ within_current_scope = (fi != NULL);
+ if (within_current_scope)
+ select_frame (fi);
+ }
- /* Save the current frame and level so we can restore it after
- evaluating the watchpoint expression on its own frame. */
- saved_frame = deprecated_selected_frame;
- saved_level = frame_relative_level (deprecated_selected_frame);
+ if (within_current_scope)
+ {
+ /* Evaluate the expression and cut the chain of values
+ produced off from the value chain.
- /* Determine if the watchpoint is within scope. */
- if (b->exp_valid_block == NULL)
- within_current_scope = 1;
- else
- {
- struct frame_info *fi;
- fi = frame_find_by_id (b->watchpoint_frame);
- within_current_scope = (fi != NULL);
- if (within_current_scope)
- select_frame (fi);
- }
+ Make sure the value returned isn't lazy; we use
+ laziness to determine what memory GDB actually needed
+ in order to compute the value of the expression. */
+ v = evaluate_expression (bpt->owner->exp);
+ VALUE_CONTENTS (v);
+ value_release_to_mark (mark);
- if (within_current_scope)
- {
- /* Evaluate the expression and cut the chain of values
- produced off from the value chain.
+ bpt->owner->val_chain = v;
+ bpt->inserted = 1;
- Make sure the value returned isn't lazy; we use
- laziness to determine what memory GDB actually needed
- in order to compute the value of the expression. */
- v = evaluate_expression (b->exp);
- VALUE_CONTENTS(v);
- value_release_to_mark (mark);
+ /* Look at each value on the value chain. */
+ for (; v; v = v->next)
+ {
+ /* If it's a memory location, and GDB actually needed
+ its contents to evaluate the expression, then we
+ must watch it. */
+ if (VALUE_LVAL (v) == lval_memory
+ && ! VALUE_LAZY (v))
+ {
+ struct type *vtype = check_typedef (VALUE_TYPE (v));
+
+ /* We only watch structs and arrays if user asked
+ for it explicitly, never if they just happen to
+ appear in the middle of some value chain. */
+ if (v == bpt->owner->val_chain
+ || (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
+ && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
+ {
+ CORE_ADDR addr;
+ int len, type;
+
+ addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
+ len = TYPE_LENGTH (VALUE_TYPE (v));
+ type = hw_write;
+ if (bpt->owner->type == bp_read_watchpoint)
+ type = hw_read;
+ else if (bpt->owner->type == bp_access_watchpoint)
+ type = hw_access;
+
+ val = target_insert_watchpoint (addr, len, type);
+ if (val == -1)
+ {
+ /* Don't exit the loop, try to insert
+ every value on the value chain. That's
+ because we will be removing all the
+ watches below, and removing a
+ watchpoint we didn't insert could have
+ adverse effects. */
+ bpt->inserted = 0;
+ }
+ val = 0;
+ }
+ }
+ }
+ /* Failure to insert a watchpoint on any memory value in the
+ value chain brings us here. */
+ if (!bpt->inserted)
+ {
+ remove_breakpoint (bpt, mark_uninserted);
+ *hw_breakpoint_error = 1;
+ fprintf_unfiltered (tmp_error_stream,
+ "Could not insert hardware watchpoint %d.\n",
+ bpt->owner->number);
+ val = -1;
+ }
+ }
+ else
+ {
+ printf_filtered ("Hardware watchpoint %d deleted ", bpt->owner->number);
+ printf_filtered ("because the program has left the block \n");
+ printf_filtered ("in which its expression is valid.\n");
+ if (bpt->owner->related_breakpoint)
+ bpt->owner->related_breakpoint->disposition = disp_del_at_next_stop;
+ bpt->owner->disposition = disp_del_at_next_stop;
+ }
- b->val_chain = v;
- b->inserted = 1;
+ /* Restore the frame and level. */
+ if (saved_frame != deprecated_selected_frame
+ || saved_level != frame_relative_level (deprecated_selected_frame))
+ select_frame (saved_frame);
- /* Look at each value on the value chain. */
- for (; v; v = v->next)
- {
- /* If it's a memory location, and GDB actually needed
- its contents to evaluate the expression, then we
- must watch it. */
- if (VALUE_LVAL (v) == lval_memory
- && ! VALUE_LAZY (v))
- {
- struct type *vtype = check_typedef (VALUE_TYPE (v));
-
- /* We only watch structs and arrays if user asked
- for it explicitly, never if they just happen to
- appear in the middle of some value chain. */
- if (v == b->val_chain
- || (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
- && TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
- {
- CORE_ADDR addr;
- int len, type;
-
- addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
- len = TYPE_LENGTH (VALUE_TYPE (v));
- type = hw_write;
- if (b->type == bp_read_watchpoint)
- type = hw_read;
- else if (b->type == bp_access_watchpoint)
- type = hw_access;
-
- val = target_insert_watchpoint (addr, len, type);
- if (val == -1)
- {
- /* Don't exit the loop, try to insert
- every value on the value chain. That's
- because we will be removing all the
- watches below, and removing a
- watchpoint we didn't insert could have
- adverse effects. */
- b->inserted = 0;
- }
- val = 0;
- }
- }
- }
- /* Failure to insert a watchpoint on any memory value in the
- value chain brings us here. */
- if (!b->inserted)
- {
- remove_breakpoint (b, mark_uninserted);
- hw_breakpoint_error = 1;
- fprintf_unfiltered (tmp_error_stream,
- "Could not insert hardware watchpoint %d.\n",
- b->number);
- val = -1;
- }
- }
- else
- {
- printf_filtered ("Hardware watchpoint %d deleted ", b->number);
- printf_filtered ("because the program has left the block \n");
- printf_filtered ("in which its expression is valid.\n");
- if (b->related_breakpoint)
- b->related_breakpoint->disposition = disp_del_at_next_stop;
- b->disposition = disp_del_at_next_stop;
- }
+ return val;
+ }
- /* Restore the frame and level. */
- if ((saved_frame != deprecated_selected_frame) ||
- (saved_level != frame_relative_level (deprecated_selected_frame)))
- select_frame (saved_frame);
+ else if (ep_is_exception_catchpoint (bpt->owner))
+ {
+ /* FIXME drow/2003-09-09: This code sets both a catchpoint and a
+ breakpoint. Once again, it would be better if this was represented
+ as two bp_locations. */
- if (val)
- return_val = val; /* remember failure */
- }
- else if ((b->type == bp_catch_fork
- || b->type == bp_catch_vfork
- || b->type == bp_catch_exec)
- && !b->inserted
- && !b->duplicate)
- {
- char *prefix = xstrprintf ("warning: inserting catchpoint %d: ",
- b->number);
- struct cleanup *cleanups = make_cleanup (xfree, prefix);
- val = catch_exceptions (uiout, insert_catchpoint, b, prefix,
- RETURN_MASK_ERROR);
- do_cleanups (cleanups);
- if (val < 0)
- b->enable_state = bp_disabled;
- else
- b->inserted = 1;
- }
- }
-
- if (return_val)
+ /* If we get here, we must have a callback mechanism for exception
+ events -- with g++ style embedded label support, we insert
+ ordinary breakpoints and not catchpoints. */
+ val = target_insert_breakpoint (bpt->address, bpt->shadow_contents);
+ if (val)
+ {
+ /* Couldn't set breakpoint for some reason */
+ fprintf_unfiltered (tmp_error_stream,
+ "Cannot insert catchpoint %d; disabling it.\n",
+ bpt->owner->number);
+ fprintf_filtered (tmp_error_stream,
+ "Error accessing memory address ");
+ print_address_numeric (bpt->address, 1, tmp_error_stream);
+ fprintf_filtered (tmp_error_stream, ": %s.\n",
+ safe_strerror (val));
+ bpt->owner->enable_state = bp_disabled;
+ }
+ else
+ {
+ /* Bp set, now make sure callbacks are enabled */
+ /* Format possible error msg */
+ char *message = xstrprintf ("Error inserting catchpoint %d:\n",
+ bpt->owner->number);
+ struct cleanup *cleanups = make_cleanup (xfree, message);
+ int val;
+ args_for_catchpoint_enable args;
+ args.kind = bpt->owner->type == bp_catch_catch ?
+ EX_EVENT_CATCH : EX_EVENT_THROW;
+ args.enable_p = 1;
+ val = catch_errors (cover_target_enable_exception_callback,
+ &args, message, RETURN_MASK_ALL);
+ do_cleanups (cleanups);
+ if (val != 0 && val != -1)
+ bpt->inserted = 1;
+
+ /* Check if something went wrong; val == 0 can be ignored */
+ if (val == -1)
+ {
+ /* something went wrong */
+ fprintf_unfiltered (tmp_error_stream,
+ "Cannot insert catchpoint %d; disabling it.\n",
+ bpt->owner->number);
+ bpt->owner->enable_state = bp_disabled;
+ }
+ }
+
+ return val;
+ }
+
+ else if (bpt->owner->type == bp_catch_fork
+ || bpt->owner->type == bp_catch_vfork
+ || bpt->owner->type == bp_catch_exec)
+ {
+ char *prefix = xstrprintf ("warning: inserting catchpoint %d: ",
+ bpt->owner->number);
+ struct cleanup *cleanups = make_cleanup (xfree, prefix);
+ val = catch_exceptions (uiout, insert_catchpoint, bpt->owner, prefix,
+ RETURN_MASK_ERROR);
+ do_cleanups (cleanups);
+ if (val < 0)
+ bpt->owner->enable_state = bp_disabled;
+ else
+ bpt->inserted = 1;
+ return val;
+ }
+
+ return 0;
+}
+
+/* insert_breakpoints is used when starting or continuing the program.
+ remove_breakpoints is used when the program stops.
+ Both return zero if successful,
+ or an `errno' value if could not write the inferior. */
+
+int
+insert_breakpoints (void)
+{
+ struct bp_location *b, *temp;
+ int return_val = 0; /* return success code. */
+ int val = 0;
+ int disabled_breaks = 0;
+ int hw_breakpoint_error = 0;
+ int process_warning = 0;
+
+ struct ui_file *tmp_error_stream = mem_fileopen ();
+ make_cleanup_ui_file_delete (tmp_error_stream);
+
+ /* Explicitly mark the warning -- this will only be printed if
+ there was an error. */
+ fprintf_unfiltered (tmp_error_stream, "Warning:\n");
+
+ ALL_BP_LOCATIONS_SAFE (b, temp)
+ {
+ /* Permanent breakpoints cannot be inserted or removed. Disabled
+ breakpoints should not be inserted. */
+ if (b->owner->enable_state != bp_enabled)
+ continue;
+
+ /* FIXME drow/2003-10-07: This code should be pushed elsewhere when
+ hardware watchpoints are split into multiple loc breakpoints. */
+ if ((b->loc_type == bp_loc_hardware_watchpoint
+ || b->owner->type == bp_watchpoint) && !b->owner->val)
+ {
+ struct value *val;
+ val = evaluate_expression (b->owner->exp);
+ release_value (val);
+ if (VALUE_LAZY (val))
+ value_fetch_lazy (val);
+ b->owner->val = val;
+ }
+
+ val = insert_bp_location (b, tmp_error_stream,
+ &disabled_breaks, &process_warning,
+ &hw_breakpoint_error);
+ if (val)
+ return_val = val;
+ }
+
+ if (return_val)
{
/* If a hardware breakpoint or watchpoint was inserted, add a
message about possibly exhausted resources. */
- if (hw_breakpoint_error)
+ if (hw_breakpoint_error)
{
fprintf_unfiltered (tmp_error_stream,
"Could not insert hardware breakpoints:\n\
@@ -1118,10 +1150,10 @@ You may have requested too many hardware breakpoints/watchpoints.\n");
int
remove_breakpoints (void)
{
- struct breakpoint *b;
+ struct bp_location *b;
int val;
- ALL_BREAKPOINTS (b)
+ ALL_BP_LOCATIONS (b)
{
if (b->inserted)
{
@@ -1136,15 +1168,12 @@ remove_breakpoints (void)
int
remove_hw_watchpoints (void)
{
- struct breakpoint *b;
+ struct bp_location *b;
int val;
- ALL_BREAKPOINTS (b)
+ ALL_BP_LOCATIONS (b)
{
- if (b->inserted
- && (b->type == bp_hardware_watchpoint
- || b->type == bp_read_watchpoint
- || b->type == bp_access_watchpoint))
+ if (b->inserted && b->loc_type == bp_loc_hardware_watchpoint)
{
val = remove_breakpoint (b, mark_uninserted);
if (val != 0)
@@ -1157,21 +1186,23 @@ remove_hw_watchpoints (void)
int
reattach_breakpoints (int pid)
{
- struct breakpoint *b;
+ struct bp_location *b;
int val;
struct cleanup *old_chain = save_inferior_ptid ();
/* Set inferior_ptid; remove_breakpoint uses this global. */
inferior_ptid = pid_to_ptid (pid);
- ALL_BREAKPOINTS (b)
+ ALL_BP_LOCATIONS (b)
{
if (b->inserted)
{
remove_breakpoint (b, mark_inserted);
- if (b->type == bp_hardware_breakpoint)
+ if (b->loc_type == bp_loc_hardware_breakpoint)
val = target_insert_hw_breakpoint (b->address, b->shadow_contents);
else
val = target_insert_breakpoint (b->address, b->shadow_contents);
+ /* FIXME drow/2003-10-07: This doesn't handle any other kinds of
+ breakpoints. It's wrong for watchpoints, for example. */
if (val != 0)
{
do_cleanups (old_chain);
@@ -1246,11 +1277,11 @@ update_breakpoints_after_exec (void)
automagically. Certainly on HP-UX that's true.
Jim Blandy <jimb@redhat.com>: Actually, zero is a perfectly
- valid code address on some platforms (like the OBSOLETE mn10200
- and mn10300 simulators). We shouldn't assign any special
- interpretation to a breakpoint with a zero address. And in
- fact, GDB doesn't --- I can't see what that comment above is
- talking about. As far as I can tell, setting the address of a
+ valid code address on some platforms (like the mn10300
+ simulators). We shouldn't assign any special interpretation to
+ a breakpoint with a zero address. And in fact, GDB doesn't ---
+ I can't see what that comment above is talking about. As far
+ as I can tell, setting the address of a
bp_catch_exec/bp_catch_vfork/bp_catch_fork breakpoint to zero
is meaningless, since those are implemented with HP-UX kernel
hackery, not by storing breakpoint instructions somewhere. */
@@ -1258,7 +1289,7 @@ update_breakpoints_after_exec (void)
(b->type == bp_catch_vfork) ||
(b->type == bp_catch_fork))
{
- b->address = (CORE_ADDR) NULL;
+ b->loc->address = (CORE_ADDR) NULL;
continue;
}
@@ -1311,7 +1342,7 @@ update_breakpoints_after_exec (void)
unnecessary. A call to breakpoint_re_set_one always recomputes
the breakpoint's address from scratch, or deletes it if it can't.
So I think this assignment could be deleted without effect. */
- b->address = (CORE_ADDR) NULL;
+ b->loc->address = (CORE_ADDR) NULL;
}
/* FIXME what about longjmp breakpoints? Re-create them here? */
create_overlay_event_breakpoint ("_ovly_debug_event");
@@ -1320,7 +1351,7 @@ update_breakpoints_after_exec (void)
int
detach_breakpoints (int pid)
{
- struct breakpoint *b;
+ struct bp_location *b;
int val;
struct cleanup *old_chain = save_inferior_ptid ();
@@ -1329,7 +1360,7 @@ detach_breakpoints (int pid)
/* Set inferior_ptid; remove_breakpoint uses this global. */
inferior_ptid = pid_to_ptid (pid);
- ALL_BREAKPOINTS (b)
+ ALL_BP_LOCATIONS (b)
{
if (b->inserted)
{
@@ -1346,27 +1377,20 @@ detach_breakpoints (int pid)
}
static int
-remove_breakpoint (struct breakpoint *b, insertion_state_t is)
+remove_breakpoint (struct bp_location *b, insertion_state_t is)
{
int val;
- if (b->enable_state == bp_permanent)
+ if (b->owner->enable_state == bp_permanent)
/* Permanent breakpoints cannot be inserted or removed. */
return 0;
- if (b->type == bp_none)
+ if (b->owner->type == bp_none)
warning ("attempted to remove apparently deleted breakpoint #%d?",
- b->number);
-
- if (b->type != bp_watchpoint
- && b->type != bp_hardware_watchpoint
- && b->type != bp_read_watchpoint
- && b->type != bp_access_watchpoint
- && b->type != bp_catch_fork
- && b->type != bp_catch_vfork
- && b->type != bp_catch_exec
- && b->type != bp_catch_catch
- && b->type != bp_catch_throw)
+ b->owner->number);
+
+ if (b->loc_type == bp_loc_software_breakpoint
+ || b->loc_type == bp_loc_hardware_breakpoint)
{
/* "Normal" instruction breakpoint: either the standard
trap-instruction bp (bp_breakpoint), or a
@@ -1379,7 +1403,7 @@ remove_breakpoint (struct breakpoint *b, insertion_state_t is)
{
/* No overlay handling: just remove the breakpoint. */
- if (b->type == bp_hardware_breakpoint)
+ if (b->loc_type == bp_loc_hardware_breakpoint)
val = target_remove_hw_breakpoint (b->address,
b->shadow_contents);
else
@@ -1398,7 +1422,7 @@ remove_breakpoint (struct breakpoint *b, insertion_state_t is)
b->section);
/* Ignore any failures: if the LMA is in ROM, we will
have already warned when we failed to insert it. */
- if (b->type != bp_hardware_breakpoint)
+ if (b->loc_type == bp_loc_hardware_breakpoint)
target_remove_hw_breakpoint (addr, b->shadow_contents);
else
target_remove_breakpoint (addr, b->shadow_contents);
@@ -1411,7 +1435,7 @@ remove_breakpoint (struct breakpoint *b, insertion_state_t is)
remove the breakpoint if the section had been
unmapped, but let's not rely on that being safe. We
don't know what the overlay manager might do. */
- if (b->type == bp_hardware_breakpoint)
+ if (b->loc_type == bp_loc_hardware_breakpoint)
val = target_remove_hw_breakpoint (b->address,
b->shadow_contents);
else
@@ -1428,10 +1452,8 @@ remove_breakpoint (struct breakpoint *b, insertion_state_t is)
return val;
b->inserted = (is == mark_inserted);
}
- else if ((b->type == bp_hardware_watchpoint ||
- b->type == bp_read_watchpoint ||
- b->type == bp_access_watchpoint)
- && b->enable_state == bp_enabled
+ else if (b->loc_type == bp_loc_hardware_watchpoint
+ && b->owner->enable_state == bp_enabled
&& !b->duplicate)
{
struct value *v;
@@ -1439,7 +1461,7 @@ remove_breakpoint (struct breakpoint *b, insertion_state_t is)
b->inserted = (is == mark_inserted);
/* Walk down the saved value chain. */
- for (v = b->val_chain; v; v = v->next)
+ for (v = b->owner->val_chain; v; v = v->next)
{
/* For each memory reference remove the watchpoint
at that address. */
@@ -1448,7 +1470,7 @@ remove_breakpoint (struct breakpoint *b, insertion_state_t is)
{
struct type *vtype = check_typedef (VALUE_TYPE (v));
- if (v == b->val_chain
+ if (v == b->owner->val_chain
|| (TYPE_CODE (vtype) != TYPE_CODE_STRUCT
&& TYPE_CODE (vtype) != TYPE_CODE_ARRAY))
{
@@ -1458,9 +1480,9 @@ remove_breakpoint (struct breakpoint *b, insertion_state_t is)
addr = VALUE_ADDRESS (v) + VALUE_OFFSET (v);
len = TYPE_LENGTH (VALUE_TYPE (v));
type = hw_write;
- if (b->type == bp_read_watchpoint)
+ if (b->owner->type == bp_read_watchpoint)
type = hw_read;
- else if (b->type == bp_access_watchpoint)
+ else if (b->owner->type == bp_access_watchpoint)
type = hw_access;
val = target_remove_watchpoint (addr, len, type);
@@ -1473,25 +1495,25 @@ remove_breakpoint (struct breakpoint *b, insertion_state_t is)
/* Failure to remove any of the hardware watchpoints comes here. */
if ((is == mark_uninserted) && (b->inserted))
warning ("Could not remove hardware watchpoint %d.",
- b->number);
+ b->owner->number);
/* Free the saved value chain. We will construct a new one
the next time the watchpoint is inserted. */
- for (v = b->val_chain; v; v = n)
+ for (v = b->owner->val_chain; v; v = n)
{
n = v->next;
value_free (v);
}
- b->val_chain = NULL;
+ b->owner->val_chain = NULL;
}
- else if ((b->type == bp_catch_fork ||
- b->type == bp_catch_vfork ||
- b->type == bp_catch_exec)
- && b->enable_state == bp_enabled
+ else if ((b->owner->type == bp_catch_fork ||
+ b->owner->type == bp_catch_vfork ||
+ b->owner->type == bp_catch_exec)
+ && b->owner->enable_state == bp_enabled
&& !b->duplicate)
{
val = -1;
- switch (b->type)
+ switch (b->owner->type)
{
case bp_catch_fork:
val = target_remove_fork_catchpoint (PIDGET (inferior_ptid));
@@ -1510,9 +1532,9 @@ remove_breakpoint (struct breakpoint *b, insertion_state_t is)
return val;
b->inserted = (is == mark_inserted);
}
- else if ((b->type == bp_catch_catch ||
- b->type == bp_catch_throw)
- && b->enable_state == bp_enabled
+ else if ((b->owner->type == bp_catch_catch ||
+ b->owner->type == bp_catch_throw)
+ && b->owner->enable_state == bp_enabled
&& !b->duplicate)
{
@@ -1521,9 +1543,9 @@ remove_breakpoint (struct breakpoint *b, insertion_state_t is)
return val;
b->inserted = (is == mark_inserted);
}
- else if (ep_is_exception_catchpoint (b)
+ else if (ep_is_exception_catchpoint (b->owner)
&& b->inserted /* sometimes previous insert doesn't happen */
- && b->enable_state == bp_enabled
+ && b->owner->enable_state == bp_enabled
&& !b->duplicate)
{
@@ -1542,10 +1564,10 @@ remove_breakpoint (struct breakpoint *b, insertion_state_t is)
void
mark_breakpoints_out (void)
{
- struct breakpoint *b;
+ struct bp_location *bpt;
- ALL_BREAKPOINTS (b)
- b->inserted = 0;
+ ALL_BP_LOCATIONS (bpt)
+ bpt->inserted = 0;
}
/* Clear the "inserted" flag in all breakpoints and delete any
@@ -1564,12 +1586,14 @@ void
breakpoint_init_inferior (enum inf_context context)
{
struct breakpoint *b, *temp;
+ struct bp_location *bpt;
static int warning_needed = 0;
+ ALL_BP_LOCATIONS (bpt)
+ bpt->inserted = 0;
+
ALL_BREAKPOINTS_SAFE (b, temp)
{
- b->inserted = 0;
-
switch (b->type)
{
case bp_call_dummy:
@@ -1638,23 +1662,29 @@ breakpoint_init_inferior (enum inf_context context)
enum breakpoint_here
breakpoint_here_p (CORE_ADDR pc)
{
- struct breakpoint *b;
+ struct bp_location *bpt;
int any_breakpoint_here = 0;
- ALL_BREAKPOINTS (b)
- if ((b->enable_state == bp_enabled
- || b->enable_state == bp_permanent)
- && b->address == pc) /* bp is enabled and matches pc */
- {
- if (overlay_debugging
- && section_is_overlay (b->section)
- && !section_is_mapped (b->section))
- continue; /* unmapped overlay -- can't be a match */
- else if (b->enable_state == bp_permanent)
- return permanent_breakpoint_here;
- else
- any_breakpoint_here = 1;
- }
+ ALL_BP_LOCATIONS (bpt)
+ {
+ if (bpt->loc_type != bp_loc_software_breakpoint
+ && bpt->loc_type != bp_loc_hardware_breakpoint)
+ continue;
+
+ if ((bpt->owner->enable_state == bp_enabled
+ || bpt->owner->enable_state == bp_permanent)
+ && bpt->address == pc) /* bp is enabled and matches pc */
+ {
+ if (overlay_debugging
+ && section_is_overlay (bpt->section)
+ && !section_is_mapped (bpt->section))
+ continue; /* unmapped overlay -- can't be a match */
+ else if (bpt->owner->enable_state == bp_permanent)
+ return permanent_breakpoint_here;
+ else
+ any_breakpoint_here = 1;
+ }
+ }
return any_breakpoint_here ? ordinary_breakpoint_here : 0;
}
@@ -1667,18 +1697,24 @@ breakpoint_here_p (CORE_ADDR pc)
int
breakpoint_inserted_here_p (CORE_ADDR pc)
{
- struct breakpoint *b;
+ struct bp_location *bpt;
- ALL_BREAKPOINTS (b)
- if (b->inserted
- && b->address == pc) /* bp is inserted and matches pc */
+ ALL_BP_LOCATIONS (bpt)
{
- if (overlay_debugging
- && section_is_overlay (b->section)
- && !section_is_mapped (b->section))
- continue; /* unmapped overlay -- can't be a match */
- else
- return 1;
+ if (bpt->loc_type != bp_loc_software_breakpoint
+ && bpt->loc_type != bp_loc_hardware_breakpoint)
+ continue;
+
+ if (bpt->inserted
+ && bpt->address == pc) /* bp is inserted and matches pc */
+ {
+ if (overlay_debugging
+ && section_is_overlay (bpt->section)
+ && !section_is_mapped (bpt->section))
+ continue; /* unmapped overlay -- can't be a match */
+ else
+ return 1;
+ }
}
return 0;
@@ -1707,38 +1743,43 @@ deprecated_frame_in_dummy (struct frame_info *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->address
+ >= (b->loc->address
- DEPRECATED_SIZEOF_CALL_DUMMY_WORDS / sizeof (LONGEST) * DEPRECATED_REGISTER_SIZE))
- && get_frame_pc (frame) <= b->address)
+ && get_frame_pc (frame) <= b->loc->address)
return 1;
}
return 0;
}
-/* breakpoint_thread_match (PC, PID) returns true if the breakpoint at
- PC is valid for process/thread PID. */
+/* breakpoint_thread_match (PC, PTID) returns true if the breakpoint at
+ PC is valid for process/thread PTID. */
int
breakpoint_thread_match (CORE_ADDR pc, ptid_t ptid)
{
- struct breakpoint *b;
+ struct bp_location *bpt;
int thread;
thread = pid_to_thread_id (ptid);
- ALL_BREAKPOINTS (b)
- if (b->enable_state != bp_disabled
- && b->enable_state != bp_shlib_disabled
- && b->enable_state != bp_call_disabled
- && b->address == pc
- && (b->thread == -1 || b->thread == thread))
- {
- if (overlay_debugging
- && section_is_overlay (b->section)
- && !section_is_mapped (b->section))
- continue; /* unmapped overlay -- can't be a match */
- else
- return 1;
+ ALL_BP_LOCATIONS (bpt)
+ {
+ if (bpt->loc_type != bp_loc_software_breakpoint
+ && bpt->loc_type != bp_loc_hardware_breakpoint)
+ continue;
+
+ if ((bpt->owner->enable_state == bp_enabled
+ || bpt->owner->enable_state == bp_permanent)
+ && bpt->address == pc
+ && (bpt->owner->thread == -1 || bpt->owner->thread == thread))
+ {
+ if (overlay_debugging
+ && section_is_overlay (bpt->section)
+ && !section_is_mapped (bpt->section))
+ continue; /* unmapped overlay -- can't be a match */
+ else
+ return 1;
+ }
}
return 0;
@@ -1924,7 +1965,6 @@ bpstat_clear_actions (bpstat bs)
}
/* Stub for cleaning up our state if we error-out of a breakpoint command */
-/* ARGSUSED */
static void
cleanup_executing_breakpoints (void *ignore)
{
@@ -2025,6 +2065,10 @@ print_it_typical (bpstat bs)
{
case bp_breakpoint:
case bp_hardware_breakpoint:
+ if (bs->breakpoint_at->loc->address != bs->breakpoint_at->loc->requested_address)
+ breakpoint_adjustment_warning (bs->breakpoint_at->loc->requested_address,
+ bs->breakpoint_at->loc->address,
+ bs->breakpoint_at->number, 1);
annotate_breakpoint (bs->breakpoint_at->number);
ui_out_text (uiout, "\nBreakpoint ");
if (ui_out_is_mi_like_p (uiout))
@@ -2542,21 +2586,21 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
&& b->type != bp_catch_catch
&& b->type != bp_catch_throw) /* a non-watchpoint bp */
{
- if (b->address != bp_addr) /* address doesn't match */
+ if (b->loc->address != bp_addr) /* address doesn't match */
continue;
if (overlay_debugging /* unmapped overlay section */
- && section_is_overlay (b->section)
- && !section_is_mapped (b->section))
+ && section_is_overlay (b->loc->section)
+ && !section_is_mapped (b->loc->section))
continue;
}
if (b->type == bp_hardware_breakpoint)
{
- if (b->address != (*pc - DECR_PC_AFTER_HW_BREAK))
+ if (b->loc->address != (*pc - DECR_PC_AFTER_HW_BREAK))
continue;
if (overlay_debugging /* unmapped overlay section */
- && section_is_overlay (b->section)
- && !section_is_mapped (b->section))
+ && section_is_overlay (b->loc->section)
+ && !section_is_mapped (b->loc->section))
continue;
}
@@ -2793,8 +2837,8 @@ bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
bs->print = 0;
bs->commands = b->commands;
if (bs->commands &&
- (STREQ ("silent", bs->commands->line) ||
- (xdb_commands && STREQ ("Q", bs->commands->line))))
+ (strcmp ("silent", bs->commands->line) == 0
+ || (xdb_commands && strcmp ("Q", bs->commands->line) == 0)))
{
bs->commands = bs->commands->next;
bs->print = 0;
@@ -3140,13 +3184,11 @@ bpstat_should_step (void)
int
bpstat_have_active_hw_watchpoints (void)
{
- struct breakpoint *b;
- ALL_BREAKPOINTS (b)
- if ((b->enable_state == bp_enabled) &&
- (b->inserted) &&
- ((b->type == bp_hardware_watchpoint) ||
- (b->type == bp_read_watchpoint) ||
- (b->type == bp_access_watchpoint)))
+ struct bp_location *bpt;
+ ALL_BP_LOCATIONS (bpt)
+ if ((bpt->owner->enable_state == bp_enabled)
+ && bpt->inserted
+ && bpt->loc_type == bp_loc_hardware_watchpoint)
return 1;
return 0;
}
@@ -3412,13 +3454,13 @@ print_one_breakpoint (struct breakpoint *b,
if (addressprint)
{
annotate_field (4);
- ui_out_field_core_addr (uiout, "addr", b->address);
+ ui_out_field_core_addr (uiout, "addr", b->loc->address);
}
annotate_field (5);
- *last_addr = b->address;
+ *last_addr = b->loc->address;
if (b->source_file)
{
- sym = find_pc_sect_function (b->address, b->section);
+ sym = find_pc_sect_function (b->loc->address, b->loc->section);
if (sym)
{
ui_out_text (uiout, "in ");
@@ -3433,7 +3475,7 @@ print_one_breakpoint (struct breakpoint *b,
}
else
{
- print_address_symbolic (b->address, stb->stream, demangle, "");
+ print_address_symbolic (b->loc->address, stb->stream, demangle, "");
ui_out_field_stream (uiout, "at", stb);
}
break;
@@ -3666,7 +3708,6 @@ breakpoint_1 (int bnum, int allflag)
annotate_breakpoints_table_end ();
}
-/* ARGSUSED */
static void
breakpoints_info (char *bnum_exp, int from_tty)
{
@@ -3678,7 +3719,6 @@ breakpoints_info (char *bnum_exp, int from_tty)
breakpoint_1 (bnum, 0);
}
-/* ARGSUSED */
static void
maintenance_info_breakpoints (char *bnum_exp, int from_tty)
{
@@ -3699,15 +3739,15 @@ describe_other_breakpoints (CORE_ADDR pc, asection *section)
struct breakpoint *b;
ALL_BREAKPOINTS (b)
- if (b->address == pc) /* address match / overlay match */
- if (!overlay_debugging || b->section == section)
+ if (b->loc->address == pc) /* address match / overlay match */
+ if (!overlay_debugging || b->loc->section == section)
others++;
if (others > 0)
{
printf_filtered ("Note: breakpoint%s ", (others > 1) ? "s" : "");
ALL_BREAKPOINTS (b)
- if (b->address == pc) /* address match / overlay match */
- if (!overlay_debugging || b->section == section)
+ if (b->loc->address == pc) /* address match / overlay match */
+ if (!overlay_debugging || b->loc->section == section)
{
others--;
printf_filtered ("%d%s%s ",
@@ -3784,25 +3824,25 @@ breakpoint_address_is_meaningful (struct breakpoint *bpt)
static void
check_duplicates (struct breakpoint *bpt)
{
- struct breakpoint *b;
+ struct bp_location *b;
int count = 0;
- struct breakpoint *perm_bp = 0;
- CORE_ADDR address = bpt->address;
- asection *section = bpt->section;
+ struct bp_location *perm_bp = 0;
+ CORE_ADDR address = bpt->loc->address;
+ asection *section = bpt->loc->section;
if (! breakpoint_address_is_meaningful (bpt))
return;
- ALL_BREAKPOINTS (b)
- if (b->enable_state != bp_disabled
- && b->enable_state != bp_shlib_disabled
- && b->enable_state != bp_call_disabled
+ ALL_BP_LOCATIONS (b)
+ if (b->owner->enable_state != bp_disabled
+ && b->owner->enable_state != bp_shlib_disabled
+ && b->owner->enable_state != bp_call_disabled
&& b->address == address /* address / overlay match */
&& (!overlay_debugging || b->section == section)
- && breakpoint_address_is_meaningful (b))
+ && breakpoint_address_is_meaningful (b->owner))
{
/* Have we found a permanent breakpoint? */
- if (b->enable_state == bp_permanent)
+ if (b->owner->enable_state == bp_permanent)
{
perm_bp = b;
break;
@@ -3825,25 +3865,140 @@ check_duplicates (struct breakpoint *bpt)
"allegedly permanent breakpoint is not "
"actually inserted");
- ALL_BREAKPOINTS (b)
+ ALL_BP_LOCATIONS (b)
if (b != perm_bp)
{
- if (b->inserted)
- internal_error (__FILE__, __LINE__,
- "another breakpoint was inserted on top of "
- "a permanent breakpoint");
-
- if (b->enable_state != bp_disabled
- && b->enable_state != bp_shlib_disabled
- && b->enable_state != bp_call_disabled
+ if (b->owner->enable_state != bp_disabled
+ && b->owner->enable_state != bp_shlib_disabled
+ && b->owner->enable_state != bp_call_disabled
&& b->address == address /* address / overlay match */
&& (!overlay_debugging || b->section == section)
- && breakpoint_address_is_meaningful (b))
- b->duplicate = 1;
+ && breakpoint_address_is_meaningful (b->owner))
+ {
+ if (b->inserted)
+ internal_error (__FILE__, __LINE__,
+ "another breakpoint was inserted on top of "
+ "a permanent breakpoint");
+
+ b->duplicate = 1;
+ }
}
}
}
+static void
+breakpoint_adjustment_warning (CORE_ADDR from_addr, CORE_ADDR to_addr,
+ int bnum, int have_bnum)
+{
+ 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"));
+ if (have_bnum)
+ warning ("Breakpoint %d address previously adjusted from %s to %s.",
+ bnum, astr1, astr2);
+ else
+ warning ("Breakpoint address adjusted from %s to %s.", astr1, astr2);
+}
+
+/* Adjust a breakpoint's address to account for architectural constraints
+ on breakpoint placement. Return the adjusted address. Note: Very
+ few targets require this kind of adjustment. For most targets,
+ this function is simply the identity function. */
+
+static CORE_ADDR
+adjust_breakpoint_address (CORE_ADDR bpaddr)
+{
+ if (!gdbarch_adjust_breakpoint_address_p (current_gdbarch))
+ {
+ /* Very few targets need any kind of breakpoint adjustment. */
+ return bpaddr;
+ }
+ else
+ {
+ CORE_ADDR adjusted_bpaddr;
+
+ /* Some targets have architectural constraints on the placement
+ of breakpoint instructions. Obtain the adjusted address. */
+ adjusted_bpaddr = gdbarch_adjust_breakpoint_address (current_gdbarch,
+ bpaddr);
+
+ /* An adjusted breakpoint address can significantly alter
+ a user's expectations. Print a warning if an adjustment
+ is required. */
+ if (adjusted_bpaddr != bpaddr)
+ breakpoint_adjustment_warning (bpaddr, adjusted_bpaddr, 0, 0);
+
+ return adjusted_bpaddr;
+ }
+}
+
+/* Allocate a struct bp_location. */
+
+static struct bp_location *
+allocate_bp_location (struct breakpoint *bpt, enum bptype bp_type)
+{
+ struct bp_location *loc, *loc_p;
+
+ loc = xmalloc (sizeof (struct bp_location));
+ memset (loc, 0, sizeof (*loc));
+
+ loc->owner = bpt;
+
+ switch (bp_type)
+ {
+ case bp_breakpoint:
+ case bp_until:
+ case bp_finish:
+ case bp_longjmp:
+ case bp_longjmp_resume:
+ case bp_step_resume:
+ case bp_through_sigtramp:
+ case bp_watchpoint_scope:
+ case bp_call_dummy:
+ case bp_shlib_event:
+ case bp_thread_event:
+ case bp_overlay_event:
+ case bp_catch_load:
+ case bp_catch_unload:
+ loc->loc_type = bp_loc_software_breakpoint;
+ break;
+ case bp_hardware_breakpoint:
+ loc->loc_type = bp_loc_hardware_breakpoint;
+ break;
+ case bp_hardware_watchpoint:
+ case bp_read_watchpoint:
+ case bp_access_watchpoint:
+ loc->loc_type = bp_loc_hardware_watchpoint;
+ break;
+ case bp_watchpoint:
+ case bp_catch_fork:
+ case bp_catch_vfork:
+ case bp_catch_exec:
+ case bp_catch_catch:
+ case bp_catch_throw:
+ loc->loc_type = bp_loc_other;
+ break;
+ default:
+ internal_error (__FILE__, __LINE__, "unknown breakpoint type");
+ }
+
+ /* Add this breakpoint to the end of the chain. */
+
+ loc_p = bp_location_chain;
+ if (loc_p == 0)
+ bp_location_chain = loc;
+ else
+ {
+ while (loc_p->next)
+ loc_p = loc_p->next;
+ loc_p->next = loc;
+ }
+
+ return loc;
+}
+
/* set_raw_breakpoint() is a low level routine for allocating and
partially initializing a breakpoint of type BPTYPE. The newly
created breakpoint's address, section, source file name, and line
@@ -3866,13 +4021,15 @@ set_raw_breakpoint (struct symtab_and_line sal, enum bptype bptype)
b = (struct breakpoint *) xmalloc (sizeof (struct breakpoint));
memset (b, 0, sizeof (*b));
- b->address = sal.pc;
+ b->loc = allocate_bp_location (b, bptype);
+ b->loc->requested_address = sal.pc;
+ b->loc->address = adjust_breakpoint_address (b->loc->requested_address);
if (sal.symtab == NULL)
b->source_file = NULL;
else
b->source_file = savestring (sal.symtab->filename,
strlen (sal.symtab->filename));
- b->section = sal.section;
+ b->loc->section = sal.section;
b->type = bptype;
b->language = current_language->la_language;
b->input_radix = input_radix;
@@ -3919,7 +4076,7 @@ make_breakpoint_permanent (struct breakpoint *b)
b->enable_state = bp_permanent;
/* By definition, permanent breakpoints are already present in the code. */
- b->inserted = 1;
+ b->loc->inserted = 1;
}
static struct breakpoint *
@@ -3952,7 +4109,7 @@ create_longjmp_breakpoint (char *func_name)
b = create_internal_breakpoint (0, bp_longjmp_resume);
else
{
- if ((m = lookup_minimal_symbol_text (func_name, NULL, NULL)) == NULL)
+ if ((m = lookup_minimal_symbol_text (func_name, NULL)) == NULL)
return;
b = create_internal_breakpoint (SYMBOL_VALUE_ADDRESS (m), bp_longjmp);
@@ -4001,7 +4158,7 @@ create_overlay_event_breakpoint (char *func_name)
struct breakpoint *b;
struct minimal_symbol *m;
- if ((m = lookup_minimal_symbol_text (func_name, NULL, NULL)) == NULL)
+ if ((m = lookup_minimal_symbol_text (func_name, NULL)) == NULL)
return;
b = create_internal_breakpoint (SYMBOL_VALUE_ADDRESS (m),
@@ -4057,7 +4214,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->address));
+ xasprintf (&b->addr_string, "*0x%s", paddr (b->loc->address));
return b;
}
@@ -4108,8 +4265,8 @@ disable_breakpoints_in_shlibs (int silent)
if (((b->type == bp_breakpoint) ||
(b->type == bp_hardware_breakpoint)) &&
b->enable_state == bp_enabled &&
- !b->duplicate &&
- PC_SOLIB (b->address))
+ !b->loc->duplicate &&
+ PC_SOLIB (b->loc->address))
{
b->enable_state = bp_shlib_disabled;
if (!silent)
@@ -4140,7 +4297,7 @@ re_enable_breakpoints_in_shlibs (void)
/* Do not reenable the breakpoint if the shared library
is still not mapped in. */
- if (target_read_memory (b->address, buf, 1) == 0)
+ if (target_read_memory (b->loc->address, buf, 1) == 0)
b->enable_state = bp_enabled;
}
}
@@ -4357,7 +4514,8 @@ set_longjmp_resume_breakpoint (CORE_ADDR pc, struct frame_id frame_id)
ALL_BREAKPOINTS (b)
if (b->type == bp_longjmp_resume)
{
- b->address = pc;
+ b->loc->requested_address = pc;
+ b->loc->address = adjust_breakpoint_address (b->loc->requested_address);
b->enable_state = bp_enabled;
b->frame_id = frame_id;
check_duplicates (b);
@@ -4557,7 +4715,7 @@ mention (struct breakpoint *b)
if (addressprint || b->source_file == NULL)
{
printf_filtered (" at ");
- print_address_numeric (b->address, 1, gdb_stdout);
+ print_address_numeric (b->loc->address, 1, gdb_stdout);
}
if (b->source_file)
printf_filtered (": file %s, line %d.",
@@ -4619,7 +4777,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->address));
+ xasprintf (&b->addr_string, "*0x%s", paddr (b->loc->address));
b->cond_string = cond_string[i];
b->ignore_count = ignore_count;
b->enable_state = bp_enabled;
@@ -5320,7 +5478,6 @@ stopat_command (char *arg, int from_tty)
break_command_1 (arg, 0, from_tty);
}
-/* ARGSUSED */
/* accessflag: hw_write: watch write,
hw_read: watch read,
hw_access: watch access (read or write) */
@@ -5473,7 +5630,10 @@ watch_command_1 (char *arg, int accessflag, int from_tty)
scope_breakpoint->frame_id = get_frame_id (prev_frame);
/* Set the address at which we will stop. */
- scope_breakpoint->address = get_frame_pc (prev_frame);
+ scope_breakpoint->loc->requested_address
+ = get_frame_pc (prev_frame);
+ scope_breakpoint->loc->address
+ = adjust_breakpoint_address (scope_breakpoint->loc->requested_address);
/* The scope breakpoint is related to the watchpoint. We
will need to act on them together. */
@@ -5623,7 +5783,6 @@ until_break_command_continuation (struct continuation_arg *arg)
do_exec_cleanups (cleanups);
}
-/* ARGSUSED */
void
until_break_command (char *arg, int from_tty, int anywhere)
{
@@ -6066,10 +6225,10 @@ print_one_exception_catchpoint (struct breakpoint *b, CORE_ADDR *last_addr)
if (addressprint)
{
annotate_field (4);
- ui_out_field_core_addr (uiout, "addr", b->address);
+ ui_out_field_core_addr (uiout, "addr", b->loc->address);
}
annotate_field (5);
- *last_addr = b->address;
+ *last_addr = b->loc->address;
if (strstr (b->addr_string, "throw") != NULL)
ui_out_field_string (uiout, "what", "exception throw");
else
@@ -6425,14 +6584,14 @@ clear_command (char *arg, int from_tty)
&& b->type != bp_read_watchpoint
&& b->type != bp_access_watchpoint
/* Not if b is a watchpoint of any sort... */
- && (((sal.pc && (b->address == sal.pc))
- && (!section_is_overlay (b->section)
- || b->section == sal.section))
+ && (((sal.pc && (b->loc->address == sal.pc))
+ && (!section_is_overlay (b->loc->section)
+ || b->loc->section == sal.section))
/* Yes, if sal.pc matches b (modulo overlays). */
|| ((default_match || (0 == sal.pc))
&& b->source_file != NULL
&& sal.symtab != NULL
- && STREQ (b->source_file, sal.symtab->filename)
+ && strcmp (b->source_file, sal.symtab->filename) == 0
&& b->line_number == sal.line)))
/* Yes, if sal source file and line matches b. */
{
@@ -6512,6 +6671,7 @@ delete_breakpoint (struct breakpoint *bpt)
{
struct breakpoint *b;
bpstat bs;
+ struct bp_location *loc;
if (bpt == NULL)
error ("Internal error (attempted to delete a NULL breakpoint)");
@@ -6537,12 +6697,15 @@ delete_breakpoint (struct breakpoint *bpt)
delete_breakpoint_hook (bpt);
breakpoint_delete_event (bpt->number);
- if (bpt->inserted)
- remove_breakpoint (bpt, mark_inserted);
+ if (bpt->loc->inserted)
+ remove_breakpoint (bpt->loc, mark_inserted);
if (breakpoint_chain == bpt)
breakpoint_chain = bpt->next;
+ if (bp_location_chain == bpt->loc)
+ bp_location_chain = bpt->loc->next;
+
/* If we have callback-style exception catchpoints, don't go through
the adjustments to the C++ runtime library etc. if the inferior
isn't actually running. target_enable_exception_callback for a
@@ -6572,10 +6735,17 @@ delete_breakpoint (struct breakpoint *bpt)
break;
}
+ ALL_BP_LOCATIONS (loc)
+ if (loc->next == bpt->loc)
+ {
+ loc->next = bpt->loc->next;
+ break;
+ }
+
check_duplicates (bpt);
/* If this breakpoint was inserted, and there is another breakpoint
at the same address, we need to insert the other breakpoint. */
- if (bpt->inserted
+ if (bpt->loc->inserted
&& bpt->type != bp_hardware_watchpoint
&& bpt->type != bp_read_watchpoint
&& bpt->type != bp_access_watchpoint
@@ -6584,9 +6754,9 @@ delete_breakpoint (struct breakpoint *bpt)
&& bpt->type != bp_catch_exec)
{
ALL_BREAKPOINTS (b)
- if (b->address == bpt->address
- && b->section == bpt->section
- && !b->duplicate
+ if (b->loc->address == bpt->loc->address
+ && b->loc->section == bpt->loc->section
+ && !b->loc->duplicate
&& b->enable_state != bp_disabled
&& b->enable_state != bp_shlib_disabled
&& b->enable_state != bp_call_disabled)
@@ -6603,9 +6773,9 @@ delete_breakpoint (struct breakpoint *bpt)
"a permanent breakpoint");
if (b->type == bp_hardware_breakpoint)
- val = target_insert_hw_breakpoint (b->address, b->shadow_contents);
+ val = target_insert_hw_breakpoint (b->loc->address, b->loc->shadow_contents);
else
- val = target_insert_breakpoint (b->address, b->shadow_contents);
+ val = target_insert_breakpoint (b->loc->address, b->loc->shadow_contents);
/* If there was an error in the insert, print a message, then stop execution. */
if (val != 0)
@@ -6625,7 +6795,7 @@ delete_breakpoint (struct breakpoint *bpt)
{
fprintf_unfiltered (tmp_error_stream, "Cannot insert breakpoint %d.\n", b->number);
fprintf_filtered (tmp_error_stream, "Error accessing memory address ");
- print_address_numeric (b->address, 1, tmp_error_stream);
+ print_address_numeric (b->loc->address, 1, tmp_error_stream);
fprintf_filtered (tmp_error_stream, ": %s.\n",
safe_strerror (val));
}
@@ -6635,7 +6805,7 @@ delete_breakpoint (struct breakpoint *bpt)
error_stream(tmp_error_stream);
}
else
- b->inserted = 1;
+ b->loc->inserted = 1;
}
}
@@ -6675,6 +6845,7 @@ delete_breakpoint (struct breakpoint *bpt)
bp, we mark it as deleted before freeing its storage. */
bpt->type = bp_none;
+ xfree (bpt->loc);
xfree (bpt);
}
@@ -6816,12 +6987,12 @@ breakpoint_re_set_one (void *bint)
}
/* We need to re-set the breakpoint if the address changes... */
- if (b->address != sals.sals[i].pc
+ if (b->loc->address != sals.sals[i].pc
/* ...or new and old breakpoints both have source files, and
the source file name or the line number changes... */
|| (b->source_file != NULL
&& sals.sals[i].symtab != NULL
- && (!STREQ (b->source_file, sals.sals[i].symtab->filename)
+ && (strcmp (b->source_file, sals.sals[i].symtab->filename) != 0
|| b->line_number != sals.sals[i].line)
)
/* ...or we switch between having a source file and not having
@@ -6838,7 +7009,9 @@ breakpoint_re_set_one (void *bint)
savestring (sals.sals[i].symtab->filename,
strlen (sals.sals[i].symtab->filename));
b->line_number = sals.sals[i].line;
- b->address = sals.sals[i].pc;
+ b->loc->requested_address = sals.sals[i].pc;
+ b->loc->address
+ = adjust_breakpoint_address (b->loc->requested_address);
/* Used to check for duplicates here, but that can
cause trouble, as it doesn't check for disabled
@@ -6850,7 +7023,7 @@ breakpoint_re_set_one (void *bint)
rather than once for every breakpoint. */
breakpoints_changed ();
}
- b->section = sals.sals[i].section;
+ b->loc->section = sals.sals[i].section;
b->enable_state = save_enable; /* Restore it, this worked. */
@@ -7132,7 +7305,6 @@ disable_breakpoint (struct breakpoint *bpt)
breakpoint_modify_event (bpt->number);
}
-/* ARGSUSED */
static void
disable_command (char *args, int from_tty)
{
@@ -7266,7 +7438,6 @@ enable_breakpoint (struct breakpoint *bpt)
breakpoints) so they once again become (or continue to be) effective
in stopping the inferior. */
-/* ARGSUSED */
static void
enable_command (char *args, int from_tty)
{
@@ -7306,7 +7477,6 @@ enable_once_breakpoint (struct breakpoint *bpt)
do_enable_breakpoint (bpt, disp_disable);
}
-/* ARGSUSED */
static void
enable_once_command (char *args, int from_tty)
{
@@ -7319,7 +7489,6 @@ enable_delete_breakpoint (struct breakpoint *bpt)
do_enable_breakpoint (bpt, disp_del);
}
-/* ARGSUSED */
static void
enable_delete_command (char *args, int from_tty)
{
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 86eec4a..85cc8b9 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -184,6 +184,79 @@ enum target_hw_bp_type
hw_execute = 3 /* Execute HW breakpoint */
};
+/* GDB maintains two types of information about each breakpoint (or
+ watchpoint, or other related event). The first type corresponds
+ to struct breakpoint; this is a relatively high-level structure
+ which contains the source location(s), stopping conditions, user
+ commands to execute when the breakpoint is hit, and so forth.
+
+ The second type of information corresponds to struct bp_location.
+ Each breakpoint has one or (eventually) more locations associated
+ with it, which represent target-specific and machine-specific
+ mechanisms for stopping the program. For instance, a watchpoint
+ expression may require multiple hardware watchpoints in order to
+ catch all changes in the value of the expression being watched. */
+
+enum bp_loc_type
+{
+ bp_loc_software_breakpoint,
+ bp_loc_hardware_breakpoint,
+ bp_loc_hardware_watchpoint,
+ bp_loc_other /* Miscellaneous... */
+};
+
+struct bp_location
+{
+ /* Chain pointer to the next breakpoint location. */
+ struct bp_location *next;
+
+ /* Type of this breakpoint location. */
+ enum bp_loc_type loc_type;
+
+ /* Each breakpoint location must belong to exactly one higher-level
+ breakpoint. This and the DUPLICATE flag are more straightforward
+ than reference counting. */
+ struct breakpoint *owner;
+
+ /* Nonzero if this breakpoint is now inserted. */
+ char inserted;
+
+ /* Nonzero if this is not the first breakpoint in the list
+ for the given address. */
+ char duplicate;
+
+ /* If we someday support real thread-specific breakpoints, then
+ the breakpoint location will need a thread identifier. */
+
+ /* Data for specific breakpoint types. These could be a union, but
+ simplicity is more important than memory usage for breakpoints. */
+
+ /* Note that zero is a perfectly valid code address on some platforms
+ (for example, the mn10200 (OBSOLETE) and mn10300 simulators). NULL
+ is not a special value for this field. Valid for all types except
+ bp_loc_other. */
+ CORE_ADDR address;
+
+ /* For any breakpoint type with an address, this is the BFD section
+ associated with the address. Used primarily for overlay debugging. */
+ asection *section;
+
+ /* "Real" contents of byte where breakpoint has been inserted.
+ Valid only when breakpoints are in the program. Under the complete
+ control of the target insert_breakpoint and remove_breakpoint routines.
+ No other code should assume anything about the value(s) here.
+ Valid only for bp_loc_software_breakpoint. */
+ char shadow_contents[BREAKPOINT_MAX];
+
+ /* Address at which breakpoint was requested, either by the user or
+ by GDB for internal breakpoints. This will usually be the same
+ as ``address'' (above) except for cases in which
+ ADJUST_BREAKPOINT_ADDRESS has computed a different address at
+ which to place the breakpoint in order to comply with a
+ processor's architectual constraints. */
+ CORE_ADDR requested_address;
+};
+
/* This structure is a collection of function pointers that, if available,
will be called instead of the performing the default action for this
bptype. */
@@ -222,11 +295,8 @@ struct breakpoint
/* Number assigned to distinguish breakpoints. */
int number;
- /* Address to break at. Note that zero is a perfectly valid code
- address on some platforms (for example, the OBSOLETE mn10200
- and mn10300 simulators). NULL is not a special value for this
- field. */
- CORE_ADDR address;
+ /* Location(s) associated with this high-level breakpoint. */
+ struct bp_location *loc;
/* Line number of this address. */
@@ -242,16 +312,6 @@ struct breakpoint
/* Number of stops at this breakpoint that should
be continued automatically before really stopping. */
int ignore_count;
- /* "Real" contents of byte where breakpoint has been inserted.
- Valid only when breakpoints are in the program. Under the complete
- control of the target insert_breakpoint and remove_breakpoint routines.
- No other code should assume anything about the value(s) here. */
- char shadow_contents[BREAKPOINT_MAX];
- /* Nonzero if this breakpoint is now inserted. */
- char inserted;
- /* Nonzero if this is not the first breakpoint in the list
- for the given address. */
- char duplicate;
/* Chain of command lines to execute when this breakpoint is hit. */
struct command_line *commands;
/* Stack depth (address of frame). If nonzero, break only if fp
@@ -323,8 +383,6 @@ struct breakpoint
triggered. */
char *exec_pathname;
- asection *section;
-
/* Methods associated with this breakpoint. */
struct breakpoint_ops *ops;
};
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index ff89218..a3ac7d6 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -164,7 +164,6 @@ find_symbol_in_list (struct pending *list, char *name, int length)
/* At end of reading syms, or in case of quit, really free as many
`struct pending's as we can easily find. */
-/* ARGSUSED */
void
really_free_pendings (void *dummy)
{
@@ -593,17 +592,9 @@ start_subfile (const char *name, char *dirname)
later via a call to record_debugformat. */
subfile->debugformat = NULL;
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* cfront output is a C program, so in most ways it looks like a C
-// OBSOLETE program. But to demangle we need to set the language to C++. We
-// OBSOLETE can distinguish cfront code by the fact that it has #line
-// OBSOLETE directives which specify a file name ending in .C. */
-#endif /* OBSOLETE CFront */
-
/* If the filename of this subfile ends in .C, then change the
language of any pending subfiles from C to C++. We also accept
any other C++ suffixes accepted by deduce_language_from_filename. */
- /* OBSOLETE (in particular, some people use .cxx with cfront). */
/* Likewise for f2c. */
if (subfile->name)
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index abe52d7..206170d 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -705,7 +705,7 @@ variable: name_not_typename
else
{
struct minimal_symbol *msymbol;
- register char *arg = copy_name ($1.stoken);
+ char *arg = copy_name ($1.stoken);
msymbol =
lookup_minimal_symbol_linkage_or_natural (arg);
@@ -1045,20 +1045,20 @@ name_not_typename : NAME
static int
parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
+ char *p;
+ int len;
int parsed_float;
YYSTYPE *putithere;
{
/* FIXME: Shouldn't these be unsigned? We don't deal with negative values
here, and we do kind of silly things like cast to unsigned. */
- register LONGEST n = 0;
- register LONGEST prevn = 0;
+ LONGEST n = 0;
+ LONGEST prevn = 0;
ULONGEST un;
- register int i = 0;
- register int c;
- register int base = input_radix;
+ int i = 0;
+ int c;
+ int base = input_radix;
int unsigned_p = 0;
/* Number of "L" suffixes encountered. */
@@ -1338,7 +1338,7 @@ yylex ()
tokstart = lexptr;
/* See if it is a special token of length 3. */
for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
- if (STREQN (tokstart, tokentab3[i].operator, 3))
+ if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
{
lexptr += 3;
yylval.opcode = tokentab3[i].opcode;
@@ -1347,7 +1347,7 @@ yylex ()
/* See if it is a special token of length 2. */
for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
- if (STREQN (tokstart, tokentab2[i].operator, 2))
+ if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
{
lexptr += 2;
yylval.opcode = tokentab2[i].opcode;
@@ -1455,7 +1455,7 @@ yylex ()
{
/* It's a number. */
int got_dot = 0, got_e = 0, toktype;
- register char *p = tokstart;
+ char *p = tokstart;
int hex = input_radix > 10;
if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
@@ -1643,52 +1643,52 @@ yylex ()
switch (namelen)
{
case 8:
- if (STREQN (tokstart, "unsigned", 8))
+ if (strncmp (tokstart, "unsigned", 8) == 0)
return UNSIGNED;
if (current_language->la_language == language_cplus
- && STREQN (tokstart, "template", 8))
+ && strncmp (tokstart, "template", 8) == 0)
return TEMPLATE;
- if (STREQN (tokstart, "volatile", 8))
+ if (strncmp (tokstart, "volatile", 8) == 0)
return VOLATILE_KEYWORD;
break;
case 6:
- if (STREQN (tokstart, "struct", 6))
+ if (strncmp (tokstart, "struct", 6) == 0)
return STRUCT;
- if (STREQN (tokstart, "signed", 6))
+ if (strncmp (tokstart, "signed", 6) == 0)
return SIGNED_KEYWORD;
- if (STREQN (tokstart, "sizeof", 6))
+ if (strncmp (tokstart, "sizeof", 6) == 0)
return SIZEOF;
- if (STREQN (tokstart, "double", 6))
+ if (strncmp (tokstart, "double", 6) == 0)
return DOUBLE_KEYWORD;
break;
case 5:
if (current_language->la_language == language_cplus)
{
- if (STREQN (tokstart, "false", 5))
+ if (strncmp (tokstart, "false", 5) == 0)
return FALSEKEYWORD;
- if (STREQN (tokstart, "class", 5))
+ if (strncmp (tokstart, "class", 5) == 0)
return CLASS;
}
- if (STREQN (tokstart, "union", 5))
+ if (strncmp (tokstart, "union", 5) == 0)
return UNION;
- if (STREQN (tokstart, "short", 5))
+ if (strncmp (tokstart, "short", 5) == 0)
return SHORT;
- if (STREQN (tokstart, "const", 5))
+ if (strncmp (tokstart, "const", 5) == 0)
return CONST_KEYWORD;
break;
case 4:
- if (STREQN (tokstart, "enum", 4))
+ if (strncmp (tokstart, "enum", 4) == 0)
return ENUM;
- if (STREQN (tokstart, "long", 4))
+ if (strncmp (tokstart, "long", 4) == 0)
return LONG;
if (current_language->la_language == language_cplus)
{
- if (STREQN (tokstart, "true", 4))
+ if (strncmp (tokstart, "true", 4) == 0)
return TRUEKEYWORD;
}
break;
case 3:
- if (STREQN (tokstart, "int", 3))
+ if (strncmp (tokstart, "int", 3) == 0)
return INT_KEYWORD;
break;
default:
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 4a5a362..a296d81 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -543,9 +543,9 @@ const struct language_defn c_language_defn =
range_check_off,
type_check_off,
case_sensitive_on,
+ &exp_descriptor_standard,
c_preprocess_and_parse,
c_error,
- evaluate_subexp_standard,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
@@ -565,6 +565,7 @@ const struct language_defn c_language_defn =
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
@@ -599,9 +600,9 @@ const struct language_defn cplus_language_defn =
range_check_off,
type_check_off,
case_sensitive_on,
+ &exp_descriptor_standard,
c_preprocess_and_parse,
c_error,
- evaluate_subexp_standard,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
@@ -621,6 +622,7 @@ const struct language_defn cplus_language_defn =
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
@@ -632,9 +634,9 @@ const struct language_defn asm_language_defn =
range_check_off,
type_check_off,
case_sensitive_on,
+ &exp_descriptor_standard,
c_preprocess_and_parse,
c_error,
- evaluate_subexp_standard,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
@@ -654,6 +656,7 @@ const struct language_defn asm_language_defn =
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
@@ -670,9 +673,9 @@ const struct language_defn minimal_language_defn =
range_check_off,
type_check_off,
case_sensitive_on,
+ &exp_descriptor_standard,
c_preprocess_and_parse,
c_error,
- evaluate_subexp_standard,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
@@ -692,6 +695,7 @@ const struct language_defn minimal_language_defn =
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index ac46735..85e1610 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -859,10 +859,11 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
QUIT;
/* Don't print out virtual function table. */
/* HP ANSI C++ case */
- if (TYPE_HAS_VTABLE (type) && (STREQN (TYPE_FIELD_NAME (type, i), "__vfp", 5)))
+ if (TYPE_HAS_VTABLE (type)
+ && (strncmp (TYPE_FIELD_NAME (type, i), "__vfp", 5) == 0))
continue;
/* Other compilers */
- if (STREQN (TYPE_FIELD_NAME (type, i), "_vptr", 5)
+ if (strncmp (TYPE_FIELD_NAME (type, i), "_vptr", 5) == 0
&& is_cplus_marker ((TYPE_FIELD_NAME (type, i))[5]))
continue;
@@ -944,7 +945,7 @@ c_type_print_base (struct type *type, struct ui_file *stream, int show,
int j, len2 = TYPE_FN_FIELDLIST_LENGTH (type, i);
char *method_name = TYPE_FN_FIELDLIST_NAME (type, i);
const char *name = type_name_no_tag (type);
- int is_constructor = name && STREQ (method_name, name);
+ int is_constructor = name && strcmp (method_name, name) == 0;
for (j = 0; j < len2; j++)
{
char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 3e8cf74..af47ba1 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -30,6 +30,7 @@
#include "language.h"
#include "c-lang.h"
#include "cp-abi.h"
+#include "target.h"
/* Print function pointer with inferior address ADDRESS onto stdio
@@ -38,7 +39,9 @@
static void
print_function_pointer_address (CORE_ADDR address, struct ui_file *stream)
{
- CORE_ADDR func_addr = CONVERT_FROM_FUNC_PTR_ADDR (address);
+ CORE_ADDR func_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ address,
+ &current_target);
/* If the function pointer is represented by a description, print the
address of the description. */
diff --git a/gdb/cli-out.c b/gdb/cli-out.c
index 2e5a3c1..9f48a0a 100644
--- a/gdb/cli-out.c
+++ b/gdb/cli-out.c
@@ -118,7 +118,7 @@ cli_table_begin (struct ui_out *uiout, int nbrofcols,
if (nr_rows == 0)
data->suppress_output = 1;
else
- /* Only the table suppresses the output and, fortunatly, a table
+ /* Only the table suppresses the output and, fortunately, a table
is not a recursive data structure. */
gdb_assert (data->suppress_output == 0);
}
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 45794f7..6f9fe90 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -184,7 +184,6 @@ error_no_arg (char *why)
/* The "info" command is defined as a prefix, with allow_unknown = 0.
Therefore, its own definition is called only for "info" with no args. */
-/* ARGSUSED */
static void
info_command (char *arg, int from_tty)
{
@@ -194,7 +193,6 @@ info_command (char *arg, int from_tty)
/* The "show" command with no arguments shows all the settings. */
-/* ARGSUSED */
static void
show_command (char *arg, int from_tty)
{
@@ -204,7 +202,6 @@ show_command (char *arg, int from_tty)
/* Provide documentation on command or list given by COMMAND. FROM_TTY
is ignored. */
-/* ARGSUSED */
static void
help_command (char *command, int from_tty)
{
@@ -222,7 +219,6 @@ compare_strings (const void *arg1, const void *arg2)
/* The "complete" command is used by Emacs to implement completion. */
-/* ARGSUSED */
static void
complete_command (char *arg, int from_tty)
{
@@ -275,7 +271,6 @@ is_complete_command (struct cmd_list_element *c)
return cmd_cfunc_eq (c, complete_command);
}
-/* ARGSUSED */
static void
show_version (char *args, int from_tty)
{
@@ -295,7 +290,6 @@ quit_command (char *args, int from_tty)
quit_force (args, from_tty);
}
-/* ARGSUSED */
static void
pwd_command (char *args, int from_tty)
{
@@ -303,7 +297,7 @@ pwd_command (char *args, int from_tty)
error ("The \"pwd\" command does not take an argument: %s", args);
getcwd (gdb_dirbuf, sizeof (gdb_dirbuf));
- if (!STREQ (gdb_dirbuf, current_directory))
+ if (strcmp (gdb_dirbuf, current_directory) != 0)
printf_unfiltered ("Working directory %s\n (canonically %s).\n",
current_directory, gdb_dirbuf);
else
@@ -439,12 +433,11 @@ source_command (char *args, int from_tty)
do_cleanups (old_cleanups);
}
-/* ARGSUSED */
static void
echo_command (char *text, int from_tty)
{
char *p = text;
- register int c;
+ int c;
if (text)
while ((c = *p++) != '\0')
@@ -469,7 +462,6 @@ echo_command (char *text, int from_tty)
gdb_flush (gdb_stdout);
}
-/* ARGSUSED */
static void
shell_escape (char *arg, int from_tty)
{
@@ -659,7 +651,7 @@ list_command (char *arg, int from_tty)
/* "l" or "l +" lists next ten lines. */
- if (arg == 0 || STREQ (arg, "+"))
+ if (arg == 0 || strcmp (arg, "+") == 0)
{
print_source_lines (cursal.symtab, cursal.line,
cursal.line + get_lines_to_list (), 0);
@@ -667,7 +659,7 @@ list_command (char *arg, int from_tty)
}
/* "l -" lists previous ten lines, the ones before the ten just listed. */
- if (STREQ (arg, "-"))
+ if (strcmp (arg, "-") == 0)
{
print_source_lines (cursal.symtab,
max (get_first_line_listed () - get_lines_to_list (), 1),
@@ -820,7 +812,6 @@ list_command (char *arg, int from_tty)
Two arguments are interpeted as bounds within which to dump
assembly. */
-/* ARGSUSED */
static void
disassemble_command (char *arg, int from_tty)
{
@@ -920,7 +911,6 @@ make_command (char *arg, int from_tty)
shell_escape (p, from_tty);
}
-/* ARGSUSED */
static void
show_user (char *args, int from_tty)
{
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 8a0d057..24965688e 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -133,7 +133,7 @@ struct cmd_list_element *
add_cmd (char *name, enum command_class class, void (*fun) (char *, int),
char *doc, struct cmd_list_element **list)
{
- register struct cmd_list_element *c
+ struct cmd_list_element *c
= (struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
struct cmd_list_element *p;
@@ -212,8 +212,8 @@ add_alias_cmd (char *name, char *oldname, enum command_class class,
{
/* Must do this since lookup_cmd tries to side-effect its first arg */
char *copied_name;
- register struct cmd_list_element *old;
- register struct cmd_list_element *c;
+ struct cmd_list_element *old;
+ struct cmd_list_element *c;
copied_name = (char *) alloca (strlen (oldname) + 1);
strcpy (copied_name, oldname);
old = lookup_cmd (&copied_name, *list, "", 1, 1);
@@ -247,7 +247,7 @@ add_prefix_cmd (char *name, enum command_class class, void (*fun) (char *, int),
char *prefixname, int allow_unknown,
struct cmd_list_element **list)
{
- register struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
+ struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
c->prefixlist = prefixlist;
c->prefixname = prefixname;
c->allow_unknown = allow_unknown;
@@ -262,7 +262,7 @@ add_abbrev_prefix_cmd (char *name, enum command_class class,
struct cmd_list_element **prefixlist, char *prefixname,
int allow_unknown, struct cmd_list_element **list)
{
- register struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
+ struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
c->prefixlist = prefixlist;
c->prefixname = prefixname;
c->allow_unknown = allow_unknown;
@@ -500,10 +500,10 @@ add_show_from_set (struct cmd_list_element *setcmd,
void
delete_cmd (char *name, struct cmd_list_element **list)
{
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
struct cmd_list_element *p;
- while (*list && STREQ ((*list)->name, name))
+ while (*list && strcmp ((*list)->name, name) == 0)
{
if ((*list)->hookee_pre)
(*list)->hookee_pre->hook_pre = 0; /* Hook slips out of its mouth */
@@ -517,7 +517,7 @@ delete_cmd (char *name, struct cmd_list_element **list)
if (*list)
for (c = *list; c->next;)
{
- if (STREQ (c->next->name, name))
+ if (strcmp (c->next->name, name) == 0)
{
if (c->next->hookee_pre)
c->next->hookee_pre->hook_pre = 0; /* hooked cmd gets away. */
@@ -577,7 +577,7 @@ void
apropos_cmd (struct ui_file *stream, struct cmd_list_element *commandlist,
struct re_pattern_buffer *regex, char *prefix)
{
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
int returnvalue=1; /*Needed to avoid double printing*/
/* Walk through the commands */
for (c=commandlist;c;c=c->next)
@@ -786,7 +786,7 @@ print_doc_line (struct ui_file *stream, char *str)
{
static char *line_buffer = 0;
static int line_size;
- register char *p;
+ char *p;
if (!line_buffer)
{
@@ -830,7 +830,7 @@ void
help_cmd_list (struct cmd_list_element *list, enum command_class class,
char *prefix, int recurse, struct ui_file *stream)
{
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
for (c = list; c; c = c->next)
{
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index ab69ca4..cac5408 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -255,7 +255,7 @@ do_restore_user_call_depth (void * call_depth)
void
execute_user_command (struct cmd_list_element *c, char *args)
{
- register struct command_line *cmdlines;
+ struct command_line *cmdlines;
struct cleanup *old_chain;
enum command_control_type ret;
static int user_call_depth = 0;
@@ -974,8 +974,8 @@ read_command_lines (char *prompt_arg, int from_tty)
void
free_command_lines (struct command_line **lptr)
{
- register struct command_line *l = *lptr;
- register struct command_line *next;
+ struct command_line *l = *lptr;
+ struct command_line *next;
struct command_line **blist;
int i;
@@ -1040,7 +1040,7 @@ copy_command_lines (struct command_line *cmds)
static void
validate_comname (char *comname)
{
- register char *p;
+ char *p;
if (comname == 0)
error_no_arg ("name of command to define");
@@ -1070,8 +1070,8 @@ define_command (char *comname, int from_tty)
CMD_PRE_HOOK,
CMD_POST_HOOK
};
- register struct command_line *cmds;
- register struct cmd_list_element *c, *newc, *oldc, *hookc = 0;
+ struct command_line *cmds;
+ struct cmd_list_element *c, *newc, *oldc, *hookc = 0;
char *tem = comname;
char *tem2;
char tmpbuf[MAX_TMPBUF];
@@ -1176,7 +1176,7 @@ void
document_command (char *comname, int from_tty)
{
struct command_line *doclines;
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
char *tem = comname;
char tmpbuf[128];
@@ -1194,8 +1194,8 @@ document_command (char *comname, int from_tty)
xfree (c->doc);
{
- register struct command_line *cl1;
- register int len = 0;
+ struct command_line *cl1;
+ int len = 0;
for (cl1 = doclines; cl1; cl1 = cl1->next)
len += strlen (cl1->line) + 1;
@@ -1233,7 +1233,6 @@ source_cleanup_lines (void *args)
error_pre_print = p->old_error_pre_print;
}
-/* ARGSUSED */
static void
do_fclose_cleanup (void *stream)
{
@@ -1290,7 +1289,7 @@ script_from_file (FILE *stream, char *file)
void
show_user_1 (struct cmd_list_element *c, struct ui_file *stream)
{
- register struct command_line *cmdlines;
+ struct command_line *cmdlines;
cmdlines = c->user_commands;
if (!cmdlines)
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 50c5e02..0a983f0 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -477,9 +477,8 @@ coff_symfile_init (struct objfile *objfile)
of the line table (minimum and maximum file offset) so that the
mainline code can read the whole thing for efficiency. */
-/* ARGSUSED */
static void
-find_linenos (bfd *abfd, sec_ptr asect, void *vpinfo)
+find_linenos (bfd *abfd, struct bfd_section *asect, void *vpinfo)
{
struct coff_symfile_info *info;
int size, count;
@@ -514,7 +513,6 @@ static bfd *symfile_bfd;
/* Read a symbol file, after initialization by coff_symfile_init. */
-/* ARGSUSED */
static void
coff_symfile_read (struct objfile *objfile, int mainline)
{
@@ -937,15 +935,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
if (cs->c_name[0] != '@' /* Skip tdesc symbols */ )
{
struct minimal_symbol *msym;
-
- /* FIXME: cagney/2001-02-01: The nasty (int) -> (long)
- -> (void*) cast is to ensure that that the value of
- cs->c_sclass can be correctly stored in a void
- pointer in MSYMBOL_INFO. Better solutions
- welcome. */
- gdb_assert (sizeof (void *) >= sizeof (cs->c_sclass));
msym = prim_record_minimal_symbol_and_info
- (cs->c_name, tmpaddr, ms_type, (void *) (long) cs->c_sclass,
+ (cs->c_name, tmpaddr, ms_type, NULL,
sec, NULL, objfile);
if (msym)
COFF_MAKE_MSYMBOL_SPECIAL (cs->c_sclass, msym);
@@ -1448,7 +1439,7 @@ patch_opaque_types (struct symtab *s)
for (sym = opaque_type_chain[hash]; sym;)
{
if (name[0] == DEPRECATED_SYMBOL_NAME (sym)[0] &&
- STREQ (name + 1, DEPRECATED_SYMBOL_NAME (sym) + 1))
+ strcmp (name + 1, DEPRECATED_SYMBOL_NAME (sym) + 1) == 0)
{
if (prev)
{
@@ -1652,11 +1643,6 @@ process_coff_symbol (struct coff_symbol *cs,
TYPE_NAME (SYMBOL_TYPE (sym)) =
concat (DEPRECATED_SYMBOL_NAME (sym), NULL);
}
-#ifdef CXUX_TARGET
- /* Ignore vendor section for Harris CX/UX targets. */
- else if (cs->c_name[0] == '$')
- break;
-#endif /* CXUX_TARGET */
/* Keep track of any type which points to empty structured type,
so it can be filled from a definition from another file. A
@@ -1809,15 +1795,6 @@ decode_base_type (struct coff_symbol *cs, unsigned int c_type,
/* shows up with "void (*foo)();" structure members */
return lookup_fundamental_type (current_objfile, FT_VOID);
-#if 0
-/* DGUX actually defines both T_ARG and T_VOID to the same value. */
-#ifdef T_ARG
- case T_ARG:
- /* Shows up in DGUX, I think. Not sure where. */
- return lookup_fundamental_type (current_objfile, FT_VOID); /* shouldn't show up here */
-#endif
-#endif /* 0 */
-
#ifdef T_VOID
case T_VOID:
/* Intel 960 COFF has this symbol and meaning. */
@@ -2045,7 +2022,6 @@ coff_read_struct_type (int index, int length, int lastsym)
and create and return a suitable type object.
Also defines the symbols that represent the values of the type. */
-/* ARGSUSED */
static struct type *
coff_read_enum_type (int index, int length, int lastsym)
{
diff --git a/gdb/command.h b/gdb/command.h
index 9cadd63..c4a5f20 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -157,7 +157,7 @@ extern void execute_cmd_post_hook (struct cmd_list_element *cmd);
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.
- Unfortunatly, for ``show'' commands cloned from ``set'', this
+ 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?). */
diff --git a/gdb/complaints.c b/gdb/complaints.c
index 252e654..ed24f43 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -210,7 +210,7 @@ vcomplaint (struct complaints **c, const char *file, int line, const char *fmt,
trailing newline, the wrap_here() is just a hint. */
if (series == ISOLATED_MESSAGE)
/* It would be really nice to use begin_line() here.
- Unfortunatly that function doesn't track GDB_STDERR and
+ Unfortunately that function doesn't track GDB_STDERR and
consequently will sometimes supress a line when it
shouldn't. */
fputs_filtered ("\n", gdb_stderr);
@@ -292,7 +292,7 @@ clear_complaints (struct complaints **c, int less_verbose, int noisy)
break;
case SUBSEQUENT_MESSAGE:
/* It would be really nice to use begin_line() here.
- Unfortunatly that function doesn't track GDB_STDERR and
+ Unfortunately that function doesn't track GDB_STDERR and
consequently will sometimes supress a line when it shouldn't. */
fputs_unfiltered ("\n", gdb_stderr);
break;
diff --git a/gdb/completer.c b/gdb/completer.c
index 4274241..1ab71be 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -23,6 +23,7 @@
#include "gdbtypes.h"
#include "expression.h"
#include "filenames.h" /* for DOSish file names */
+#include "language.h"
#include "cli/cli-decode.h"
@@ -51,13 +52,11 @@ char *line_completion_function (const char *text, int matches, char *line_buffer
it does affect how much stuff M-? lists.
(2) If one of the matches contains a word break character, readline
will quote it. That's why we switch between
- gdb_completer_word_break_characters and
+ current_language->la_word_break_characters() and
gdb_completer_command_word_break_characters. I'm not sure when
we need this behavior (perhaps for funky characters in C++ symbols?). */
/* Variables which are necessary for fancy command line editing. */
-static char *gdb_completer_word_break_characters =
-" \t\n!@#$%^&*()+=|~`}{[]\"';:?/>.<,-";
/* When completing on command names, we remove '-' from the list of
word break characters, since we use it in command names. If the
@@ -91,12 +90,6 @@ static char *gdb_completer_quote_characters = "'";
/* Accessor for some completer data that may interest other files. */
char *
-get_gdb_completer_word_break_characters (void)
-{
- return gdb_completer_word_break_characters;
-}
-
-char *
get_gdb_completer_quote_characters (void)
{
return gdb_completer_quote_characters;
@@ -251,7 +244,7 @@ location_completer (char *text, char *word)
colon = p;
symbol_start = p + 1;
}
- else if (strchr (gdb_completer_word_break_characters, *p))
+ else if (strchr (current_language->la_word_break_characters(), *p))
symbol_start = p + 1;
}
@@ -399,7 +392,7 @@ complete_line (const char *text, char *line_buffer, int point)
'-' character used in some commands. */
rl_completer_word_break_characters =
- gdb_completer_word_break_characters;
+ current_language->la_word_break_characters();
/* Decide whether to complete on a list of gdb commands or on symbols. */
tmp_command = (char *) alloca (point + 1);
@@ -674,7 +667,7 @@ line_completion_function (const char *text, int matches, char *line_buffer, int
/* Make sure the word break characters are set back to normal for the
next time that readline tries to complete something. */
rl_completer_word_break_characters =
- gdb_completer_word_break_characters;
+ current_language->la_word_break_characters();
#endif
return (output);
@@ -696,7 +689,7 @@ skip_quoted_chars (char *str, char *quotechars, char *breakchars)
quotechars = gdb_completer_quote_characters;
if (breakchars == NULL)
- breakchars = gdb_completer_word_break_characters;
+ breakchars = current_language->la_word_break_characters();
for (scan = str; *scan != '\0'; scan++)
{
diff --git a/gdb/completer.h b/gdb/completer.h
index 7a96951..0a8e9fa 100644
--- a/gdb/completer.h
+++ b/gdb/completer.h
@@ -31,8 +31,6 @@ extern char **location_completer (char *, char *);
extern char **command_completer (char *, char *);
-extern char *get_gdb_completer_word_break_characters (void);
-
extern char *get_gdb_completer_quote_characters (void);
/* Exported to linespec.c */
diff --git a/gdb/config/arm/linux.mt b/gdb/config/arm/linux.mt
index c17b2e5..cd6f010 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
-TDEPFILES= arm-tdep.o arm-linux-tdep.o solib.o solib-svr4.o solib-legacy.o
+TDEPFILES= arm-tdep.o arm-linux-tdep.o glibc-tdep.o solib.o solib-svr4.o solib-legacy.o
diff --git a/gdb/config/d10v/d10v.mt b/gdb/config/d10v/d10v.mt
index 72680e2..805ce76 100644
--- a/gdb/config/d10v/d10v.mt
+++ b/gdb/config/d10v/d10v.mt
@@ -1,4 +1,4 @@
-# Target: Mitsubishi D10V processor
+# Target: Renesas D10V processor
TDEPFILES= d10v-tdep.o
SIM_OBS= remote-sim.o
SIM= ../sim/d10v/libsim.a
diff --git a/gdb/config/djgpp/fnchange.lst b/gdb/config/djgpp/fnchange.lst
index 9c2fac7..2bcb5f9 100644
--- a/gdb/config/djgpp/fnchange.lst
+++ b/gdb/config/djgpp/fnchange.lst
@@ -16,22 +16,14 @@
@V@/bfd/elf32-frv.c @V@/bfd/elf32fv.c
@V@/bfd/elf32-i370.c @V@/bfd/e32i370.c
@V@/bfd/elf32-i386.c @V@/bfd/e32i86.c
-@V@/bfd/elf32-i386qnx.c @V@/bfd/e32i86q.c
@V@/bfd/elf32-m68hc11.c @V@/bfd/em68hc11.c
@V@/bfd/elf32-m68hc12.c @V@/bfd/em68hc12.c
@V@/bfd/elf32-m68k.c @V@/bfd/em68k.c
@V@/bfd/elf32-ppc.c @V@/bfd/e32ppc.c
-@V@/bfd/elf32-ppcqnx.c @V@/bfd/e32ppcq.c
@V@/bfd/elf32-sh.c @V@/bfd/e32sh.c
-@V@/bfd/elf32-shqnx.c @V@/bfd/e32shq.c
-@V@/bfd/elf32-sh-lin.c @V@/bfd/e32shlin.c
-@V@/bfd/elf32-sh-nbsd.c @V@/bfd/e32shn.c
@V@/bfd/elf32-sh64.c @V@/bfd/e32sh64.c
-@V@/bfd/elf32-sh64-nbsd.c @V@/bfd/e32sh64n.c
@V@/bfd/elf64-alpha.c @V@/bfd/e64alphf.c
-@V@/bfd/elf64-alpha-fbsd.c @V@/bfd/e64alph.c
@V@/bfd/elf64-sh64.c @V@/bfd/e64sh64.c
-@V@/bfd/elf64-sh64-nbsd.c @V@/bfd/e64sh64n.c
@V@/bfd/po/.cvsignore @V@/bfd/po/_cvsignore
@V@/dejagnu/baseboards/mn10200-cygmon.exp @V@/dejagnu/baseboards/mn10200cygmon.exp
@V@/dejagnu/baseboards/mn10200-sim.exp @V@/dejagnu/baseboards/mn10200sim.exp
@@ -70,11 +62,12 @@
@V@/gdb/ChangeLog-2002 @V@/gdb/ChangeLog.002
@V@/gdb/ChangeLog-3.x @V@/gdb/ChangeLog.3-x
@V@/gdb/ada-exp.tab.c @V@/gdb/ada-exp_tab.c
-@V@/gdb/amd64fbsd-tdep.c @V@/gdb/a64fb-tdep.c
@V@/gdb/amd64fbsd-nat.c @V@/gdb/a64fb-nat.c
+@V@/gdb/amd64fbsd-tdep.c @V@/gdb/a64fb-tdep.c
+@V@/gdb/amd64nbsd-nat.c @V@/gdb/a64nb-nat.c
+@V@/gdb/amd64nbsd-tdep.c @V@/gdb/a64nb-tdep.c
@V@/gdb/alphabsd-nat.c @V@/gdb/alphb-nat.c
@V@/gdb/alphabsd-tdep.c @V@/gdb/alphb-tdep.c
-@V@/gdb/alphanbsd-nat.c @V@/gdb/alphnb-nat.c
@V@/gdb/alphanbsd-tdep.c @V@/gdb/alphnb-tdep.c
@V@/gdb/arm-linux-nat.c @V@/gdb/armlin-nat.c
@V@/gdb/arm-linux-tdep.c @V@/gdb/armlin-tdep.c
@@ -91,34 +84,16 @@
@V@/gdb/config/i386/nm-i386sol2.h @V@/gdb/config/i386/nm-sol2.h
@V@/gdb/config/i386/nm-i386v4.h @V@/gdb/config/i386/nm-v4.h
@V@/gdb/config/i386/nm-i386v42mp.h @V@/gdb/config/i386/nm-v42mp.h
-@V@/gdb/config/i386/tm-i386mk.h @V@/gdb/config/i386/tm-mk.h
@V@/gdb/config/i386/tm-i386sol2.h @V@/gdb/config/i386/tm-sol2.h
-@V@/gdb/config/i386/tm-i386v42mp.h @V@/gdb/config/i386/tm-v42mp.h
-@V@/gdb/config/i386/xm-i386mach.h @V@/gdb/config/i386/xm-mach.h
-@V@/gdb/config/i386/xm-i386mk.h @V@/gdb/config/i386/xm-mk.h
-@V@/gdb/config/i386/xm-i386v32.h @V@/gdb/config/i386/xm-v32.h
@V@/gdb/config/i386/xm-i386v4.h @V@/gdb/config/i386/xm-v4.h
-@V@/gdb/config/m68k/apollo68v.mh @V@/gdb/config/m68k/apollo-v.mh
-@V@/gdb/config/m68k/nm-apollo68v.h @V@/gdb/config/m68k/nm-apolv.h
-@V@/gdb/config/m68k/xm-apollo68v.h @V@/gdb/config/m68k/xm-apolv.h
-@V@/gdb/config/m88k/tm-delta88v4.h @V@/gdb/config/m88k/tm-d88v4.h
@V@/gdb/config/m88k/xm-delta88v4.h @V@/gdb/config/m88k/xm-d88v4.h
-@V@/gdb/config/mips/tm-bigmips64.h @V@/gdb/config/mips/tm-bigm64.h
-@V@/gdb/config/mips/tm-embed64.h @V@/gdb/config/mips/tm-emb64.h
-@V@/gdb/config/mips/tm-embedl.h @V@/gdb/config/mips/tm-embdl.h
-@V@/gdb/config/mips/tm-embedl64.h @V@/gdb/config/mips/tm-embl64.h
@V@/gdb/config/mips/tm-linux.h @V@/gdb/config/mips/tm-lx.h
@V@/gdb/config/mips/tm-linux64.h @V@/gdb/config/mips/tm-lx64.h
-@V@/gdb/config/mips/tm-vr4300el.h @V@/gdb/config/mips/tm-v43el.h
-@V@/gdb/config/mips/tm-vr4xxxel.h @V@/gdb/config/mips/tm-v4xel.h
-@V@/gdb/config/mips/tm-vr5000el.h @V@/gdb/config/mips/tm-vr5kel.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-ppcl-sim.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/sparc/tm-sparclet.h @V@/gdb/config/sparc/tm-splet.h
-@V@/gdb/config/sparc/tm-sparclite.h @V@/gdb/config/sparc/tm-splite.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
@@ -126,18 +101,18 @@
@V@/gdb/gdbtk/generic/ChangeLog-1998 @V@/gdb/gdbtk/generic/ChangeLog.98
@V@/gdb/gdbtk/generic/ChangeLog-1999 @V@/gdb/gdbtk/generic/ChangeLog.99
@V@/gdb/gdbtk/generic/ChangeLog-2000 @V@/gdb/gdbtk/generic/ChangeLog.000
-@V@/gdb/gdbtk/generic/ChangeLog-2001 @V@/gdb/gdbtk/generic/ChangeLog.001
@V@/gdb/gdbtk/generic/gdbtk-varobj.c @V@/gdb/gdbtk/generic/gdbtk-vobj.c
@V@/gdb/gdbtk/library/ChangeLog-1997 @V@/gdb/gdbtk/library/ChangeLog.97
@V@/gdb/gdbtk/library/ChangeLog-1998 @V@/gdb/gdbtk/library/ChangeLog.98
@V@/gdb/gdbtk/library/ChangeLog-1999 @V@/gdb/gdbtk/library/ChangeLog.99
@V@/gdb/gdbtk/library/ChangeLog-2000 @V@/gdb/gdbtk/library/ChangeLog.000
-@V@/gdb/gdbtk/library/ChangeLog-2001 @V@/gdb/gdbtk/library/ChangeLog.001
@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/i386linux-tdep.c
@V@/gdb/i386bsd-nat.c @V@/gdb/i3bsd-nat.c
@V@/gdb/i386bsd-tdep.c @V@/gdb/i3bsd-tdep.c
+@V@/gdb/i386fbsd-nat.c @V@/gdb/i3fbsd-nat.c
+@V@/gdb/i386fbsd-tdep.c @V@/gdb/i3fbsd-tdep.c
@V@/gdb/i386gnu-nat.c @V@/gdb/i3gnu-nat.c
@V@/gdb/i386gnu-tdep.c @V@/gdb/i3gnu-tdep.c
@V@/gdb/i386nbsd-nat.c @V@/gdb/i3nbsd-nat.c
@@ -166,27 +141,20 @@
@V@/gdb/ppcnbsd-tdep.c @V@/gdb/ppcnb-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-adapt.c @V@/gdb/rmt-adapt.c
@V@/gdb/remote-e7000.c @V@/gdb/rmt-e7000.c
-@V@/gdb/remote-eb.c @V@/gdb/rmt-eb.c
@V@/gdb/remote-est.c @V@/gdb/rmt-est.c
@V@/gdb/remote-mips.c @V@/gdb/emt-mips.c
-@V@/gdb/remote-mm.c @V@/gdb/emt-mm.c
-@V@/gdb/remote-nrom.c @V@/gdb/rmt-nrom.c
@V@/gdb/remote-rdi.c @V@/gdb/rmt-rdi.c
@V@/gdb/remote-rdp.c @V@/gdb/rmt-rdp.c
@V@/gdb/remote-sds.c @V@/gdb/rmt-sds.c
@V@/gdb/remote-sim.c @V@/gdb/rmt-sim.c
@V@/gdb/remote-st.c @V@/gdb/rmt-st.c
-@V@/gdb/remote-udi.c @V@/gdb/rmt-udi.c
@V@/gdb/remote-vx.c @V@/gdb/rmt-vx.c
-@V@/gdb/remote-vx29k.c @V@/gdb/rmt-vx29k.c
@V@/gdb/remote-vx68.c @V@/gdb/rmt-vx68.c
-@V@/gdb/remote-vx960.c @V@/gdb/rmt-vx960.c
@V@/gdb/remote-vxmips.c @V@/gdb/rmt-vxmips.c
@V@/gdb/remote-vxsparc.c @V@/gdb/rmt-vxsparc.c
-@V@/gdb/sparclet-rom.c @V@/gdb/splet-rom.c
-@V@/gdb/sparclet-stub.c @V@/gdb/splet-stub.c
+@V@/gdb/sparc64fbsd-nat.c @V@/gdb/sp64fb-nat.c
+@V@/gdb/sparc64fbsd-tdep.c @V@/gdb/sp64fb-tdep.c
@V@/gdb/sparcnbsd-nat.c @V@/gdb/spnb-nat.c
@V@/gdb/sparcnbsd-tdep.c @V@/gdb/spnb-tdep.c
@V@/gdb/testsuite/.gdbinit @V@/gdb/testsuite/gdb.ini
@@ -198,10 +166,6 @@
@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
@V@/gdb/testsuite/gdb.mi/mi-var-cmd.exp @V@/gdb/testsuite/gdb.mi/mi-varcmd.exp
-@V@/gdb/testsuite/gdb.mi/mi0-var-block.exp @V@/gdb/testsuite/gdb.mi/mi0varblock.exp
-@V@/gdb/testsuite/gdb.mi/mi0-var-child.exp @V@/gdb/testsuite/gdb.mi/mi0varchild.exp
-@V@/gdb/testsuite/gdb.mi/mi0-var-cmd.exp @V@/gdb/testsuite/gdb.mi/mi0varcmd.exp
-@V@/gdb/testsuite/gdb.mi/mi0-var-display.exp @V@/gdb/testsuite/gdb.mi/mi0vardisplay.exp
@V@/gdb/testsuite/gdb.mi/mi1-var-block.exp @V@/gdb/testsuite/gdb.mi/mi1varblock.exp
@V@/gdb/testsuite/gdb.mi/mi1-var-child.exp @V@/gdb/testsuite/gdb.mi/mi1varchild.exp
@V@/gdb/testsuite/gdb.mi/mi1-var-cmd.exp @V@/gdb/testsuite/gdb.mi/mi1varcmd.exp
@@ -223,96 +187,6 @@
@V@/itcl/itk/itkConfig.sh.in @V@/itcl/itk/itkConfig.sh-in
@V@/itcl/itk/unix/pkgIndex.tcl.in @V@/itcl/itk/unix/pkgIndex.t-in
@V@/itcl/iwidgets3.0.0 @V@/itcl/iwidgets3.0-0
-@V@/itcl/iwidgets3.0.0/demos/extfileselectionbox @V@/itcl/iwidgets3.0-0/demos/efselbox
-@V@/itcl/iwidgets3.0.0/demos/extfileselectiondialog @V@/itcl/iwidgets3.0-0/demos/efseldialog
-@V@/itcl/iwidgets3.0.0/demos/fileselectionbox @V@/itcl/iwidgets3.0-0/demos/fselectbox
-@V@/itcl/iwidgets3.0.0/demos/fileselectiondialog @V@/itcl/iwidgets3.0-0/demos/fselectdialog
-@V@/itcl/iwidgets3.0.0/demos/html/buttonbox.n.html @V@/itcl/iwidgets3.0-0/demos/html/buttonbox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/canvasprintbox.n.html @V@/itcl/iwidgets3.0-0/demos/html/cprintbox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/canvasprintdialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/cprintdialog.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/combobox.n.html @V@/itcl/iwidgets3.0-0/demos/html/combobox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/dialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/dialog.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/dialogshell.n.html @V@/itcl/iwidgets3.0-0/demos/html/dialogshell.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/entryfield.n.html @V@/itcl/iwidgets3.0-0/demos/html/entryfield.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/feedback.n.html @V@/itcl/iwidgets3.0-0/demos/html/feedback.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/fileselectionbox.n.html @V@/itcl/iwidgets3.0-0/demos/html/fselectbox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/fileselectiondialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/fselectdialog.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/hyperhelp.n.html @V@/itcl/iwidgets3.0-0/demos/html/hyperhelp.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/iwidgets2.2.0UserCmds.html @V@/itcl/iwidgets3.0-0/demos/html/iw220UserCmds.html
-@V@/itcl/iwidgets3.0.0/demos/html/labeledwidget.n.html @V@/itcl/iwidgets3.0-0/demos/html/labeledwidget.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/menubar.n.html @V@/itcl/iwidgets3.0-0/demos/html/menubar.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/messagedialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/messagedialog.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/notebook.n.html @V@/itcl/iwidgets3.0-0/demos/html/notebook.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/optionmenu.n.html @V@/itcl/iwidgets3.0-0/demos/html/optionmenu.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/panedwindow.n.html @V@/itcl/iwidgets3.0-0/demos/html/panedwindow.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/promptdialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/promptdialog.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/pushbutton.n.html @V@/itcl/iwidgets3.0-0/demos/html/pushbutton.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/radiobox.n.html @V@/itcl/iwidgets3.0-0/demos/html/radiobox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/scrolledcanvas.n.html @V@/itcl/iwidgets3.0-0/demos/html/scrolcanvas.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/scrolledframe.n.html @V@/itcl/iwidgets3.0-0/demos/html/scrolframe.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/scrolledhtml.n.html @V@/itcl/iwidgets3.0-0/demos/html/scrolhtml.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/scrolledlistbox.n.html @V@/itcl/iwidgets3.0-0/demos/html/scrollistbox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/scrolledtext.n.html @V@/itcl/iwidgets3.0-0/demos/html/scroltext.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/selectionbox.n.html @V@/itcl/iwidgets3.0-0/demos/html/selectbox.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/selectiondialog.n.html @V@/itcl/iwidgets3.0-0/demos/html/selectdialog.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/shell.n.html @V@/itcl/iwidgets3.0-0/demos/html/shell.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/spindate.n.html @V@/itcl/iwidgets3.0-0/demos/html/spindate.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/spinint.n.html @V@/itcl/iwidgets3.0-0/demos/html/spinint.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/spinner.n.html @V@/itcl/iwidgets3.0-0/demos/html/spinner.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/spintime.n.html @V@/itcl/iwidgets3.0-0/demos/html/spintime.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/tabnotebook.n.html @V@/itcl/iwidgets3.0-0/demos/html/tabnotebook.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/tabset.n.html @V@/itcl/iwidgets3.0-0/demos/html/tabset.n-html
-@V@/itcl/iwidgets3.0.0/demos/html/toolbar.n.html @V@/itcl/iwidgets3.0-0/demos/html/toolbar.n-html
-@V@/itcl/iwidgets3.0.0/demos/scrolledcanvas @V@/itcl/iwidgets3.0-0/demos/scrolcanvas
-@V@/itcl/iwidgets3.0.0/demos/scrolledframe @V@/itcl/iwidgets3.0-0/demos/scrolframe
-@V@/itcl/iwidgets3.0.0/demos/scrolledhtml @V@/itcl/iwidgets3.0-0/demos/scrolhtml
-@V@/itcl/iwidgets3.0.0/demos/scrolledlistbox @V@/itcl/iwidgets3.0-0/demos/scroldlistbox
-@V@/itcl/iwidgets3.0.0/demos/scrolledtext @V@/itcl/iwidgets3.0-0/demos/scroltext
-@V@/itcl/iwidgets3.0.0/demos/selectionbox @V@/itcl/iwidgets3.0-0/demos/selectbox
-@V@/itcl/iwidgets3.0.0/demos/selectiondialog @V@/itcl/iwidgets3.0-0/demos/selectdialog
-@V@/itcl/iwidgets3.0.0/doc/canvasprintbox.n @V@/itcl/iwidgets3.0-0/doc/cprintbox.n
-@V@/itcl/iwidgets3.0.0/doc/canvasprintdialog.n @V@/itcl/iwidgets3.0-0/doc/cprintdialog.n
-@V@/itcl/iwidgets3.0.0/doc/extfileselectionbox.n @V@/itcl/iwidgets3.0-0/doc/efselbox.n
-@V@/itcl/iwidgets3.0.0/doc/extfileselectiondialog.n @V@/itcl/iwidgets3.0-0/doc/efseldialog.n
-@V@/itcl/iwidgets3.0.0/doc/fileselectionbox.n @V@/itcl/iwidgets3.0-0/doc/fselectbox.n
-@V@/itcl/iwidgets3.0.0/doc/fileselectiondialog.n @V@/itcl/iwidgets3.0-0/doc/fselectdialog.n
-@V@/itcl/iwidgets3.0.0/doc/scopedobject.n.backup @V@/itcl/iwidgets3.0-0/doc/scopedobject.n-backup
-@V@/itcl/iwidgets3.0.0/doc/scrolledcanvas.n @V@/itcl/iwidgets3.0-0/doc/scrolcanvas.n
-@V@/itcl/iwidgets3.0.0/doc/scrolledframe.n @V@/itcl/iwidgets3.0-0/doc/scrolframe.n
-@V@/itcl/iwidgets3.0.0/doc/scrolledhtml.n @V@/itcl/iwidgets3.0-0/doc/scrolhtml.n
-@V@/itcl/iwidgets3.0.0/doc/scrolledlistbox.n @V@/itcl/iwidgets3.0-0/doc/scrollistbox.n
-@V@/itcl/iwidgets3.0.0/doc/scrolledtext.n @V@/itcl/iwidgets3.0-0/doc/scroltext.n
-@V@/itcl/iwidgets3.0.0/doc/selectionbox.n @V@/itcl/iwidgets3.0-0/doc/selectbox.n
-@V@/itcl/iwidgets3.0.0/doc/selectiondialog.n @V@/itcl/iwidgets3.0-0/doc/selectdialog.n
-@V@/itcl/iwidgets3.0.0/generic/canvasprintbox.itk @V@/itcl/iwidgets3.0-0/generic/cprintbox.itk
-@V@/itcl/iwidgets3.0.0/generic/canvasprintdialog.itk @V@/itcl/iwidgets3.0-0/generic/cprintdialog.itk
-@V@/itcl/iwidgets3.0.0/generic/extfileselectionbox.itk @V@/itcl/iwidgets3.0-0/generic/efselbox.itk
-@V@/itcl/iwidgets3.0.0/generic/extfileselectiondialog.itk @V@/itcl/iwidgets3.0-0/generic/efseldialog.itk
-@V@/itcl/iwidgets3.0.0/generic/fileselectionbox.itk @V@/itcl/iwidgets3.0-0/generic/fselectbox.itk
-@V@/itcl/iwidgets3.0.0/generic/fileselectiondialog.itk @V@/itcl/iwidgets3.0-0/generic/fselectdialog.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledcanvas.itk @V@/itcl/iwidgets3.0-0/generic/scrolcanvas.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledframe.itk @V@/itcl/iwidgets3.0-0/generic/scrolframe.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledhtml.itk @V@/itcl/iwidgets3.0-0/generic/scrolhtml.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledlistbox.itk @V@/itcl/iwidgets3.0-0/generic/scrollistbox.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledtext.itk @V@/itcl/iwidgets3.0-0/generic/scroltext.itk
-@V@/itcl/iwidgets3.0.0/generic/scrolledwidget.itk @V@/itcl/iwidgets3.0-0/generic/scrolwidget.itk
-@V@/itcl/iwidgets3.0.0/generic/selectionbox.itk @V@/itcl/iwidgets3.0-0/generic/selectbox.itk
-@V@/itcl/iwidgets3.0.0/generic/selectiondialog.itk @V@/itcl/iwidgets3.0-0/generic/selectdialog.itk
-@V@/itcl/iwidgets3.0.0/tests/canvasprintbox.test @V@/itcl/iwidgets3.0-0/tests/cprintbox.test
-@V@/itcl/iwidgets3.0.0/tests/canvasprintdialog.test @V@/itcl/iwidgets3.0-0/tests/cprintdialog.test
-@V@/itcl/iwidgets3.0.0/tests/extfileselectionbox.test @V@/itcl/iwidgets3.0-0/tests/efselbox.test
-@V@/itcl/iwidgets3.0.0/tests/extfileselectiondialog.test @V@/itcl/iwidgets3.0-0/tests/efseldialog.test
-@V@/itcl/iwidgets3.0.0/tests/fileselectionbox.test @V@/itcl/iwidgets3.0-0/tests/fselectbox.test
-@V@/itcl/iwidgets3.0.0/tests/fileselectiondialog.test @V@/itcl/iwidgets3.0-0/tests/fselectdialog.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledcanvas.test @V@/itcl/iwidgets3.0-0/tests/scrolcanvas.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledframe.test @V@/itcl/iwidgets3.0-0/tests/scrolframe.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledhtml.test @V@/itcl/iwidgets3.0-0/tests/scrolhtml.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledlistbox.test @V@/itcl/iwidgets3.0-0/tests/scrollistbox.test
-@V@/itcl/iwidgets3.0.0/tests/scrolledtext.test @V@/itcl/iwidgets3.0-0/tests/scroltext.test
-@V@/itcl/iwidgets3.0.0/tests/selectionbox.test @V@/itcl/iwidgets3.0-0/tests/selectbox.test
-@V@/itcl/iwidgets3.0.0/tests/selectiondialog.test @V@/itcl/iwidgets3.0-0/tests/selectdialog.test
-@V@/itcl/iwidgets3.0.0/unix/iwidgets.tcl.in @V@/itcl/iwidgets3.0-0/unix/iwidgets.t-in
-@V@/itcl/iwidgets3.0.0/unix/pkgIndex.tcl.in @V@/itcl/iwidgets3.0-0/unix/pkgIndex.t-in
@V@/libgui/config.h.in @V@/libgui/config.h-in
@V@/libgui/src/tkTableCell.c @V@/libgui/src/tkTabCell.c
@V@/libgui/src/tkTableCmd.c @V@/libgui/src/tkTabCmd.c
@@ -390,6 +264,13 @@
@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/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
+@V@/sim/testsuite/sim/frv/interrupts/compound-fr550.cgs @V@/sim/testsuite/sim/frv/interrupts/fr550-compound.cgs
+@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@/tcl/cygwin/tclConfig.sh.in @V@/tcl/cygwin/tclConfig.sh-in
@V@/tcl/doc/ExprLongObj.3 @V@/tcl/doc/ExprLObj.3
@V@/tcl/mac/tclMacBOAAppInit.c @V@/tcl/mac/tclBOAAppInit.c
@@ -407,29 +288,8 @@
@V@/tcl/unix/tclUnixFile.c @V@/tcl/unix/tclFile.c
@V@/tcl/unix/tclUnixTest.c @V@/tcl/unix/tclTest.c
@V@/tcl/unix/tclUnixTime.c @V@/tcl/unix/tclTime.c
-@V@/tix/docs/Release-4.1.0.html @V@/tix/docs/Rel4_10.html
-@V@/tix/docs/Release-4.1.0.txt @V@/tix/docs/Rel4_10.txt
-@V@/tix/docs/Release-4.1a2.html @V@/tix/docs/Rel4_1a2.html
-@V@/tix/docs/Release-4.1a2.txt @V@/tix/docs/Rel4_1a2.txt
-@V@/tix/docs/Release-4.1a3.html @V@/tix/docs/Rel4_1a3.html
-@V@/tix/docs/Release-4.1a3.txt @V@/tix/docs/Rel4_1a3.txt
-@V@/tix/docs/Release-4.1b1.html @V@/tix/docs/Rel4_1b1.html
-@V@/tix/docs/Release-4.1b1.txt @V@/tix/docs/Rel4_1b1.txt
-@V@/tix/docs/Release-4.1b2.html @V@/tix/docs/Rel4_1b2.html
-@V@/tix/docs/Release-4.1b2.txt @V@/tix/docs/Rel4_1b2.txt
-@V@/tix/tixConfig.sh.in @V@/tix/tixConfig.sh-in
-@V@/tix/unix/tk4.2/pkgIndex.tcl.in @V@/tix/unix/tk4.2/pkgIndex.t-in
-@V@/tix/unix/tk8.0/pkgIndex.tcl.in @V@/tix/unix/tk8.0/pkgIndex.t-in
-@V@/tix/unix/tk8.0/pkgIndex.tcl.in @V@/tix/unix/tk8.0/pkgIndex.t-in
-@V@/tix/unix/tk8.1/pkgIndex.tcl.in @V@/tix/unix/tk8.1/pkgIndex.t-in
-@V@/tix/win/tkConsole41.c @V@/tix/win/tkCon41.c
-@V@/tix/win/tkConsole42.c @V@/tix/win/tkCon42.c
-@V@/tix/win/tkConsole80a1.c @V@/tix/win/tkCon80a1.c
-@V@/tix/win/tkConsole80b1.c @V@/tix/win/tkCon80b1.c
-@V@/tix/win/tkConsole81.c @V@/tix/win/tkCon81.c
@V@/tk/doc/ConfigWidg.3 @V@/tk/doc/CfgWidg.3
@V@/tk/doc/ConfigWind.3 @V@/tk/doc/CfgWind.3
-@V@/tk/doc/tk4.0.ps @V@/tk/doc/tk4-0.ps
@V@/tk/library/images/pwrdLogo100.gif @V@/tk/library/images/pwLogo100.gif
@V@/tk/library/images/pwrdLogo150.gif @V@/tk/library/images/pwLogo150.gif
@V@/tk/library/images/pwrdLogo175.gif @V@/tk/library/images/pwLogo175.gif
@@ -438,7 +298,6 @@
@V@/tk/mac/tkMacMenu.c @V@/tk/mac/tkMenu.c
@V@/tk/mac/tkMacMenubutton.c @V@/tk/mac/tkMenubutton.c
@V@/tk/mac/tkMacMenus.c @V@/tk/mac/tkMenus.c
-@V@/tk/mac/tkMacProjects.sit.hqx @V@/tk/mac/tkMacProjects.shqx
@V@/tk/tests/option.file1 @V@/tk/tests/option1.file
@V@/tk/tests/option.file2 @V@/tk/tests/option2.file
@V@/tk/unix/tkConfig.sh.in @V@/tk/unix/tkConfig.sh-in
diff --git a/gdb/config/h8300/tm-h8300.h b/gdb/config/h8300/tm-h8300.h
index 5d1aaa7..807d7c0 100644
--- a/gdb/config/h8300/tm-h8300.h
+++ b/gdb/config/h8300/tm-h8300.h
@@ -26,6 +26,7 @@
GDB_TARGET_IS_H8300 in remote-e7000.c */
extern int h8300hmode;
extern int h8300smode;
+extern int h8300_normal_mode; /* 1 - Normal Mode , 0 - Advanced mode */
extern int h8300sxmode;
#define GDB_TARGET_IS_H8300
diff --git a/gdb/config/h8500/h8500.mt b/gdb/config/h8500/h8500.mt
deleted file mode 100644
index 64608a0..0000000
--- a/gdb/config/h8500/h8500.mt
+++ /dev/null
@@ -1,6 +0,0 @@
-# OBSOLETE # Target: H8500 with HMS monitor and H8 simulator
-# OBSOLETE TDEPFILES= h8500-tdep.o monitor.o remote-hms.o dsrec.o
-# OBSOLETE TM_FILE= tm-h8500.h
-# OBSOLETE
-# OBSOLETE SIM_OBS = remote-sim.o
-# OBSOLETE SIM = ../sim/h8500/libsim.a
diff --git a/gdb/config/h8500/tm-h8500.h b/gdb/config/h8500/tm-h8500.h
deleted file mode 100644
index 4d0f640..0000000
--- a/gdb/config/h8500/tm-h8500.h
+++ /dev/null
@@ -1,295 +0,0 @@
-// OBSOLETE /* Parameters for execution on a H8/500 series machine.
-// OBSOLETE
-// OBSOLETE Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003 Free
-// OBSOLETE 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 /* NOTE: cagney/2002-11-24: This is a guess. */
-// OBSOLETE #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 0
-// OBSOLETE #define CALL_DUMMY_LOCATION ON_STACK
-// OBSOLETE #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
-// OBSOLETE
-// OBSOLETE /* Contributed by Steve Chamberlain sac@cygnus.com */
-// OBSOLETE
-// OBSOLETE #define GDB_TARGET_IS_H8500
-// OBSOLETE
-// OBSOLETE /* Define the sizes of integers and pointers. */
-// OBSOLETE
-// OBSOLETE #define TARGET_INT_BIT 16
-// OBSOLETE
-// OBSOLETE #define TARGET_LONG_BIT 32
-// OBSOLETE
-// OBSOLETE #define TARGET_PTR_BIT (minimum_mode ? 16 : 32)
-// OBSOLETE
-// OBSOLETE /* Offset from address of function to start of its code.
-// OBSOLETE Zero on most machines. */
-// OBSOLETE
-// OBSOLETE #define FUNCTION_START_OFFSET 0
-// OBSOLETE
-// OBSOLETE /* Advance PC across any function entry prologue instructions
-// OBSOLETE to reach some "real" code. */
-// OBSOLETE
-// OBSOLETE #define SKIP_PROLOGUE(ip) (h8500_skip_prologue (ip))
-// OBSOLETE extern CORE_ADDR h8500_skip_prologue (CORE_ADDR);
-// OBSOLETE
-// OBSOLETE /* Immediately after a function call, return the saved pc.
-// OBSOLETE Can't always go through the frames for this because on some machines
-// OBSOLETE the new frame is not set up until the new function executes
-// OBSOLETE some instructions. */
-// OBSOLETE
-// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) saved_pc_after_call()
-// OBSOLETE extern CORE_ADDR saved_pc_after_call (void);
-// OBSOLETE
-// OBSOLETE /* Stack grows downward. */
-// OBSOLETE
-// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-// OBSOLETE
-// OBSOLETE /* Illegal instruction - used by the simulator for breakpoint
-// OBSOLETE detection */
-// OBSOLETE
-// OBSOLETE #define BREAKPOINT {0x0b}
-// OBSOLETE
-// OBSOLETE /* If your kernel resets the pc after the trap happens you may need to
-// OBSOLETE define this before including this file. */
-// OBSOLETE
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0
-// OBSOLETE
-// OBSOLETE /* Say how long registers are. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_TYPE unsigned long
-// OBSOLETE
-// OBSOLETE /* Say how much memory is needed to store a copy of the register set */
-// OBSOLETE
-// OBSOLETE #define REGISTER_BYTES (NUM_REGS * 4)
-// OBSOLETE
-// OBSOLETE /* Index within `registers' of the first byte of the space for
-// OBSOLETE register N. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_BYTE(N) ((N)*4)
-// OBSOLETE
-// OBSOLETE /* Number of bytes of storage in the actual machine representation
-// OBSOLETE for register N. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_RAW_SIZE(N) h8500_register_size(N)
-// OBSOLETE extern int h8500_register_size (int regno);
-// OBSOLETE
-// OBSOLETE #define REGISTER_SIZE 4
-// OBSOLETE
-// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) h8500_register_size(N)
-// OBSOLETE
-// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
-// OBSOLETE
-// OBSOLETE #define MAX_REGISTER_RAW_SIZE 4
-// OBSOLETE
-// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. */
-// OBSOLETE
-// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4
-// OBSOLETE
-// OBSOLETE /* Return the GDB type object for the "standard" data type
-// OBSOLETE of data in register N. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) h8500_register_virtual_type(N)
-// OBSOLETE extern struct type *h8500_register_virtual_type (int regno);
-// OBSOLETE
-// OBSOLETE /* Initializer for an array of names of registers.
-// OBSOLETE Entries beyond the first NUM_REGS are ignored. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_NAMES \
-// OBSOLETE { "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
-// OBSOLETE "pr0","pr1","pr2","pr3","pr4","pr5","pr6","pr7", \
-// OBSOLETE "cp", "dp", "ep", "tp", "sr", "pc"}
-// OBSOLETE
-// OBSOLETE /* Register numbers of various important registers. Note that some of
-// OBSOLETE these values are "real" register numbers, and correspond to the
-// OBSOLETE general registers of the machine, and some are "phony" register
-// OBSOLETE numbers which are too large to be actual register numbers as far as
-// OBSOLETE the user is concerned but do serve to get the desired values when
-// OBSOLETE passed to read_register. */
-// OBSOLETE
-// OBSOLETE #define R0_REGNUM 0
-// OBSOLETE #define R1_REGNUM 1
-// OBSOLETE #define R2_REGNUM 2
-// OBSOLETE #define R3_REGNUM 3
-// OBSOLETE #define R4_REGNUM 4
-// OBSOLETE #define R5_REGNUM 5
-// OBSOLETE #define R6_REGNUM 6
-// OBSOLETE #define R7_REGNUM 7
-// OBSOLETE
-// OBSOLETE #define PR0_REGNUM 8
-// OBSOLETE #define PR1_REGNUM 9
-// OBSOLETE #define PR2_REGNUM 10
-// OBSOLETE #define PR3_REGNUM 11
-// OBSOLETE #define PR4_REGNUM 12
-// OBSOLETE #define PR5_REGNUM 13
-// OBSOLETE #define PR6_REGNUM 14
-// OBSOLETE #define PR7_REGNUM 15
-// OBSOLETE
-// OBSOLETE #define SEG_C_REGNUM 16 /* Segment registers */
-// OBSOLETE #define SEG_D_REGNUM 17
-// OBSOLETE #define SEG_E_REGNUM 18
-// OBSOLETE #define SEG_T_REGNUM 19
-// OBSOLETE
-// OBSOLETE #define CCR_REGNUM 20 /* Contains processor status */
-// OBSOLETE #define PC_REGNUM 21 /* Contains program counter */
-// OBSOLETE
-// OBSOLETE #define NUM_REGS 22
-// OBSOLETE
-// OBSOLETE #define SP_REGNUM PR7_REGNUM /* Contains address of top of stack */
-// OBSOLETE #define FP_REGNUM PR6_REGNUM /* Contains address of executing stack frame */
-// OBSOLETE
-// OBSOLETE #define PTR_SIZE (minimum_mode ? 2 : 4)
-// OBSOLETE #define PTR_MASK (minimum_mode ? 0x0000ffff : 0x00ffffff)
-// OBSOLETE
-// OBSOLETE /* Store the address of the place in which to copy the structure the
-// OBSOLETE subroutine will return. This is called from call_function. */
-// OBSOLETE
-// OBSOLETE /*#define STORE_STRUCT_RETURN(ADDR, SP) \
-// OBSOLETE { write_register (0, (ADDR)); internal_error (__FILE__, __LINE__, "failed internal consistency check"); } */
-// 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 #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-// OBSOLETE memcpy (VALBUF, (char *)(REGBUF), TYPE_LENGTH(TYPE))
-// OBSOLETE
-// OBSOLETE /* Write into appropriate registers a function return value
-// OBSOLETE of type TYPE, given in virtual format. */
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
-// OBSOLETE deprecated_write_register_bytes (0, VALBUF, TYPE_LENGTH (TYPE))
-// OBSOLETE
-// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
-// OBSOLETE the address in which a function should return its structure value,
-// OBSOLETE as a CORE_ADDR (or an expression that can be used as one). */
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Define other aspects of the stack frame. */
-// OBSOLETE
-// OBSOLETE /* A macro that tells us whether the function invocation represented
-// OBSOLETE by FI does not have a frame on the stack associated with it. If it
-// OBSOLETE does not, FRAMELESS is set to 1, else 0. */
-// OBSOLETE
-// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \
-// OBSOLETE (frameless_look_for_prologue (FI))
-// OBSOLETE
-// OBSOLETE /* Any function with a frame looks like this
-// OBSOLETE SECOND ARG
-// OBSOLETE FIRST ARG
-// OBSOLETE RET PC
-// OBSOLETE SAVED R2
-// OBSOLETE SAVED R3
-// OBSOLETE SAVED FP <-FP POINTS HERE
-// OBSOLETE LOCALS0
-// OBSOLETE LOCALS1 <-SP POINTS HERE
-// OBSOLETE
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fci) ;
-// OBSOLETE /* (fci)->frame |= read_register(SEG_T_REGNUM) << 16; */
-// OBSOLETE
-// OBSOLETE #define FRAME_CHAIN(FRAME) h8500_frame_chain(FRAME)
-// OBSOLETE struct frame_info;
-// OBSOLETE extern CORE_ADDR h8500_frame_chain (struct frame_info *);
-// OBSOLETE
-// OBSOLETE #define FRAME_SAVED_PC(FRAME) frame_saved_pc(FRAME)
-// OBSOLETE extern CORE_ADDR frame_saved_pc (struct frame_info *frame);
-// OBSOLETE
-// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
-// OBSOLETE
-// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
-// OBSOLETE
-// OBSOLETE /* Set VAL to the number of args passed to frame described by FI.
-// OBSOLETE Can set VAL to -1, meaning no way to tell. */
-// OBSOLETE
-// OBSOLETE /* We can't tell how many args there are
-// OBSOLETE now that the C compiler delays popping them. */
-// OBSOLETE
-// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
-// OBSOLETE
-// OBSOLETE /* Return number of bytes at start of arglist that are not really args. */
-// OBSOLETE
-// OBSOLETE #define FRAME_ARGS_SKIP 0
-// OBSOLETE
-// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs,
-// OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO.
-// OBSOLETE This includes special registers such as pc and fp saved in special
-// OBSOLETE ways in the stack frame. sp is even more special:
-// OBSOLETE the address we return for it IS the sp for the next frame. */
-// OBSOLETE
-// OBSOLETE #define FRAME_FIND_SAVED_REGS(frame_info, frame_saved_regs) \
-// OBSOLETE frame_find_saved_regs(frame_info, &(frame_saved_regs))
-// OBSOLETE struct frame_saved_regs;
-// OBSOLETE extern void frame_find_saved_regs (struct frame_info *frame_info,
-// OBSOLETE struct frame_saved_regs *frame_saved_regs);
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. */
-// OBSOLETE
-// OBSOLETE #define POP_FRAME { h8500_pop_frame (); }
-// OBSOLETE extern void h8500_pop_frame (void);
-// OBSOLETE
-// OBSOLETE #define SHORT_INT_MAX 32767
-// OBSOLETE #define SHORT_INT_MIN -32768
-// OBSOLETE
-// OBSOLETE typedef unsigned short INSN_WORD;
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR h8500_addr_bits_remove (CORE_ADDR);
-// OBSOLETE #define ADDR_BITS_REMOVE(addr) h8500_addr_bits_remove (addr)
-// OBSOLETE
-// OBSOLETE #define read_memory_short(x) (read_memory_integer(x,2) & 0xffff)
-// OBSOLETE
-// OBSOLETE extern void h8500_do_registers_info (int regnum, int all);
-// OBSOLETE #define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) \
-// OBSOLETE h8500_do_registers_info (REGNUM, ALL)
-// OBSOLETE
-// OBSOLETE extern int minimum_mode;
-// OBSOLETE
-// OBSOLETE #define CALL_DUMMY_LENGTH 10
-// OBSOLETE
-// OBSOLETE /* Fake variables to make it easy to use 24 bit register pointers */
-// OBSOLETE
-// OBSOLETE #define IS_TRAPPED_INTERNALVAR h8500_is_trapped_internalvar
-// OBSOLETE extern int h8500_is_trapped_internalvar (char *name);
-// OBSOLETE
-// OBSOLETE #define VALUE_OF_TRAPPED_INTERNALVAR h8500_value_of_trapped_internalvar
-// OBSOLETE extern struct value *h8500_value_of_trapped_internalvar ( /* struct internalvar *var */ );
-// OBSOLETE
-// OBSOLETE #define SET_TRAPPED_INTERNALVAR h8500_set_trapped_internalvar
-// OBSOLETE extern void h8500_set_trapped_internalvar ( /* struct internalvar *var, value newval, int bitpos, int bitsize, int offset */ );
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR h8500_read_sp (void);
-// OBSOLETE extern void h8500_write_sp (CORE_ADDR);
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR h8500_read_fp (void);
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR h8500_read_pc (ptid_t);
-// OBSOLETE extern void h8500_write_pc (CORE_ADDR, ptid_t);
-// OBSOLETE
-// OBSOLETE #define TARGET_READ_SP() h8500_read_sp()
-// OBSOLETE #define TARGET_WRITE_SP(x) h8500_write_sp(x)
-// OBSOLETE
-// OBSOLETE #define TARGET_READ_PC(pid) h8500_read_pc(pid)
-// OBSOLETE #define TARGET_WRITE_PC(x,pid) h8500_write_pc(x,pid)
-// OBSOLETE
-// OBSOLETE #define TARGET_READ_FP() h8500_read_fp()
diff --git a/gdb/config/i386/fbsd.mh b/gdb/config/i386/fbsd.mh
index 08d9e7d..4c70fc6 100644
--- a/gdb/config/i386/fbsd.mh
+++ b/gdb/config/i386/fbsd.mh
@@ -4,4 +4,4 @@ XM_FILE= xm-i386.h
NAT_FILE= nm-fbsd.h
# NOTE: Do not spread NATDEPFILES over several lines - it hurts BSD make.
-NATDEPFILES= fork-child.o infptrace.o inftarg.o solib.o solib-svr4.o solib-legacy.o corelow.o core-aout.o core-regset.o i386-nat.o i386bsd-nat.o i386fbsd-nat.o gcore.o fbsd-proc.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o solib.o solib-svr4.o solib-legacy.o core-aout.o i386-nat.o i386bsd-nat.o i386fbsd-nat.o gcore.o fbsd-proc.o
diff --git a/gdb/config/i386/fbsd.mt b/gdb/config/i386/fbsd.mt
index 7a95e00..b266255 100644
--- a/gdb/config/i386/fbsd.mt
+++ b/gdb/config/i386/fbsd.mt
@@ -1,3 +1,3 @@
# Target: Intel 386 running FreeBSD
-TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o
+TDEPFILES= i386-tdep.o i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o corelow.o
TM_FILE= tm-fbsd.h
diff --git a/gdb/config/i386/fbsd64.mh b/gdb/config/i386/fbsd64.mh
index 7e42aaa..eaa801f 100644
--- a/gdb/config/i386/fbsd64.mh
+++ b/gdb/config/i386/fbsd64.mh
@@ -4,4 +4,4 @@ XM_FILE= xm-i386.h
NAT_FILE= nm-fbsd64.h
# NOTE: Do not spread NATDEPFILES over several lines - it hurts BSD make.
-NATDEPFILES= fork-child.o infptrace.o inftarg.o solib.o solib-svr4.o solib-legacy.o corelow.o core-regset.o amd64-nat.o amd64fbsd-nat.o gcore.o fbsd-proc.o
+NATDEPFILES= fork-child.o infptrace.o inftarg.o solib.o solib-svr4.o solib-legacy.o amd64-nat.o amd64bsd-nat.o amd64fbsd-nat.o gcore.o fbsd-proc.o
diff --git a/gdb/config/i386/fbsd64.mt b/gdb/config/i386/fbsd64.mt
index ae4fe98..3a66a15 100644
--- a/gdb/config/i386/fbsd64.mt
+++ b/gdb/config/i386/fbsd64.mt
@@ -1,2 +1,2 @@
# Target: FreeBSD/amd64
-TDEPFILES= x86-64-tdep.o amd64fbsd-tdep.o i386-tdep.o i387-tdep.o i386bsd-tdep.o
+TDEPFILES= x86-64-tdep.o amd64fbsd-tdep.o i386-tdep.o i387-tdep.o i386bsd-tdep.o i386fbsd-tdep.o corelow.o
diff --git a/gdb/config/i386/linux.mt b/gdb/config/i386/linux.mt
index 2d27a02..9e068a4 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 i387-tdep.o \
+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
diff --git a/gdb/config/i386/nm-ptx4.h b/gdb/config/i386/nm-ptx4.h
deleted file mode 100644
index 74db165..0000000
--- a/gdb/config/i386/nm-ptx4.h
+++ /dev/null
@@ -1,66 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under ptx
-// OBSOLETE with Weitek 1167 and i387 support.
-// OBSOLETE Copyright 1986, 1987, 1989, 1992, 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 #include "regcache.h"
-// OBSOLETE
-// OBSOLETE #include "config/nm-sysv4.h"
-// OBSOLETE
-// OBSOLETE #undef USE_PROC_FS
-// OBSOLETE
-// OBSOLETE #include "i386/nm-symmetry.h"
-// OBSOLETE
-// OBSOLETE #define PTRACE_READ_REGS(pid,regaddr) mptrace (XPT_RREGS, (pid), (regaddr), 0)
-// OBSOLETE #define PTRACE_WRITE_REGS(pid,regaddr) \
-// OBSOLETE mptrace (XPT_WREGS, (pid), (regaddr), 0)
-// OBSOLETE
-// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-// OBSOLETE
-// OBSOLETE #define FETCH_INFERIOR_REGISTERS
-// OBSOLETE
-// OBSOLETE /* We must fetch all the regs before storing, since we store all at once. */
-// OBSOLETE
-// OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
-// OBSOLETE
-// OBSOLETE #define CHILD_WAIT
-// OBSOLETE struct target_waitstatus;
-// OBSOLETE extern ptid_t child_wait (ptid_t, struct target_waitstatus *);
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * ptx does attach as of ptx version 2.1. Prior to that, the interface
-// OBSOLETE * exists but does not work.
-// OBSOLETE *
-// OBSOLETE * FIXME: Using attach/detach requires using the ptx MPDEBUGGER
-// OBSOLETE * interface. There are still problems with that, so for now don't
-// OBSOLETE * enable attach/detach. If you turn it on anyway, it will mostly
-// OBSOLETE * work, but has a number of bugs. -fubar, 2/94.
-// OBSOLETE */
-// OBSOLETE /*#define ATTACH_DETACH 1 */
-// OBSOLETE #undef ATTACH_DETACH
-// OBSOLETE #define PTRACE_ATTACH XPT_DEBUG
-// OBSOLETE #define PTRACE_DETACH XPT_UNDEBUG
-// OBSOLETE /*
-// OBSOLETE * The following drivel is needed because there are two ptrace-ish
-// OBSOLETE * calls on ptx: ptrace() and mptrace(), each of which does about half
-// OBSOLETE * of the ptrace functions.
-// OBSOLETE */
-// OBSOLETE #define PTRACE_ATTACH_CALL(pid) ptx_do_attach(pid)
-// OBSOLETE #define PTRACE_DETACH_CALL(pid, signo) ptx_do_detach(pid, signo)
diff --git a/gdb/config/i386/nm-symmetry.h b/gdb/config/i386/nm-symmetry.h
deleted file mode 100644
index 72b7d8d..0000000
--- a/gdb/config/i386/nm-symmetry.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under dynix 3.0,
-// OBSOLETE with Weitek 1167 and i387 support.
-// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1994, 1996, 1998, 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 #include "regcache.h"
-// OBSOLETE
-// OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */
-// OBSOLETE
-// OBSOLETE #define FETCH_INFERIOR_REGISTERS
-// OBSOLETE
-// OBSOLETE /* We must fetch all the regs before storing, since we store all at once. */
-// OBSOLETE
-// OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
-// OBSOLETE
-// OBSOLETE #ifdef _SEQUENT_
-// OBSOLETE #define CHILD_WAIT
-// OBSOLETE extern ptid_t child_wait (ptid_t, struct target_waitstatus *);
-// OBSOLETE #endif
-// 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 #ifdef _SEQUENT_
-// OBSOLETE #include <sys/param.h>
-// OBSOLETE #include <sys/user.h>
-// OBSOLETE #include <sys/mc_vmparam.h>
-// OBSOLETE /* VA_UAREA is defined in <sys/mc_vmparam.h>, and is dependant upon
-// OBSOLETE sizeof(struct user) */
-// OBSOLETE #define KERNEL_U_ADDR (VA_UAREA) /* ptx */
-// OBSOLETE #else
-// OBSOLETE #define KERNEL_U_ADDR (0x80000000 - (UPAGES * NBPG)) /* dynix */
-// OBSOLETE #endif
diff --git a/gdb/config/i386/ptx.mh b/gdb/config/i386/ptx.mh
deleted file mode 100644
index 048f5e5..0000000
--- a/gdb/config/i386/ptx.mh
+++ /dev/null
@@ -1,7 +0,0 @@
-# OBSOLETE # Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387
-# OBSOLETE
-# OBSOLETE XM_FILE= xm-ptx.h
-# OBSOLETE NATDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o
-# OBSOLETE XM_CLIBS= -lPW -lseq
-# OBSOLETE
-# OBSOLETE NAT_FILE= nm-symmetry.h
diff --git a/gdb/config/i386/ptx.mt b/gdb/config/i386/ptx.mt
deleted file mode 100644
index e9551e2..0000000
--- a/gdb/config/i386/ptx.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: Sequent Symmetry running ptx 2.0, with Weitek 1167 or i387.
-# OBSOLETE TDEPFILES= symm-tdep.o i387-tdep.o i386-tdep.o
-# OBSOLETE TM_FILE= tm-ptx.h
diff --git a/gdb/config/i386/ptx4.mh b/gdb/config/i386/ptx4.mh
deleted file mode 100644
index 4d23635..0000000
--- a/gdb/config/i386/ptx4.mh
+++ /dev/null
@@ -1,8 +0,0 @@
-# OBSOLETE # Host: Sequent Symmetry running ptx 1.3, with Weitek 1167 or i387
-# OBSOLETE
-# OBSOLETE XM_FILE= xm-ptx4.h
-# OBSOLETE NATDEPFILES= inftarg.o fork-child.o symm-nat.o corelow.o core-aout.o \
-# OBSOLETE core-regset.o solib.o solib-svr4.o solib-legacy.o
-# OBSOLETE XM_CLIBS= -lseq
-# OBSOLETE
-# OBSOLETE NAT_FILE= nm-ptx4.h
diff --git a/gdb/config/i386/ptx4.mt b/gdb/config/i386/ptx4.mt
deleted file mode 100644
index ad268f8..0000000
--- a/gdb/config/i386/ptx4.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: Sequent Symmetry running ptx 4.0, with Weitek 1167 or i387.
-# OBSOLETE TDEPFILES= symm-tdep.o i387-tdep.o i386-tdep.o
-# OBSOLETE TM_FILE= tm-ptx4.h
diff --git a/gdb/config/i386/symmetry.mh b/gdb/config/i386/symmetry.mh
deleted file mode 100644
index 19c5264..0000000
--- a/gdb/config/i386/symmetry.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# OBSOLETE # Host: Sequent Symmetry running Dynix 3.0, with Weitek 1167 or i387.
-# OBSOLETE XM_FILE= xm-symmetry.h
-# OBSOLETE NAT_FILE= nm-symmetry.h
-# OBSOLETE NATDEPFILES= inftarg.o fork-child.o corelow.o core-aout.o symm-nat.o
diff --git a/gdb/config/i386/symmetry.mt b/gdb/config/i386/symmetry.mt
deleted file mode 100644
index 8fccbd2..0000000
--- a/gdb/config/i386/symmetry.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: Sequent Symmetry running Dynix 3.0, with Weitek 1167 or i387.
-# OBSOLETE TDEPFILES= i386-tdep.o symm-tdep.o i387-tdep.o
-# OBSOLETE TM_FILE= tm-symmetry.h
diff --git a/gdb/config/i386/tm-cygwin.h b/gdb/config/i386/tm-cygwin.h
index 4b926f9..e7b49de 100644
--- a/gdb/config/i386/tm-cygwin.h
+++ b/gdb/config/i386/tm-cygwin.h
@@ -35,5 +35,3 @@ char *solib_address (CORE_ADDR);
char *child_solib_loaded_library_pathname(int);
void child_clear_solibs (void);
void dll_symbol_command (char *, int);
-
-#define LINKER_SYMBOLS_HAVE_WIN32_STDCALL_ARG_SIZES (1)
diff --git a/gdb/config/i386/tm-ptx.h b/gdb/config/i386/tm-ptx.h
deleted file mode 100644
index 4d3ba83..0000000
--- a/gdb/config/i386/tm-ptx.h
+++ /dev/null
@@ -1,194 +0,0 @@
-// OBSOLETE /* Target machine definitions for GDB on a Sequent Symmetry under ptx
-// OBSOLETE with Weitek 1167 and i387 support.
-// OBSOLETE
-// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2000,
-// OBSOLETE 2003 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE Symmetry version by Jay Vosburgh (fubar@sequent.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 #ifndef TM_PTX_H
-// OBSOLETE #define TM_PTX_H 1
-// OBSOLETE
-// OBSOLETE /* I don't know if this will work for cross-debugging, even if you do get
-// OBSOLETE a copy of the right include file. */
-// OBSOLETE
-// OBSOLETE #include <sys/reg.h>
-// OBSOLETE
-// OBSOLETE #ifdef SEQUENT_PTX4
-// OBSOLETE #include "i386/tm-i386.h"
-// OBSOLETE #else /* !SEQUENT_PTX4 */
-// OBSOLETE #include "i386/tm-i386.h"
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* Amount PC must be decremented by after a breakpoint. This is often the
-// OBSOLETE number of bytes in BREAKPOINT but not always (such as now). */
-// OBSOLETE
-// OBSOLETE #undef DECR_PC_AFTER_BREAK
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0
-// OBSOLETE
-// OBSOLETE /* Number of machine registers */
-// OBSOLETE
-// OBSOLETE #undef NUM_REGS
-// OBSOLETE #define NUM_REGS 49
-// OBSOLETE
-// OBSOLETE /* Initializer for an array of names of registers. There should be at least
-// OBSOLETE NUM_REGS strings in this initializer. Any excess ones are simply ignored.
-// OBSOLETE The order of the first 8 registers must match the compiler's numbering
-// OBSOLETE scheme (which is the same as the 386 scheme) and also regmap in the various
-// OBSOLETE *-nat.c files. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_NAME
-// OBSOLETE #define REGISTER_NAMES { "eax", "ecx", "edx", "ebx", \
-// OBSOLETE "esp", "ebp", "esi", "edi", \
-// OBSOLETE "eip", "eflags", "st0", "st1", \
-// OBSOLETE "st2", "st3", "st4", "st5", \
-// OBSOLETE "st6", "st7", "fp1", "fp2", \
-// OBSOLETE "fp3", "fp4", "fp5", "fp6", \
-// OBSOLETE "fp7", "fp8", "fp9", "fp10", \
-// OBSOLETE "fp11", "fp12", "fp13", "fp14", \
-// OBSOLETE "fp15", "fp16", "fp17", "fp18", \
-// OBSOLETE "fp19", "fp20", "fp21", "fp22", \
-// OBSOLETE "fp23", "fp24", "fp25", "fp26", \
-// OBSOLETE "fp27", "fp28", "fp29", "fp30", \
-// OBSOLETE "fp31" }
-// OBSOLETE
-// OBSOLETE /* Register numbers of various important registers.
-// OBSOLETE Note that some of these values are "real" register numbers,
-// OBSOLETE and correspond to the general registers of the machine,
-// OBSOLETE and some are "phony" register numbers which are too large
-// OBSOLETE to be actual register numbers as far as the user is concerned
-// OBSOLETE but do serve to get the desired values when passed to read_register. */
-// OBSOLETE
-// OBSOLETE #define EAX_REGNUM 0
-// OBSOLETE #define ECX_REGNUM 1
-// OBSOLETE #define EDX_REGNUM 2
-// OBSOLETE #define EBX_REGNUM 3
-// OBSOLETE
-// OBSOLETE #define ESP_REGNUM 4
-// OBSOLETE #define EBP_REGNUM 5
-// OBSOLETE
-// OBSOLETE #define ESI_REGNUM 6
-// OBSOLETE #define EDI_REGNUM 7
-// OBSOLETE
-// OBSOLETE #define EIP_REGNUM 8
-// OBSOLETE #define EFLAGS_REGNUM 9
-// OBSOLETE
-// OBSOLETE #define ST0_REGNUM 10
-// OBSOLETE #define ST1_REGNUM 11
-// OBSOLETE #define ST2_REGNUM 12
-// OBSOLETE #define ST3_REGNUM 13
-// OBSOLETE
-// OBSOLETE #define ST4_REGNUM 14
-// OBSOLETE #define ST5_REGNUM 15
-// OBSOLETE #define ST6_REGNUM 16
-// OBSOLETE #define ST7_REGNUM 17
-// OBSOLETE
-// OBSOLETE #define FP1_REGNUM 18 /* first 1167 register */
-// OBSOLETE /* Get %fp2 - %fp31 by addition, since they are contiguous */
-// OBSOLETE
-// OBSOLETE #undef SP_REGNUM
-// OBSOLETE #define SP_REGNUM ESP_REGNUM /* Contains address of top of stack */
-// OBSOLETE #undef FP_REGNUM
-// OBSOLETE #define FP_REGNUM EBP_REGNUM /* Contains address of executing stack frame */
-// OBSOLETE #undef PC_REGNUM
-// OBSOLETE #define PC_REGNUM EIP_REGNUM /* Contains program counter */
-// OBSOLETE #undef PS_REGNUM
-// OBSOLETE #define PS_REGNUM EFLAGS_REGNUM /* Contains processor status */
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * For ptx, this is a little bit bizarre, since the register block
-// OBSOLETE * is below the u area in memory. This means that blockend here ends
-// OBSOLETE * up being negative (for the call from coredep.c) since the value in
-// OBSOLETE * u.u_ar0 will be less than KERNEL_U_ADDR (and coredep.c passes us
-// OBSOLETE * u.u_ar0 - KERNEL_U_ADDR in blockend). Since we also define
-// OBSOLETE * FETCH_INFERIOR_REGISTERS (and supply our own functions for that),
-// OBSOLETE * the core file case will be the only use of this function.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE { (addr) = ptx_register_u_addr((blockend), (regno)); }
-// OBSOLETE
-// OBSOLETE extern int ptx_register_u_addr (int, int);
-// OBSOLETE
-// OBSOLETE /* Total amount of space needed to store our copies of the machine's
-// OBSOLETE register state, the array `registers'. 10 i*86 registers, 8 i387
-// OBSOLETE registers, and 31 Weitek 1167 registers */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_BYTES
-// OBSOLETE #define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
-// OBSOLETE
-// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
-// OBSOLETE
-// OBSOLETE #undef DEPRECATED_MAX_REGISTER_RAW_SIZE
-// OBSOLETE #define DEPRECATED_MAX_REGISTER_RAW_SIZE 10
-// OBSOLETE
-// OBSOLETE /* Nonzero if register N requires conversion
-// OBSOLETE from raw format to virtual format. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_CONVERTIBLE
-// OBSOLETE #define REGISTER_CONVERTIBLE(N) \
-// OBSOLETE ((N < ST0_REGNUM) ? 0 : \
-// OBSOLETE (N < FP1_REGNUM) ? 1 : \
-// OBSOLETE 0)
-// OBSOLETE
-// OBSOLETE /* Convert data from raw format for register REGNUM
-// OBSOLETE to virtual format for register REGNUM. */
-// OBSOLETE extern const struct floatformat floatformat_i387_ext; /* from floatformat.h */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_CONVERT_TO_VIRTUAL
-// OBSOLETE #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
-// OBSOLETE ((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \
-// OBSOLETE (REGNUM < FP1_REGNUM) ? (void)floatformat_to_double(&floatformat_i387_ext, \
-// OBSOLETE (FROM),(TO)) : \
-// OBSOLETE (void)memcpy ((TO), (FROM), 4))
-// OBSOLETE
-// OBSOLETE /* Convert data from virtual format for register REGNUM
-// OBSOLETE to raw format for register REGNUM. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_CONVERT_TO_RAW
-// OBSOLETE #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
-// OBSOLETE ((REGNUM < ST0_REGNUM) ? (void)memcpy ((TO), (FROM), 4) : \
-// OBSOLETE (REGNUM < FP1_REGNUM) ? (void)floatformat_from_double(&floatformat_i387_ext, \
-// OBSOLETE (FROM),(TO)) : \
-// OBSOLETE (void)memcpy ((TO), (FROM), 4))
-// OBSOLETE
-// OBSOLETE /* Return the GDB type object for the "standard" data type
-// OBSOLETE of data in register N. */
-// OBSOLETE /*
-// OBSOLETE * Note: the 1167 registers (the last line, builtin_type_float) are
-// OBSOLETE * generally used in pairs, with each pair being treated as a double.
-// OBSOLETE * It it also possible to use them singly as floats. I'm not sure how
-// OBSOLETE * in gdb to treat the register pair pseudo-doubles. -fubar
-// OBSOLETE */
-// OBSOLETE #undef REGISTER_VIRTUAL_TYPE
-// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \
-// OBSOLETE ((N < ST0_REGNUM) ? builtin_type_int : \
-// OBSOLETE (N < FP1_REGNUM) ? builtin_type_double : \
-// OBSOLETE builtin_type_float)
-// 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 #undef DEPRECATED_EXTRACT_RETURN_VALUE
-// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-// OBSOLETE symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
-// OBSOLETE
-// OBSOLETE #endif /* ifndef TM_PTX_H */
diff --git a/gdb/config/i386/tm-ptx4.h b/gdb/config/i386/tm-ptx4.h
deleted file mode 100644
index 5f83db4..0000000
--- a/gdb/config/i386/tm-ptx4.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// OBSOLETE /* Target machine definitions for GDB on a Sequent Symmetry under ptx
-// OBSOLETE with Weitek 1167 and i387 support.
-// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994
-// OBSOLETE Free Software Foundation, Inc.
-// OBSOLETE Symmetry version by Jay Vosburgh (fubar@sequent.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 #define SEQUENT_PTX4
-// OBSOLETE
-// OBSOLETE #include "i386/tm-ptx.h"
diff --git a/gdb/config/i386/tm-symmetry.h b/gdb/config/i386/tm-symmetry.h
deleted file mode 100644
index c8680a3..0000000
--- a/gdb/config/i386/tm-symmetry.h
+++ /dev/null
@@ -1,291 +0,0 @@
-// OBSOLETE /* Target machine definitions for GDB on a Sequent Symmetry under dynix 3.0,
-// OBSOLETE with Weitek 1167 and i387 support.
-// OBSOLETE
-// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2003 Free
-// OBSOLETE Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE Symmetry version by Jay Vosburgh (fubar@sequent.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 #ifndef TM_SYMMETRY_H
-// OBSOLETE #define TM_SYMMETRY_H 1
-// OBSOLETE
-// OBSOLETE #include "regcache.h"
-// OBSOLETE #include "doublest.h"
-// OBSOLETE
-// OBSOLETE /* I don't know if this will work for cross-debugging, even if you do get
-// OBSOLETE a copy of the right include file. */
-// OBSOLETE #include <machine/reg.h>
-// OBSOLETE
-// OBSOLETE #include "i386/tm-i386.h"
-// OBSOLETE
-// OBSOLETE /* Amount PC must be decremented by after a breakpoint. This is often the
-// OBSOLETE number of bytes in BREAKPOINT but not always (such as now). */
-// OBSOLETE
-// OBSOLETE #undef DECR_PC_AFTER_BREAK
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0
-// OBSOLETE
-// OBSOLETE /* Number of machine registers */
-// OBSOLETE
-// OBSOLETE #undef NUM_REGS
-// OBSOLETE #define NUM_REGS 49
-// OBSOLETE
-// OBSOLETE /* Initializer for an array of names of registers.
-// OBSOLETE There should be NUM_REGS strings in this initializer. */
-// OBSOLETE
-// OBSOLETE /* Initializer for an array of names of registers. There should be at least
-// OBSOLETE NUM_REGS strings in this initializer. Any excess ones are simply ignored.
-// OBSOLETE Symmetry registers are in this weird order to match the register numbers
-// OBSOLETE in the symbol table entries. If you change the order, things will probably
-// OBSOLETE break mysteriously for no apparent reason. Also note that the st(0)...
-// OBSOLETE st(7) 387 registers are represented as st0...st7. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_NAME
-// OBSOLETE #define REGISTER_NAMES { "eax", "edx", "ecx", "st0", "st1", \
-// OBSOLETE "ebx", "esi", "edi", "st2", "st3", \
-// OBSOLETE "st4", "st5", "st6", "st7", "esp", \
-// OBSOLETE "ebp", "eip", "eflags","fp1", "fp2", \
-// OBSOLETE "fp3", "fp4", "fp5", "fp6", "fp7", \
-// OBSOLETE "fp8", "fp9", "fp10", "fp11", "fp12", \
-// OBSOLETE "fp13", "fp14", "fp15", "fp16", "fp17", \
-// OBSOLETE "fp18", "fp19", "fp20", "fp21", "fp22", \
-// OBSOLETE "fp23", "fp24", "fp25", "fp26", "fp27", \
-// OBSOLETE "fp28", "fp29", "fp30", "fp31" }
-// OBSOLETE
-// OBSOLETE /* Register numbers of various important registers.
-// OBSOLETE Note that some of these values are "real" register numbers,
-// OBSOLETE and correspond to the general registers of the machine,
-// OBSOLETE and some are "phony" register numbers which are too large
-// OBSOLETE to be actual register numbers as far as the user is concerned
-// OBSOLETE but do serve to get the desired values when passed to read_register. */
-// OBSOLETE
-// OBSOLETE #define EAX_REGNUM 0
-// OBSOLETE #define EDX_REGNUM 1
-// OBSOLETE #define ECX_REGNUM 2
-// OBSOLETE #define ST0_REGNUM 3
-// OBSOLETE #define ST1_REGNUM 4
-// OBSOLETE #define EBX_REGNUM 5
-// OBSOLETE #define ESI_REGNUM 6
-// OBSOLETE #define EDI_REGNUM 7
-// OBSOLETE #define ST2_REGNUM 8
-// OBSOLETE #define ST3_REGNUM 9
-// OBSOLETE
-// OBSOLETE #define ST4_REGNUM 10
-// OBSOLETE #define ST5_REGNUM 11
-// OBSOLETE #define ST6_REGNUM 12
-// OBSOLETE #define ST7_REGNUM 13
-// OBSOLETE
-// OBSOLETE #define FP1_REGNUM 18 /* first 1167 register */
-// OBSOLETE /* Get %fp2 - %fp31 by addition, since they are contiguous */
-// OBSOLETE
-// OBSOLETE #undef SP_REGNUM
-// OBSOLETE #define SP_REGNUM 14 /* (usp) Contains address of top of stack */
-// OBSOLETE #define ESP_REGNUM 14
-// OBSOLETE #undef FP_REGNUM
-// OBSOLETE #define FP_REGNUM 15 /* (ebp) Contains address of executing stack frame */
-// OBSOLETE #define EBP_REGNUM 15
-// OBSOLETE #undef PC_REGNUM
-// OBSOLETE #define PC_REGNUM 16 /* (eip) Contains program counter */
-// OBSOLETE #define EIP_REGNUM 16
-// OBSOLETE #undef PS_REGNUM
-// OBSOLETE #define PS_REGNUM 17 /* (ps) Contains processor status */
-// OBSOLETE #define EFLAGS_REGNUM 17
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Following macro translates i386 opcode register numbers to Symmetry
-// OBSOLETE * register numbers. This is used by i386_frame_find_saved_regs.
-// OBSOLETE *
-// OBSOLETE * %eax %ecx %edx %ebx %esp %ebp %esi %edi
-// OBSOLETE * i386 0 1 2 3 4 5 6 7
-// OBSOLETE * Symmetry 0 2 1 5 14 15 6 7
-// OBSOLETE *
-// OBSOLETE */
-// OBSOLETE #define I386_REGNO_TO_SYMMETRY(n) \
-// OBSOLETE ((n)==0?0 :(n)==1?2 :(n)==2?1 :(n)==3?5 :(n)==4?14 :(n)==5?15 :(n))
-// OBSOLETE
-// OBSOLETE /* The magic numbers below are offsets into u_ar0 in the user struct.
-// OBSOLETE * They live in <machine/reg.h>. Gdb calls this macro with blockend
-// OBSOLETE * holding u.u_ar0 - KERNEL_U_ADDR. Only the registers listed are
-// OBSOLETE * saved in the u area (along with a few others that aren't useful
-// OBSOLETE * here. See <machine/reg.h>).
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE { struct user foo; /* needed for finding fpu regs */ \
-// OBSOLETE switch (regno) { \
-// OBSOLETE case 0: \
-// OBSOLETE addr = blockend + EAX * sizeof(int); break; \
-// OBSOLETE case 1: \
-// OBSOLETE addr = blockend + EDX * sizeof(int); break; \
-// OBSOLETE case 2: \
-// OBSOLETE addr = blockend + ECX * sizeof(int); break; \
-// OBSOLETE case 3: /* st(0) */ \
-// OBSOLETE addr = ((int)&foo.u_fpusave.fpu_stack[0][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 4: /* st(1) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[1][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 5: \
-// OBSOLETE addr = blockend + EBX * sizeof(int); break; \
-// OBSOLETE case 6: \
-// OBSOLETE addr = blockend + ESI * sizeof(int); break; \
-// OBSOLETE case 7: \
-// OBSOLETE addr = blockend + EDI * sizeof(int); break; \
-// OBSOLETE case 8: /* st(2) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[2][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 9: /* st(3) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[3][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 10: /* st(4) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[4][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 11: /* st(5) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[5][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 12: /* st(6) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[6][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 13: /* st(7) */ \
-// OBSOLETE addr = ((int) &foo.u_fpusave.fpu_stack[7][0] - (int)&foo); \
-// OBSOLETE break; \
-// OBSOLETE case 14: \
-// OBSOLETE addr = blockend + ESP * sizeof(int); break; \
-// OBSOLETE case 15: \
-// OBSOLETE addr = blockend + EBP * sizeof(int); break; \
-// OBSOLETE case 16: \
-// OBSOLETE addr = blockend + EIP * sizeof(int); break; \
-// OBSOLETE case 17: \
-// OBSOLETE addr = blockend + FLAGS * sizeof(int); break; \
-// OBSOLETE case 18: /* fp1 */ \
-// OBSOLETE case 19: /* fp2 */ \
-// OBSOLETE case 20: /* fp3 */ \
-// OBSOLETE case 21: /* fp4 */ \
-// OBSOLETE case 22: /* fp5 */ \
-// OBSOLETE case 23: /* fp6 */ \
-// OBSOLETE case 24: /* fp7 */ \
-// OBSOLETE case 25: /* fp8 */ \
-// OBSOLETE case 26: /* fp9 */ \
-// OBSOLETE case 27: /* fp10 */ \
-// OBSOLETE case 28: /* fp11 */ \
-// OBSOLETE case 29: /* fp12 */ \
-// OBSOLETE case 30: /* fp13 */ \
-// OBSOLETE case 31: /* fp14 */ \
-// OBSOLETE case 32: /* fp15 */ \
-// OBSOLETE case 33: /* fp16 */ \
-// OBSOLETE case 34: /* fp17 */ \
-// OBSOLETE case 35: /* fp18 */ \
-// OBSOLETE case 36: /* fp19 */ \
-// OBSOLETE case 37: /* fp20 */ \
-// OBSOLETE case 38: /* fp21 */ \
-// OBSOLETE case 39: /* fp22 */ \
-// OBSOLETE case 40: /* fp23 */ \
-// OBSOLETE case 41: /* fp24 */ \
-// OBSOLETE case 42: /* fp25 */ \
-// OBSOLETE case 43: /* fp26 */ \
-// OBSOLETE case 44: /* fp27 */ \
-// OBSOLETE case 45: /* fp28 */ \
-// OBSOLETE case 46: /* fp29 */ \
-// OBSOLETE case 47: /* fp30 */ \
-// OBSOLETE case 48: /* fp31 */ \
-// OBSOLETE addr = ((int) &foo.u_fpasave.fpa_regs[(regno)-18] - (int)&foo); \
-// OBSOLETE } \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Total amount of space needed to store our copies of the machine's
-// OBSOLETE register state, the array `registers'. 10 i*86 registers, 8 i387
-// OBSOLETE registers, and 31 Weitek 1167 registers */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_BYTES
-// OBSOLETE #define REGISTER_BYTES ((10 * 4) + (8 * 10) + (31 * 4))
-// OBSOLETE
-// OBSOLETE /* Nonzero if register N requires conversion
-// OBSOLETE from raw format to virtual format. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_CONVERTIBLE
-// OBSOLETE #define REGISTER_CONVERTIBLE(N) \
-// OBSOLETE (((N) < 3) ? 0 : \
-// OBSOLETE ((N) < 5) ? 1 : \
-// OBSOLETE ((N) < 8) ? 0 : \
-// OBSOLETE ((N) < 14) ? 1 : \
-// OBSOLETE 0)
-// OBSOLETE
-// OBSOLETE #include "floatformat.h"
-// OBSOLETE
-// OBSOLETE /* Convert data from raw format for register REGNUM in buffer FROM
-// OBSOLETE to virtual format with type TYPE in buffer TO. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_CONVERT_TO_VIRTUAL
-// OBSOLETE #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
-// OBSOLETE { \
-// OBSOLETE DOUBLEST val; \
-// OBSOLETE floatformat_to_doublest (&floatformat_i387_ext, (FROM), &val); \
-// OBSOLETE deprecated_store_floating ((TO), TYPE_LENGTH (TYPE), val); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Convert data from virtual format with type TYPE in buffer FROM
-// OBSOLETE to raw format for register REGNUM in buffer TO. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_CONVERT_TO_RAW
-// OBSOLETE #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
-// OBSOLETE { \
-// OBSOLETE DOUBLEST val = deprecated_extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
-// OBSOLETE floatformat_from_doublest (&floatformat_i387_ext, &val, (TO)); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Return the GDB type object for the "standard" data type
-// OBSOLETE of data in register N. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_VIRTUAL_TYPE
-// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \
-// OBSOLETE ((N < 3) ? builtin_type_int : \
-// OBSOLETE (N < 5) ? builtin_type_double : \
-// OBSOLETE (N < 8) ? builtin_type_int : \
-// OBSOLETE (N < 14) ? builtin_type_double : \
-// OBSOLETE builtin_type_int)
-// OBSOLETE
-// OBSOLETE /* Store the address of the place in which to copy the structure the
-// OBSOLETE subroutine will return. This is called from call_function.
-// OBSOLETE Native cc passes the address in eax, gcc (up to version 2.5.8)
-// OBSOLETE passes it on the stack. gcc should be fixed in future versions to
-// OBSOLETE adopt native cc conventions. */
-// OBSOLETE
-// OBSOLETE #undef DEPRECATED_PUSH_ARGUMENTS
-// OBSOLETE #undef STORE_STRUCT_RETURN
-// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) write_register(0, (ADDR))
-// OBSOLETE
-// OBSOLETE /* Extract from an array REGBUF containing the (raw) register state
-// OBSOLETE a function return value of type TYPE, and copy that, in virtual format,
-// OBSOLETE into VALBUF. */
-// OBSOLETE
-// OBSOLETE #undef DEPRECATED_EXTRACT_RETURN_VALUE
-// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-// OBSOLETE symmetry_extract_return_value(TYPE, REGBUF, VALBUF)
-// OBSOLETE
-// OBSOLETE /* The following redefines make backtracing through sigtramp work.
-// OBSOLETE They manufacture a fake sigtramp frame and obtain the saved pc in sigtramp
-// OBSOLETE from the sigcontext structure which is pushed by the kernel on the
-// OBSOLETE user stack, along with a pointer to it. */
-// OBSOLETE
-// OBSOLETE #define IN_SIGTRAMP(pc, name) ((name) && STREQ ("_sigcode", name))
-// OBSOLETE
-// OBSOLETE /* Offset to saved PC in sigcontext, from <signal.h>. */
-// OBSOLETE #define SIGCONTEXT_PC_OFFSET 16
-// OBSOLETE
-// OBSOLETE #endif /* ifndef TM_SYMMETRY_H */
diff --git a/gdb/config/i386/xm-ptx.h b/gdb/config/i386/xm-ptx.h
deleted file mode 100644
index 1ecae0c..0000000
--- a/gdb/config/i386/xm-ptx.h
+++ /dev/null
@@ -1,38 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under ptx, with
-// OBSOLETE Weitek 1167 and i387 support.
-// OBSOLETE Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995
-// 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 /* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
-// OBSOLETE
-// OBSOLETE #ifdef _SEQUENT_PTX4_
-// OBSOLETE #include "config/xm-sysv4.h"
-// OBSOLETE #endif /* _SEQUENT_PTX4_ */
-// OBSOLETE
-// OBSOLETE /* This machine doesn't have the siginterrupt call. */
-// OBSOLETE #define NO_SIGINTERRUPT
-// OBSOLETE
-// OBSOLETE #define HAVE_WAIT_STRUCT
-// OBSOLETE
-// OBSOLETE #undef HAVE_TERMIO
-// OBSOLETE #define HAVE_TERMIOS
-// OBSOLETE #define USG
-// OBSOLETE
-// OBSOLETE #define USE_O_NOCTTY
diff --git a/gdb/config/i386/xm-ptx4.h b/gdb/config/i386/xm-ptx4.h
deleted file mode 100644
index 7f0605d..0000000
--- a/gdb/config/i386/xm-ptx4.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under ptx, with
-// OBSOLETE Weitek 1167 and i387 support.
-// OBSOLETE Copyright 1986, 1987, 1989, 1992, 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 /* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
-// OBSOLETE
-// OBSOLETE #include "config/xm-sysv4.h"
-// OBSOLETE
-// OBSOLETE #include "i386/xm-ptx.h"
diff --git a/gdb/config/i386/xm-symmetry.h b/gdb/config/i386/xm-symmetry.h
deleted file mode 100644
index 27711f2..0000000
--- a/gdb/config/i386/xm-symmetry.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a Sequent Symmetry under
-// OBSOLETE dynix 3.1, with Weitek 1167 and i387 support.
-// OBSOLETE Copyright 1986, 1987, 1989, 1992, 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 /* Symmetry version by Jay Vosburgh (fubar@sequent.com) */
-// OBSOLETE
-// OBSOLETE /* This machine doesn't have the siginterrupt call. */
-// OBSOLETE #define NO_SIGINTERRUPT
-// OBSOLETE
-// OBSOLETE #define HAVE_WAIT_STRUCT
diff --git a/gdb/config/m32r/m32r.mt b/gdb/config/m32r/m32r.mt
index 6d578c8..ff6def0 100644
--- a/gdb/config/m32r/m32r.mt
+++ b/gdb/config/m32r/m32r.mt
@@ -1,4 +1,4 @@
# Target: Renesas m32r processor
-TDEPFILES= m32r-tdep.o monitor.o m32r-rom.o dsrec.o
+TDEPFILES= m32r-tdep.o monitor.o m32r-rom.o dsrec.o remote-m32r-sdi.o
SIM_OBS = remote-sim.o
SIM = ../sim/m32r/libsim.a
diff --git a/gdb/config/m68k/tm-delta68.h b/gdb/config/m68k/tm-delta68.h
index 97112a8..a360a78 100644
--- a/gdb/config/m68k/tm-delta68.h
+++ b/gdb/config/m68k/tm-delta68.h
@@ -68,10 +68,10 @@ struct frame_info;
#define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \
{ \
- char raw_buf[REGISTER_RAW_SIZE (FP0_REGNUM)]; \
+ char raw_buf[DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM)]; \
DEPRECATED_REGISTER_CONVERT_TO_RAW (TYPE, FP0_REGNUM, VALBUF, raw_buf); \
deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (FP0_REGNUM), \
- raw_buf, REGISTER_RAW_SIZE (FP0_REGNUM)); \
+ raw_buf, DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM)); \
} \
else \
deprecated_write_register_bytes ((TYPE_CODE(TYPE) == TYPE_CODE_PTR ? 8 * 4 : 0), \
diff --git a/gdb/config/m68k/tm-sun3.h b/gdb/config/m68k/tm-sun3.h
index f721dcf..93fea35 100644
--- a/gdb/config/m68k/tm-sun3.h
+++ b/gdb/config/m68k/tm-sun3.h
@@ -86,24 +86,4 @@
/* The code which tries to deal with this bug is never harmful on a sun3. */
#define SUN_FIXED_LBRAC_BUG (0)
-/* On the sun3 the kernel pushes a sigcontext on the user stack and
- then `calls' _sigtramp in user code. _sigtramp saves the floating
- point status on the stack and calls the signal handler
- function. The stack does not contain enough information to allow a
- normal backtrace, but sigcontext contains the saved user
- pc/sp. DEPRECATED_FRAME_CHAIN and friends in tm-m68k.h and
- m68k_find_saved_regs deal with this situation by manufacturing a
- fake frame for _sigtramp. SIG_PC_FP_OFFSET is the offset from the
- signal handler frame to the saved pc in sigcontext.
- SIG_SP_FP_OFFSET is the offset from the signal handler frame to the
- end of sigcontext which is identical to the saved sp at
- SIG_PC_FP_OFFSET - 4.
-
- Please note that it is impossible to correctly backtrace from a breakpoint
- in _sigtramp as _sigtramp modifies the stack pointer a few times. */
-
-#undef SIG_PC_FP_OFFSET
-#define SIG_PC_FP_OFFSET 324
-#define SIG_SP_FP_OFFSET 332
-
#endif /* TM_SUN3_H */
diff --git a/gdb/config/m68k/tm-vx68.h b/gdb/config/m68k/tm-vx68.h
index 271eb7e..6eaf418 100644
--- a/gdb/config/m68k/tm-vx68.h
+++ b/gdb/config/m68k/tm-vx68.h
@@ -72,11 +72,7 @@
#define GET_LONGJMP_TARGET(ADDR) m68k_get_longjmp_target(ADDR)
-/* Number of registers in a ptrace_getregs call. */
-
-#define VX_NUM_REGS (18)
-
/* Number of registers in a ptrace_getfpregs call. */
-#define VX_SIZE_FPREGS (8 * REGISTER_RAW_SIZE (FP0_REGNUM) \
+#define VX_SIZE_FPREGS (8 * DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) \
+ (3 * DEPRECATED_REGISTER_SIZE))
diff --git a/gdb/config/m88k/xm-delta88v4.h b/gdb/config/m88k/xm-delta88v4.h
deleted file mode 100644
index 932b902..0000000
--- a/gdb/config/m88k/xm-delta88v4.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Host machine description for Motorola Delta 88 box, for GDB.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993
- Free Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#include "config/xm-sysv4.h"
diff --git a/gdb/config/mips/irix6.mh b/gdb/config/mips/irix6.mh
index 8075f0d..141bff6 100644
--- a/gdb/config/mips/irix6.mh
+++ b/gdb/config/mips/irix6.mh
@@ -1,6 +1,6 @@
# Host: SGI Iris running irix 6.x
-XM_FILE= xm-irix6.h
-NAT_FILE= nm-irix6.h
+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
diff --git a/gdb/config/mips/linux.mh b/gdb/config/mips/linux.mh
index 38f8725..3fbc3e9 100644
--- a/gdb/config/mips/linux.mh
+++ b/gdb/config/mips/linux.mh
@@ -1,5 +1,4 @@
# Host: Linux/MIPS
-XM_FILE= xm-linux.h
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o mips-linux-nat.o \
thread-db.o lin-lwp.o proc-service.o linux-proc.o gcore.o \
diff --git a/gdb/config/mips/mipsm3.mh b/gdb/config/mips/mipsm3.mh
deleted file mode 100644
index fc9f37c..0000000
--- a/gdb/config/mips/mipsm3.mh
+++ /dev/null
@@ -1,6 +0,0 @@
-# OBSOLETE # Host: Little endian MIPS machine such as pmax
-# OBSOLETE # running Mach 3.0 operating system
-# OBSOLETE
-# OBSOLETE NATDEPFILES= mipsm3-nat.o m3-nat.o core-aout.o
-# OBSOLETE XM_FILE= xm-mipsm3.h
-# OBSOLETE NAT_FILE= ../nm-m3.h
diff --git a/gdb/config/mips/mipsm3.mt b/gdb/config/mips/mipsm3.mt
deleted file mode 100644
index 837b27e..0000000
--- a/gdb/config/mips/mipsm3.mt
+++ /dev/null
@@ -1,4 +0,0 @@
-# OBSOLETE # Target: Little-endian MIPS machine such as pmax
-# OBSOLETE # running Mach 3.0 operating system
-# OBSOLETE TDEPFILES= mips-tdep.o
-# OBSOLETE TM_FILE= tm-mipsm3.h
diff --git a/gdb/config/mips/nm-irix6.h b/gdb/config/mips/nm-irix6.h
deleted file mode 100644
index 301b629..0000000
--- a/gdb/config/mips/nm-irix6.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Definitions for native support of irix6.
-
- Copyright 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 "mips/nm-irix5.h"
diff --git a/gdb/config/mips/nm-linux.h b/gdb/config/mips/nm-linux.h
index 426dd55..8fd2193 100644
--- a/gdb/config/mips/nm-linux.h
+++ b/gdb/config/mips/nm-linux.h
@@ -1,6 +1,6 @@
/* Native-dependent definitions for GNU/Linux on MIPS.
- Copyright 1996, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -22,8 +22,6 @@
#ifndef NM_MIPSLINUX_H
#define NM_MIPSLINUX_H
-#define MIPS_GNULINUX_TARGET
-
#include "config/nm-linux.h"
/* Return sizeof user struct to callers in less machine dependent
diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h
index 51a6a7d..59aeb5d 100644
--- a/gdb/config/mips/tm-mips.h
+++ b/gdb/config/mips/tm-mips.h
@@ -130,10 +130,6 @@ typedef struct mips_extra_func_info
}
*mips_extra_func_info_t;
-extern void mips_print_extra_frame_info (struct frame_info *frame);
-#define PRINT_EXTRA_FRAME_INFO(fi) \
- mips_print_extra_frame_info (fi)
-
/* It takes two values to specify a frame on the MIPS.
In fact, the *PC* is the primary value that sets up a frame. The
diff --git a/gdb/config/mips/tm-mipsm3.h b/gdb/config/mips/tm-mipsm3.h
deleted file mode 100644
index dbc10d7..0000000
--- a/gdb/config/mips/tm-mipsm3.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a mips box under Mach 3.0
-// OBSOLETE Copyright 1992, 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 /* Mach specific definitions for little endian mips (e.g. pmax)
-// OBSOLETE * running Mach 3.0
-// OBSOLETE *
-// OBSOLETE * Author: Jukka Virtanen <jtv@hut.fi>
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Include common definitions for Mach3 systems */
-// OBSOLETE #include "config/nm-m3.h"
-// OBSOLETE
-// OBSOLETE /* Define offsets to access CPROC stack when it does not have
-// OBSOLETE * a kernel thread.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* From mk/user/threads/mips/csw.s */
-// OBSOLETE #define SAVED_FP (12*4)
-// OBSOLETE #define SAVED_PC (13*4)
-// OBSOLETE #define SAVED_BYTES (14*4)
-// OBSOLETE
-// OBSOLETE /* Using these, define our offsets to items strored in
-// OBSOLETE * cproc_switch in csw.s
-// OBSOLETE */
-// OBSOLETE #define MACHINE_CPROC_SP_OFFSET SAVED_BYTES
-// OBSOLETE #define MACHINE_CPROC_PC_OFFSET SAVED_PC
-// OBSOLETE #define MACHINE_CPROC_FP_OFFSET SAVED_FP
-// OBSOLETE
-// OBSOLETE /* Thread flavors used in setting the Trace state.
-// OBSOLETE
-// OBSOLETE * In <mach/machine/thread_status.h>
-// OBSOLETE */
-// OBSOLETE #define TRACE_FLAVOR MIPS_EXC_STATE
-// OBSOLETE #define TRACE_FLAVOR_SIZE MIPS_EXC_STATE_COUNT
-// OBSOLETE #define TRACE_SET(x,state) ((struct mips_exc_state *)state)->cause = EXC_SST;
-// OBSOLETE #define TRACE_CLEAR(x,state) 0
-// OBSOLETE
-// OBSOLETE /* Mach supports attach/detach */
-// OBSOLETE #define ATTACH_DETACH 1
-// OBSOLETE
-// OBSOLETE #include "mips/tm-mips.h"
-// OBSOLETE
-// OBSOLETE /* Address of end of user stack space.
-// OBSOLETE * for MACH, see <machine/vmparam.h>
-// OBSOLETE */
-// OBSOLETE #undef STACK_END_ADDR
-// OBSOLETE #define STACK_END_ADDR USRSTACK
-// OBSOLETE
-// OBSOLETE /* Output registers in tabular format */
-// OBSOLETE #define TABULAR_REGISTER_OUTPUT
diff --git a/gdb/config/mips/tm-vxmips.h b/gdb/config/mips/tm-vxmips.h
index 5475fb5..5eb1043 100644
--- a/gdb/config/mips/tm-vxmips.h
+++ b/gdb/config/mips/tm-vxmips.h
@@ -21,9 +21,3 @@
#include "mips/tm-mips.h"
#include "config/tm-vxworks.h"
-
-/* FIXME: These are almost certainly wrong. */
-
-/* Number of registers in a ptrace_getregs call. */
-
-#define VX_NUM_REGS (NUM_REGS)
diff --git a/gdb/config/mips/xm-irix6.h b/gdb/config/mips/xm-irix6.h
deleted file mode 100644
index a8a4c68..0000000
--- a/gdb/config/mips/xm-irix6.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* Definitions for irix6 hosting support.
-
- Copyright 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 "mips/xm-irix5.h"
diff --git a/gdb/config/mips/xm-linux.h b/gdb/config/mips/xm-linux.h
deleted file mode 100644
index 4db6201..0000000
--- a/gdb/config/mips/xm-linux.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Host definitions for GNU/Linux on MIPS.
-
- Copyright 2001, 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 XM_MIPSLINUX_H
-#define XM_MIPSLINUX_H
-
-#endif /* XM_MIPSLINUX_H */
diff --git a/gdb/config/mips/xm-mipsm3.h b/gdb/config/mips/xm-mipsm3.h
deleted file mode 100644
index 2207d3a..0000000
--- a/gdb/config/mips/xm-mipsm3.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a mips box under 4.3bsd.
-// OBSOLETE Copyright 1986, 1987, 1989, 1993 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 #define KERNEL_U_ADDR 0 /* Not needed. */
-// OBSOLETE
-// OBSOLETE /* Only used for core files on DECstations. */
-// 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 */
diff --git a/gdb/config/mn10200/mn10200.mt b/gdb/config/mn10200/mn10200.mt
deleted file mode 100644
index be374ec..0000000
--- a/gdb/config/mn10200/mn10200.mt
+++ /dev/null
@@ -1,6 +0,0 @@
-# OBSOLETE # Target: Matsushita mn10200
-# OBSOLETE TDEPFILES= mn10200-tdep.o
-# OBSOLETE TM_FILE= tm-mn10200.h
-# OBSOLETE
-# OBSOLETE SIM_OBS = remote-sim.o
-# OBSOLETE SIM = ../sim/mn10200/libsim.a
diff --git a/gdb/config/mn10200/tm-mn10200.h b/gdb/config/mn10200/tm-mn10200.h
deleted file mode 100644
index 511c136..0000000
--- a/gdb/config/mn10200/tm-mn10200.h
+++ /dev/null
@@ -1,214 +0,0 @@
-// OBSOLETE /* Parameters for execution on a Matsushita mn10200 processor.
-// OBSOLETE
-// OBSOLETE Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
-// OBSOLETE Foundation, Inc.
-// OBSOLETE
-// OBSOLETE Contributed by Geoffrey Noer <noer@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 /* FIXME: cagney/2001-03-01: The below macros refer to functions
-// OBSOLETE declared in "regcache.h". The ``correct fix'' is to convert those
-// OBSOLETE macros into functions. */
-// OBSOLETE #include "regcache.h"
-// OBSOLETE #include "symtab.h" /* For namespace_enum. */
-// OBSOLETE #include "symfile.h" /* For entry_point_address(). */
-// OBSOLETE
-// OBSOLETE /* ints are only 16bits on the mn10200. */
-// OBSOLETE #undef TARGET_INT_BIT
-// OBSOLETE #define TARGET_INT_BIT 16
-// OBSOLETE
-// OBSOLETE /* The mn10200 doesn't support long long types. */
-// OBSOLETE #undef TARGET_LONG_LONG_BIT
-// OBSOLETE #define TARGET_LONG_LONG_BIT 32
-// OBSOLETE
-// OBSOLETE /* The mn10200 doesn't support double or long double either. */
-// OBSOLETE #undef TARGET_DOUBLE_BIT
-// OBSOLETE #undef TARGET_LONG_DOUBLE_BIT
-// OBSOLETE #define TARGET_DOUBLE_BIT 32
-// OBSOLETE #define TARGET_LONG_DOUBLE_BIT 32
-// OBSOLETE
-// OBSOLETE /* Not strictly correct, but the machine independent code is not
-// OBSOLETE ready to handle any of the basic sizes not being a power of two. */
-// OBSOLETE #undef TARGET_PTR_BIT
-// OBSOLETE #define TARGET_PTR_BIT 32
-// OBSOLETE
-// OBSOLETE /* The mn10200 really has 24 bit registers but the simulator reads/writes
-// OBSOLETE them as 32bit values, so we claim they're 32bits each. This may have
-// OBSOLETE to be tweaked if the Matsushita emulator/board really deals with them
-// OBSOLETE as 24bits each. */
-// OBSOLETE #define REGISTER_SIZE 4
-// OBSOLETE
-// OBSOLETE #define MAX_REGISTER_RAW_SIZE REGISTER_SIZE
-// OBSOLETE #define NUM_REGS 11
-// OBSOLETE
-// OBSOLETE #define REGISTER_BYTES (NUM_REGS * REGISTER_SIZE)
-// OBSOLETE
-// OBSOLETE #define REGISTER_NAMES \
-// OBSOLETE { "d0", "d1", "d2", "d3", "a0", "a1", "a2", "sp", \
-// OBSOLETE "pc", "mdr", "psw"}
-// OBSOLETE
-// OBSOLETE #define FP_REGNUM 6
-// OBSOLETE #define SP_REGNUM 7
-// OBSOLETE #define PC_REGNUM 8
-// OBSOLETE #define MDR_REGNUM 9
-// OBSOLETE #define PSW_REGNUM 10
-// OBSOLETE
-// OBSOLETE /* Treat the registers as 32bit values. */
-// OBSOLETE #define REGISTER_VIRTUAL_TYPE(REG) builtin_type_long
-// OBSOLETE
-// OBSOLETE #define REGISTER_BYTE(REG) ((REG) * REGISTER_SIZE)
-// OBSOLETE #define REGISTER_VIRTUAL_SIZE(REG) REGISTER_SIZE
-// OBSOLETE #define REGISTER_RAW_SIZE(REG) REGISTER_SIZE
-// OBSOLETE
-// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE REGISTER_SIZE
-// OBSOLETE
-// OBSOLETE /* The breakpoint instruction must be the same size as te smallest
-// OBSOLETE instruction in the instruction set.
-// OBSOLETE
-// OBSOLETE The Matsushita mn10x00 processors have single byte instructions
-// OBSOLETE so we need a single byte breakpoint. Matsushita hasn't defined
-// OBSOLETE one, so we defined it ourselves.
-// OBSOLETE
-// OBSOLETE 0xff is the only available single byte insn left on the mn10200. */
-// OBSOLETE #define BREAKPOINT {0xff}
-// OBSOLETE
-// OBSOLETE #define FUNCTION_START_OFFSET 0
-// OBSOLETE
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0
-// OBSOLETE
-// OBSOLETE /* Stacks grow the normal way. */
-// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-// OBSOLETE
-// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \
-// OBSOLETE (read_memory_integer (read_register (SP_REGNUM), REGISTER_SIZE) & 0xffffff)
-// OBSOLETE
-// OBSOLETE struct frame_info;
-// OBSOLETE struct frame_saved_regs;
-// OBSOLETE struct type;
-// OBSOLETE struct value;
-// OBSOLETE
-// OBSOLETE #define EXTRA_FRAME_INFO struct frame_saved_regs fsr; int status; int stack_size;
-// OBSOLETE
-// OBSOLETE extern void mn10200_init_extra_frame_info (struct frame_info *);
-// OBSOLETE #define INIT_EXTRA_FRAME_INFO(fromleaf, fi) mn10200_init_extra_frame_info (fi)
-// OBSOLETE #define DEPRECATED_INIT_FRAME_PC(x,y) (init_frame_pc_noop (x, y))
-// OBSOLETE #define INIT_FRAME_PC_FIRST(x,y) (init_frame_pc_noop (x, y))
-// OBSOLETE
-// OBSOLETE extern void mn10200_frame_find_saved_regs (struct frame_info *,
-// OBSOLETE struct frame_saved_regs *);
-// OBSOLETE #define FRAME_FIND_SAVED_REGS(fi, regaddr) regaddr = fi->fsr
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR mn10200_frame_chain (struct frame_info *);
-// OBSOLETE #define FRAME_CHAIN(fi) mn10200_frame_chain (fi)
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR mn10200_find_callers_reg (struct frame_info *, int);
-// OBSOLETE extern CORE_ADDR mn10200_frame_saved_pc (struct frame_info *);
-// OBSOLETE #define FRAME_SAVED_PC(FI) (mn10200_frame_saved_pc (FI))
-// 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 #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE, REGBUF, VALBUF) \
-// OBSOLETE { \
-// OBSOLETE if (TYPE_LENGTH (TYPE) > 8) \
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check"); \
-// OBSOLETE else if (TYPE_LENGTH (TYPE) > 2 && TYPE_CODE (TYPE) != TYPE_CODE_PTR) \
-// OBSOLETE { \
-// OBSOLETE memcpy (VALBUF, REGBUF + REGISTER_BYTE (0), 2); \
-// OBSOLETE memcpy (VALBUF + 2, REGBUF + REGISTER_BYTE (1), 2); \
-// OBSOLETE } \
-// OBSOLETE else if (TYPE_CODE (TYPE) == TYPE_CODE_PTR)\
-// OBSOLETE { \
-// OBSOLETE memcpy (VALBUF, REGBUF + REGISTER_BYTE (4), TYPE_LENGTH (TYPE)); \
-// OBSOLETE } \
-// OBSOLETE else \
-// OBSOLETE { \
-// OBSOLETE memcpy (VALBUF, REGBUF + REGISTER_BYTE (0), TYPE_LENGTH (TYPE)); \
-// OBSOLETE } \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \
-// OBSOLETE extract_address (REGBUF + REGISTER_BYTE (4), \
-// OBSOLETE REGISTER_RAW_SIZE (4))
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE, VALBUF) \
-// OBSOLETE { \
-// OBSOLETE if (TYPE_LENGTH (TYPE) > 8) \
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check"); \
-// OBSOLETE else if (TYPE_LENGTH (TYPE) > 2 && TYPE_CODE (TYPE) != TYPE_CODE_PTR) \
-// OBSOLETE { \
-// OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (0), VALBUF, 2); \
-// OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (1), VALBUF + 2, 2); \
-// OBSOLETE } \
-// OBSOLETE else if (TYPE_CODE (TYPE) == TYPE_CODE_PTR)\
-// OBSOLETE { \
-// OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (4), VALBUF, TYPE_LENGTH (TYPE)); \
-// OBSOLETE } \
-// OBSOLETE else \
-// OBSOLETE { \
-// OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (0), VALBUF, TYPE_LENGTH (TYPE)); \
-// OBSOLETE } \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR mn10200_store_struct_return (CORE_ADDR addr, CORE_ADDR sp);
-// OBSOLETE #define STORE_STRUCT_RETURN(STRUCT_ADDR, SP) \
-// OBSOLETE (SP) = mn10200_store_struct_return (STRUCT_ADDR, SP)
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR mn10200_skip_prologue (CORE_ADDR);
-// OBSOLETE #define SKIP_PROLOGUE(pc) (mn10200_skip_prologue (pc))
-// OBSOLETE
-// OBSOLETE #define FRAME_ARGS_SKIP 0
-// OBSOLETE
-// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) (get_frame_base (fi))
-// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) (get_frame_base (fi))
-// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
-// OBSOLETE
-// OBSOLETE extern void mn10200_pop_frame (struct frame_info *);
-// OBSOLETE #define POP_FRAME mn10200_pop_frame (get_current_frame ())
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 1
-// OBSOLETE #define CALL_DUMMY {0}
-// OBSOLETE #define CALL_DUMMY_START_OFFSET (0)
-// OBSOLETE #define CALL_DUMMY_BREAKPOINT_OFFSET (0)
-// OBSOLETE #define CALL_DUMMY_LOCATION AT_ENTRY_POINT
-// OBSOLETE #define FIX_CALL_DUMMY(DUMMY, START, FUNADDR, NARGS, ARGS, TYPE, GCCP)
-// OBSOLETE #define CALL_DUMMY_ADDRESS() entry_point_address ()
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR mn10200_push_return_address (CORE_ADDR, CORE_ADDR);
-// OBSOLETE #define PUSH_RETURN_ADDRESS(PC, SP) mn10200_push_return_address (PC, SP)
-// OBSOLETE
-// OBSOLETE #define PUSH_DUMMY_FRAME generic_push_dummy_frame ()
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR mn10200_push_arguments (int, struct value **, CORE_ADDR,
-// OBSOLETE unsigned char, CORE_ADDR);
-// OBSOLETE #define PUSH_ARGUMENTS(NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR) \
-// OBSOLETE (mn10200_push_arguments (NARGS, ARGS, SP, STRUCT_RETURN, STRUCT_ADDR))
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_PC_IN_CALL_DUMMY(PC, SP, FP) generic_pc_in_call_dummy (PC, SP, FP)
-// OBSOLETE
-// OBSOLETE #define REG_STRUCT_HAS_ADDR(gcc_p,TYPE) \
-// OBSOLETE (TYPE_LENGTH (TYPE) > 8)
-// OBSOLETE
-// OBSOLETE extern use_struct_convention_fn mn10200_use_struct_convention;
-// OBSOLETE #define USE_STRUCT_CONVENTION(GCC_P, TYPE) mn10200_use_struct_convention (GCC_P, TYPE)
-// OBSOLETE
-// OBSOLETE /* Define this for Wingdb */
-// OBSOLETE #define TARGET_MN10200
diff --git a/gdb/config/nm-m3.h b/gdb/config/nm-m3.h
deleted file mode 100644
index 0cc84e3..0000000
--- a/gdb/config/nm-m3.h
+++ /dev/null
@@ -1,126 +0,0 @@
-// OBSOLETE /* Mach 3.0 common definitions and global vars.
-// OBSOLETE
-// OBSOLETE Copyright 1992, 1993, 1994, 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 #ifndef NM_M3_H
-// OBSOLETE #define NM_M3_H
-// OBSOLETE
-// OBSOLETE #include <mach.h>
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE /* Mach3 doesn't declare errno in <errno.h>. */
-// OBSOLETE extern int errno;
-// OBSOLETE
-// OBSOLETE /* Task port of our debugged inferior. */
-// OBSOLETE
-// OBSOLETE extern task_t inferior_task;
-// OBSOLETE
-// OBSOLETE /* Thread port of the current thread in the inferior. */
-// OBSOLETE
-// OBSOLETE extern thread_t current_thread;
-// OBSOLETE
-// OBSOLETE /* If nonzero, we must suspend/abort && resume threads
-// OBSOLETE * when setting or getting the state.
-// OBSOLETE */
-// OBSOLETE extern int must_suspend_thread;
-// OBSOLETE
-// OBSOLETE #define PREPARE_TO_PROCEED(select_it) mach3_prepare_to_proceed(select_it)
-// OBSOLETE
-// OBSOLETE /* Try to get the privileged host port for authentication to machid
-// OBSOLETE
-// OBSOLETE * If you can get this, you may debug anything on this host.
-// OBSOLETE *
-// OBSOLETE * If you can't, gdb gives it's own task port as the
-// OBSOLETE * authentication port
-// OBSOLETE */
-// OBSOLETE #define mach_privileged_host_port() task_by_pid(-1)
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * This is the MIG ID number of the emulator/server bsd_execve() RPC call.
-// OBSOLETE *
-// OBSOLETE * It SHOULD never change, but if it does, gdb `run'
-// OBSOLETE * command won't work until you fix this define.
-// OBSOLETE *
-// OBSOLETE */
-// OBSOLETE #define MIG_EXEC_SYSCALL_ID 101000
-// OBSOLETE
-// OBSOLETE /* If our_message_port gets a msg with this ID,
-// OBSOLETE * GDB suspends it's inferior and enters command level.
-// OBSOLETE * (Useful at least if ^C does not work)
-// OBSOLETE */
-// OBSOLETE #define GDB_MESSAGE_ID_STOP 0x41151
-// OBSOLETE
-// OBSOLETE /* wait3 WNOHANG is defined in <sys/wait.h> but
-// OBSOLETE * for some reason gdb does not want to include
-// OBSOLETE * that file.
-// OBSOLETE *
-// OBSOLETE * If your system defines WNOHANG differently, this has to be changed.
-// OBSOLETE */
-// OBSOLETE #define WNOHANG 1
-// OBSOLETE
-// OBSOLETE /* Before storing, we need to read all the registers. */
-// OBSOLETE
-// OBSOLETE #define CHILD_PREPARE_TO_STORE() deprecated_read_register_bytes (0, NULL, REGISTER_BYTES)
-// OBSOLETE
-// OBSOLETE /* Check if the inferior exists */
-// OBSOLETE #define MACH_ERROR_NO_INFERIOR \
-// OBSOLETE do if (!MACH_PORT_VALID (inferior_task)) \
-// OBSOLETE error ("Inferior task does not exist."); while(0)
-// OBSOLETE
-// OBSOLETE /* Error handler for mach calls */
-// OBSOLETE #define CHK(str,ret) \
-// OBSOLETE do if (ret != KERN_SUCCESS) \
-// OBSOLETE error ("Gdb %s [%d] %s : %s\n",__FILE__,__LINE__,str, \
-// OBSOLETE mach_error_string(ret)); while(0)
-// OBSOLETE
-// OBSOLETE /* This is from POE9 emulator/emul_stack.h
-// OBSOLETE */
-// OBSOLETE /*
-// OBSOLETE * Top of emulator stack holds link and reply port.
-// OBSOLETE */
-// OBSOLETE struct emul_stack_top
-// OBSOLETE {
-// OBSOLETE struct emul_stack_top *link;
-// OBSOLETE mach_port_t reply_port;
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE #define EMULATOR_STACK_SIZE (4096*4)
-// OBSOLETE
-// OBSOLETE #define THREAD_ALLOWED_TO_BREAK(mid) mach_thread_for_breakpoint (mid)
-// OBSOLETE
-// OBSOLETE #define THREAD_PARSE_ID(arg) mach_thread_parse_id (arg)
-// OBSOLETE
-// OBSOLETE #define THREAD_OUTPUT_ID(mid) mach_thread_output_id (mid)
-// OBSOLETE
-// OBSOLETE #define ATTACH_TO_THREAD attach_to_thread
-// OBSOLETE
-// OBSOLETE /* Don't do wait_for_inferior on attach. */
-// OBSOLETE #define ATTACH_NO_WAIT
-// OBSOLETE
-// OBSOLETE /* Do Mach 3 dependent operations when ^C or a STOP is requested */
-// OBSOLETE #define DO_QUIT() mach3_quit ()
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE /* This is bogus. It is NOT OK to quit out of target_wait. */
-// OBSOLETE /* If in mach_msg() and ^C is typed set immediate_quit */
-// OBSOLETE #define REQUEST_QUIT() mach3_request_quit ()
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE #endif /* NM_M3_H */
diff --git a/gdb/config/ns32k/tm-ns32k.h b/gdb/config/ns32k/tm-ns32k.h
index 96dd2cb..a603fc8 100644
--- a/gdb/config/ns32k/tm-ns32k.h
+++ b/gdb/config/ns32k/tm-ns32k.h
@@ -32,6 +32,4 @@
#define STACK_END_ADDR (0xfffff000)
#endif
-#define NUM_GENERAL_REGS 8
-
#endif /* TM_NS32K_H */
diff --git a/gdb/config/pa/hppabsd.mh b/gdb/config/pa/hppabsd.mh
deleted file mode 100644
index e4d0215..0000000
--- a/gdb/config/pa/hppabsd.mh
+++ /dev/null
@@ -1,4 +0,0 @@
-# OBSOLETE # Host: Hewlett-Packard PA-RISC machine, running BSD
-# OBSOLETE XM_FILE= xm-hppab.h
-# OBSOLETE NAT_FILE= nm-hppab.h
-# OBSOLETE NATDEPFILES= hppab-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/hppabsd.mt b/gdb/config/pa/hppabsd.mt
deleted file mode 100644
index e63f9b8..0000000
--- a/gdb/config/pa/hppabsd.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: HP PA-RISC running bsd
-# OBSOLETE TDEPFILES= hppa-tdep.o
-# OBSOLETE TM_FILE= tm-hppab.h
diff --git a/gdb/config/pa/hppaosf.mh b/gdb/config/pa/hppaosf.mh
deleted file mode 100644
index 0e82dc1..0000000
--- a/gdb/config/pa/hppaosf.mh
+++ /dev/null
@@ -1,5 +0,0 @@
-# OBSOLETE # Host: Hewlett-Packard PA-RISC machine, running BSD
-# OBSOLETE XM_FILE= xm-hppab.h
-# OBSOLETE NAT_FILE= nm-hppao.h
-# OBSOLETE NATDEPFILES= fork-child.o m3-nat.o hppam3-nat.o somread.o hpread.o somsolib.o
-# OBSOLETE NAT_CLIBS= -lmachid -lnetname -lmach
diff --git a/gdb/config/pa/hppaosf.mt b/gdb/config/pa/hppaosf.mt
deleted file mode 100644
index 4a54c79..0000000
--- a/gdb/config/pa/hppaosf.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: HP PA-RISC running OSF1
-# OBSOLETE TDEPFILES= hppa-tdep.o
-# OBSOLETE TM_FILE= tm-hppao.h
diff --git a/gdb/config/pa/hppapro.mt b/gdb/config/pa/hppapro.mt
deleted file mode 100644
index cfd9969..0000000
--- a/gdb/config/pa/hppapro.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: PA based debug monitor
-# OBSOLETE TDEPFILES= hppa-tdep.o op50-rom.o w89k-rom.o monitor.o xmodem.o dsrec.o
-# OBSOLETE TM_FILE= tm-pro.h
diff --git a/gdb/config/pa/nm-hppab.h b/gdb/config/pa/nm-hppab.h
deleted file mode 100644
index 96dea6e..0000000
--- a/gdb/config/pa/nm-hppab.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// OBSOLETE /* HPPA PA-RISC machine native support for BSD, for GDB.
-// OBSOLETE Copyright 1991, 1992, 1993, 1994, 1995, 2002 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 "somsolib.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE #define U_REGS_OFFSET 0
-// OBSOLETE
-// OBSOLETE #define KERNEL_U_ADDR 0
-// OBSOLETE
-// OBSOLETE /* What a coincidence! */
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE { addr = (int)(blockend) + REGISTER_BYTE (regno);}
-// OBSOLETE
-// OBSOLETE /* 3rd argument to ptrace is supposed to be a caddr_t. */
-// OBSOLETE
-// OBSOLETE #define PTRACE_ARG3_TYPE caddr_t
-// OBSOLETE
-// OBSOLETE /* HPUX 8.0, in its infinite wisdom, has chosen to prototype ptrace
-// OBSOLETE with five arguments, so programs written for normal ptrace lose. */
-// OBSOLETE #define FIVE_ARG_PTRACE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* fetch_inferior_registers is in hppab-nat.c. */
-// OBSOLETE #define FETCH_INFERIOR_REGISTERS
-// OBSOLETE
-// OBSOLETE /* attach/detach works to some extent under BSD and HPUX. So long
-// OBSOLETE as the process you're attaching to isn't blocked waiting on io,
-// OBSOLETE blocked waiting on a signal, or in a system call things work
-// OBSOLETE fine. (The problems in those cases are related to the fact that
-// OBSOLETE the kernel can't provide complete register information for the
-// OBSOLETE target process... Which really pisses off GDB.) */
-// OBSOLETE
-// OBSOLETE #define ATTACH_DETACH
-// OBSOLETE
-// OBSOLETE /* The PA-BSD kernel has support for using the data memory break bit
-// OBSOLETE to implement fast watchpoints.
-// OBSOLETE
-// OBSOLETE Watchpoints on the PA act much like traditional page protection
-// OBSOLETE schemes, but with some notable differences.
-// OBSOLETE
-// OBSOLETE First, a special bit in the page table entry is used to cause
-// OBSOLETE a trap when a specific page is written to. This avoids having
-// OBSOLETE to overload watchpoints on the page protection bits. This makes
-// OBSOLETE it possible for the kernel to easily decide if a trap was caused
-// OBSOLETE by a watchpoint or by the user writing to protected memory and can
-// OBSOLETE signal the user program differently in each case.
-// OBSOLETE
-// OBSOLETE Second, the PA has a bit in the processor status word which causes
-// OBSOLETE data memory breakpoints (aka watchpoints) to be disabled for a single
-// OBSOLETE instruction. This bit can be used to avoid the overhead of unprotecting
-// OBSOLETE and reprotecting pages when it becomes necessary to step over a watchpoint.
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE When the kernel receives a trap indicating a write to a page which
-// OBSOLETE is being watched, the kernel performs a couple of simple actions. First
-// OBSOLETE is sets the magic "disable memory breakpoint" bit in the processor
-// OBSOLETE status word, it then sends a SIGTRAP to the process which caused the
-// OBSOLETE trap.
-// OBSOLETE
-// OBSOLETE GDB will take control and catch the signal for the inferior. GDB then
-// OBSOLETE examines the PSW-X bit to determine if the SIGTRAP was caused by a
-// OBSOLETE watchpoint firing. If so GDB single steps the inferior over the
-// OBSOLETE instruction which caused the watchpoint to trigger (note because the
-// OBSOLETE kernel disabled the data memory break bit for one instruction no trap
-// OBSOLETE will be taken!). GDB will then determines the appropriate action to
-// OBSOLETE take. (this may include restarting the inferior if the watchpoint
-// OBSOLETE fired because of a write to an address on the same page as a watchpoint,
-// OBSOLETE but no write to the watched address occured). */
-// OBSOLETE
-// OBSOLETE #define TARGET_HAS_HARDWARE_WATCHPOINTS /* Enable the code in procfs.c */
-// OBSOLETE
-// OBSOLETE /* The PA can watch any number of locations, there's no need for it to reject
-// OBSOLETE anything (generic routines already check that all intermediates are
-// OBSOLETE in memory). */
-// OBSOLETE #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
-// OBSOLETE ((type) == bp_hardware_watchpoint)
-// OBSOLETE
-// OBSOLETE /* When a hardware watchpoint fires off the PC will be left at the
-// OBSOLETE instruction which caused the watchpoint. It will be necessary for
-// OBSOLETE GDB to step over the watchpoint.
-// OBSOLETE
-// OBSOLETE On a PA running BSD, it is trivial to identify when it will be
-// OBSOLETE necessary to step over a hardware watchpoint as we can examine
-// OBSOLETE the PSW-X bit. If the bit is on, then we trapped because of a
-// OBSOLETE watchpoint, else we trapped for some other reason. */
-// OBSOLETE #define STOPPED_BY_WATCHPOINT(W) \
-// OBSOLETE ((W).kind == TARGET_WAITKIND_STOPPED \
-// OBSOLETE && (W).value.sig == TARGET_SIGNAL_TRAP \
-// OBSOLETE && ((int) read_register (IPSW_REGNUM) & 0x00100000))
-// OBSOLETE
-// OBSOLETE /* The PA can single step over a watchpoint if the kernel has set the
-// OBSOLETE "X" bit in the processor status word (disable data memory breakpoint
-// OBSOLETE for one instruction).
-// OBSOLETE
-// OBSOLETE The kernel will always set this bit before notifying the inferior
-// OBSOLETE that it hit a watchpoint. Thus, the inferior can single step over
-// OBSOLETE the instruction which caused the watchpoint to fire. This avoids
-// OBSOLETE the traditional need to disable the watchpoint, step the inferior,
-// OBSOLETE then enable the watchpoint again. */
-// OBSOLETE #define HAVE_STEPPABLE_WATCHPOINT
-// OBSOLETE
-// OBSOLETE /* Use these macros for watchpoint insertion/deletion. */
-// OBSOLETE /* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
-// OBSOLETE #define target_insert_watchpoint(addr, len, type) hppa_set_watchpoint (addr, len, 1)
-// OBSOLETE #define target_remove_watchpoint(addr, len, type) hppa_set_watchpoint (addr, len, 0)
diff --git a/gdb/config/pa/nm-hppah.h b/gdb/config/pa/nm-hppah.h
index 29a52df..bf4fd3c 100644
--- a/gdb/config/pa/nm-hppah.h
+++ b/gdb/config/pa/nm-hppah.h
@@ -19,6 +19,8 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+struct target_ops;
+
#define U_REGS_OFFSET 0
#define KERNEL_U_ADDR 0
@@ -44,9 +46,10 @@
#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. */
-#define NEED_TEXT_START_END 1
+ appropriate ptrace operator to manipulate text. Simply
+ reading/writing user space will crap out HPUX. */
+#define DEPRECATED_HPUX_TEXT_END deprecated_hpux_text_end
+extern void deprecated_hpux_text_end (struct target_ops *exec_ops);
/* In hppah-nat.c: */
#define FETCH_INFERIOR_REGISTERS
diff --git a/gdb/config/pa/nm-hppao.h b/gdb/config/pa/nm-hppao.h
deleted file mode 100644
index 0a6b810..0000000
--- a/gdb/config/pa/nm-hppao.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// OBSOLETE /* HPPA PA-RISC machine native support for Lites, for GDB.
-// OBSOLETE Copyright 1995, 2002 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/nm-m3.h"
-// OBSOLETE #define U_REGS_OFFSET 0
-// OBSOLETE
-// OBSOLETE #define KERNEL_U_ADDR 0
-// OBSOLETE
-// OBSOLETE /* What a coincidence! */
-// OBSOLETE #define REGISTER_U_ADDR(addr, blockend, regno) \
-// OBSOLETE { addr = (int)(blockend) + REGISTER_BYTE (regno);}
-// OBSOLETE
-// OBSOLETE /* fetch_inferior_registers is in hppab-nat.c. */
-// OBSOLETE #define FETCH_INFERIOR_REGISTERS
-// OBSOLETE
-// OBSOLETE /* attach/detach works to some extent under BSD and HPUX. So long
-// OBSOLETE as the process you're attaching to isn't blocked waiting on io,
-// OBSOLETE blocked waiting on a signal, or in a system call things work
-// OBSOLETE fine. (The problems in those cases are related to the fact that
-// OBSOLETE the kernel can't provide complete register information for the
-// OBSOLETE target process... Which really pisses off GDB.) */
-// OBSOLETE
-// OBSOLETE #define ATTACH_DETACH
-// OBSOLETE
-// OBSOLETE #define EMULATOR_BASE 0x90100000
-// OBSOLETE #define EMULATOR_END 0x90200000
diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h
index d1b3555..9d4b134 100644
--- a/gdb/config/pa/tm-hppa.h
+++ b/gdb/config/pa/tm-hppa.h
@@ -35,8 +35,8 @@
#define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
/* Hack, get around problem with including "arch-utils.h". */
struct frame_info;
-extern CORE_ADDR init_frame_pc_default (int fromleaf, struct frame_info *prev);
-#define DEPRECATED_INIT_FRAME_PC(l,f) (init_frame_pc_default (l, f))
+extern CORE_ADDR deprecated_init_frame_pc_default (int fromleaf, struct frame_info *prev);
+#define DEPRECATED_INIT_FRAME_PC(l,f) (deprecated_init_frame_pc_default (l, f))
/* Forward declarations of some types we use in prototypes */
@@ -119,9 +119,12 @@ extern int hppa_instruction_nullified (void);
specified in the calling convention doc. As far as I know, the only
way to get the return value is to have the caller tell us where it
told the callee to put it, rather than have the callee tell us. */
-struct value *hppa_value_returned_from_stack (register struct type *valtype,
+struct value *hppa_value_returned_from_stack (struct type *valtype,
CORE_ADDR addr);
-#define VALUE_RETURNED_FROM_STACK(valtype,addr) \
+/* FIXME: cagney/2003-09-27: This method should now be redundant.
+ Instead, when "struct return convention", the inferior function
+ call code always saves and uses the struct return's stack address. */
+#define DEPRECATED_VALUE_RETURNED_FROM_STACK(valtype,addr) \
hppa_value_returned_from_stack (valtype, addr)
extern void hppa_frame_init_saved_regs (struct frame_info *);
@@ -205,7 +208,7 @@ extern void hppa_frame_init_saved_regs (struct frame_info *);
/* If we've reached a trap instruction within the call dummy, then
we'll consider that to mean that we've reached the call dummy's
end after its successful completion. */
-#define CALL_DUMMY_HAS_COMPLETED(pc, sp, frame_address) \
+#define DEPRECATED_CALL_DUMMY_HAS_COMPLETED(pc, sp, frame_address) \
(DEPRECATED_PC_IN_CALL_DUMMY((pc), (sp), (frame_address)) && \
(read_memory_integer((pc), 4) == BREAKPOINT32))
diff --git a/gdb/config/pa/tm-hppab.h b/gdb/config/pa/tm-hppab.h
deleted file mode 100644
index edacdbf..0000000
--- a/gdb/config/pa/tm-hppab.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// OBSOLETE /* Parameters for execution on an HP PA-RISC machine running BSD, for GDB.
-// OBSOLETE Contributed by the Center for Software Science at the
-// OBSOLETE University of Utah (pa-gdb-bugs@cs.utah.edu). */
-// OBSOLETE
-// OBSOLETE /* For BSD:
-// OBSOLETE
-// OBSOLETE The signal context structure pointer is always saved at the base
-// OBSOLETE of the frame + 0x4.
-// OBSOLETE
-// OBSOLETE We get the PC & SP directly from the sigcontext structure itself.
-// OBSOLETE For other registers we have to dive in a little deeper:
-// OBSOLETE
-// OBSOLETE The hardware save state pointer is at offset 0x10 within the
-// OBSOLETE signal context structure.
-// OBSOLETE
-// OBSOLETE Within the hardware save state, registers are found in the same order
-// OBSOLETE as the register numbers in GDB. */
-// OBSOLETE
-// OBSOLETE #define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
-// OBSOLETE { \
-// OBSOLETE *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
-// OBSOLETE *(TMP) = read_memory_integer (*(TMP) + 0x18, 4); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
-// OBSOLETE { \
-// OBSOLETE *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
-// OBSOLETE *(TMP) = read_memory_integer (*(TMP) + 0x8, 4); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
-// OBSOLETE { \
-// OBSOLETE int i; \
-// OBSOLETE CORE_ADDR TMP; \
-// OBSOLETE TMP = read_memory_integer ((FRAME)->frame + 0x4, 4); \
-// OBSOLETE TMP = read_memory_integer (TMP + 0x10, 4); \
-// OBSOLETE for (i = 0; i < NUM_REGS; i++) \
-// OBSOLETE { \
-// OBSOLETE if (i == SP_REGNUM) \
-// OBSOLETE (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
-// OBSOLETE else \
-// OBSOLETE (FSR)->regs[i] = TMP + i * 4; \
-// OBSOLETE } \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* It's mostly just the common stuff. */
-// OBSOLETE #include "pa/tm-hppa.h"
diff --git a/gdb/config/pa/tm-hppao.h b/gdb/config/pa/tm-hppao.h
deleted file mode 100644
index a466287..0000000
--- a/gdb/config/pa/tm-hppao.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// OBSOLETE /* Parameters for execution on an HP PA-RISC machine running OSF1, for GDB.
-// OBSOLETE Contributed by the Center for Software Science at the
-// OBSOLETE University of Utah (pa-gdb-bugs@cs.utah.edu). */
-// OBSOLETE
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE /* Define offsets to access CPROC stack when it does not have
-// OBSOLETE * a kernel thread.
-// OBSOLETE */
-// OBSOLETE #define MACHINE_CPROC_SP_OFFSET 20
-// OBSOLETE #define MACHINE_CPROC_PC_OFFSET 16
-// OBSOLETE #define MACHINE_CPROC_FP_OFFSET 12
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Software defined PSW masks.
-// OBSOLETE */
-// OBSOLETE #define PSW_SS 0x10000000 /* Kernel managed single step */
-// OBSOLETE
-// OBSOLETE /* Thread flavors used in re-setting the T bit.
-// OBSOLETE * @@ this is also bad for cross debugging.
-// OBSOLETE */
-// OBSOLETE #define TRACE_FLAVOR HP800_THREAD_STATE
-// OBSOLETE #define TRACE_FLAVOR_SIZE HP800_THREAD_STATE_COUNT
-// OBSOLETE #define TRACE_SET(x,state) \
-// OBSOLETE ((struct hp800_thread_state *)state)->cr22 |= PSW_SS
-// OBSOLETE #define TRACE_CLEAR(x,state) \
-// OBSOLETE ((((struct hp800_thread_state *)state)->cr22 &= ~PSW_SS), 1)
-// OBSOLETE
-// OBSOLETE /* For OSF1 (Should be close if not identical to BSD, but I haven't
-// OBSOLETE tested it yet):
-// OBSOLETE
-// OBSOLETE The signal context structure pointer is always saved at the base
-// OBSOLETE of the frame + 0x4.
-// OBSOLETE
-// OBSOLETE We get the PC & SP directly from the sigcontext structure itself.
-// OBSOLETE For other registers we have to dive in a little deeper:
-// OBSOLETE
-// OBSOLETE The hardware save state pointer is at offset 0x10 within the
-// OBSOLETE signal context structure.
-// OBSOLETE
-// OBSOLETE Within the hardware save state, registers are found in the same order
-// OBSOLETE as the register numbers in GDB. */
-// OBSOLETE
-// OBSOLETE #define FRAME_SAVED_PC_IN_SIGTRAMP(FRAME, TMP) \
-// OBSOLETE { \
-// OBSOLETE *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
-// OBSOLETE *(TMP) = read_memory_integer (*(TMP) + 0x18, 4); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define FRAME_BASE_BEFORE_SIGTRAMP(FRAME, TMP) \
-// OBSOLETE { \
-// OBSOLETE *(TMP) = read_memory_integer ((FRAME)->frame + 0x4, 4); \
-// OBSOLETE *(TMP) = read_memory_integer (*(TMP) + 0x8, 4); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define FRAME_FIND_SAVED_REGS_IN_SIGTRAMP(FRAME, FSR) \
-// OBSOLETE { \
-// OBSOLETE int i; \
-// OBSOLETE CORE_ADDR TMP; \
-// OBSOLETE TMP = read_memory_integer ((FRAME)->frame + 0x4, 4); \
-// OBSOLETE TMP = read_memory_integer (TMP + 0x10, 4); \
-// OBSOLETE for (i = 0; i < NUM_REGS; i++) \
-// OBSOLETE { \
-// OBSOLETE if (i == SP_REGNUM) \
-// OBSOLETE (FSR)->regs[SP_REGNUM] = read_memory_integer (TMP + SP_REGNUM * 4, 4); \
-// OBSOLETE else \
-// OBSOLETE (FSR)->regs[i] = TMP + i * 4; \
-// OBSOLETE } \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* OSF1 does not need the pc space queue restored. */
-// OBSOLETE #define NO_PC_SPACE_QUEUE_RESTORE
-// OBSOLETE
-// OBSOLETE /* The mach kernel uses the recovery counter to implement single
-// OBSOLETE stepping. While this greatly simplifies the kernel support
-// OBSOLETE necessary for single stepping, it unfortunately does the wrong
-// OBSOLETE thing in the presense of a nullified instruction (gives control
-// OBSOLETE back two insns after the nullifed insn). This is an artifact
-// OBSOLETE of the HP architecture (recovery counter doesn't tick for
-// OBSOLETE nullified insns).
-// OBSOLETE
-// OBSOLETE Do our best to avoid losing in such situations. */
-// OBSOLETE #define INSTRUCTION_NULLIFIED \
-// OBSOLETE (({ \
-// OBSOLETE int ipsw = (int)read_register(IPSW_REGNUM); \
-// OBSOLETE if (ipsw & PSW_N) \
-// OBSOLETE { \
-// OBSOLETE int pcoqt = (int)read_register(PCOQ_TAIL_REGNUM); \
-// OBSOLETE write_register(PCOQ_HEAD_REGNUM, pcoqt); \
-// OBSOLETE write_register(PCOQ_TAIL_REGNUM, pcoqt + 0x4); \
-// OBSOLETE write_register(IPSW_REGNUM, ipsw & ~(PSW_N | PSW_B | PSW_X)); \
-// OBSOLETE stop_pc = pcoqt; \
-// OBSOLETE } \
-// OBSOLETE }), 0)
-// OBSOLETE
-// OBSOLETE /* It's mostly just the common stuff. */
-// OBSOLETE
-// OBSOLETE #include "pa/tm-hppa.h"
diff --git a/gdb/config/pa/tm-pro.h b/gdb/config/pa/tm-pro.h
deleted file mode 100644
index c4f2b77..0000000
--- a/gdb/config/pa/tm-pro.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// OBSOLETE /* Parameters for execution on an HP PA-RISC level 0 embedded system.
-// OBSOLETE This is based on tm-hppab.h.
-// OBSOLETE Contributed by the Center for Software Science at the
-// OBSOLETE University of Utah (pa-gdb-bugs@cs.utah.edu). */
-// OBSOLETE
-// OBSOLETE #define PA_LEVEL_0 /* Disables touching space regs and fp */
-// OBSOLETE
-// OBSOLETE /* All the PRO targets use software floating point at the moment. */
-// OBSOLETE #define SOFT_FLOAT 1
-// OBSOLETE
-// OBSOLETE /* It's mostly just the common stuff. */
-// OBSOLETE #include "pa/tm-hppa.h"
-// OBSOLETE
-// OBSOLETE #define GDB_TARGET_IS_PA_ELF
diff --git a/gdb/config/pa/xm-hppab.h b/gdb/config/pa/xm-hppab.h
deleted file mode 100644
index d46e5ad..0000000
--- a/gdb/config/pa/xm-hppab.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// OBSOLETE /* Parameters for hosting on an HPPA PA-RISC machine, running BSD, for GDB.
-// OBSOLETE Copyright 1991, 1992, 1993, 1996, 1998 Free Software Foundation, Inc.
-// OBSOLETE
-// OBSOLETE Contributed by the Center for Software Science at the
-// OBSOLETE University of Utah (pa-gdb-bugs@cs.utah.edu).
-// 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 "pa/xm-pa.h"
diff --git a/gdb/config/pa/xm-pa.h b/gdb/config/pa/xm-pa.h
deleted file mode 100644
index 0095003..0000000
--- a/gdb/config/pa/xm-pa.h
+++ /dev/null
@@ -1,5 +0,0 @@
-// OBSOLETE /* Definitions for all PA machines. */
-// OBSOLETE
-// OBSOLETE /* This was created for "makeva", which is obsolete. This file can
-// OBSOLETE probably go away (unless someone can think of some other host thing
-// OBSOLETE which is common to various pa machines). */
diff --git a/gdb/config/powerpc/tm-linux.h b/gdb/config/powerpc/tm-linux.h
index e538390..25b9904 100644
--- a/gdb/config/powerpc/tm-linux.h
+++ b/gdb/config/powerpc/tm-linux.h
@@ -31,19 +31,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#undef IN_SOLIB_CALL_TRAMPOLINE
#undef SKIP_TRAMPOLINE_CODE
-/* We can single step on linux */
-#undef SOFTWARE_SINGLE_STEP
-#define SOFTWARE_SINGLE_STEP(p,q) internal_error (__FILE__, __LINE__, "Will never execute!")
-#undef SOFTWARE_SINGLE_STEP_P
-#define SOFTWARE_SINGLE_STEP_P() 0
-
/* Make sure nexti gets the help it needs for debugging assembly code
without symbols */
-#define AT_SUBROUTINE_CALL_INSTRUCTION_TARGET(prevpc,stoppc) \
- at_subroutine_call_instruction_target(prevpc,stoppc)
-extern int at_subroutine_call_instruction_target();
-
extern int ppc_linux_in_sigtramp (CORE_ADDR pc, char *func_name);
#undef IN_SIGTRAMP
#define IN_SIGTRAMP(pc,func_name) ppc_linux_in_sigtramp (pc,func_name)
diff --git a/gdb/config/powerpc/tm-ppc-eabi.h b/gdb/config/powerpc/tm-ppc-eabi.h
index e49b2bd..d29b05d 100644
--- a/gdb/config/powerpc/tm-ppc-eabi.h
+++ b/gdb/config/powerpc/tm-ppc-eabi.h
@@ -24,9 +24,6 @@
/* Use generic RS6000 definitions. */
#include "rs6000/tm-rs6000.h"
-/* except we want to allow single stepping */
-#undef SOFTWARE_SINGLE_STEP_P
-#define SOFTWARE_SINGLE_STEP_P() 0
#undef PROCESS_LINENUMBER_HOOK
diff --git a/gdb/config/rs6000/tm-rs6000.h b/gdb/config/rs6000/tm-rs6000.h
index 66b2f28..41183fb 100644
--- a/gdb/config/rs6000/tm-rs6000.h
+++ b/gdb/config/rs6000/tm-rs6000.h
@@ -83,18 +83,6 @@ extern void aix_process_linenos (void);
#define DEPRECATED_INIT_FRAME_PC_FIRST(fromleaf, prev) \
(fromleaf ? DEPRECATED_SAVED_PC_AFTER_CALL (prev->next) : \
prev->next ? DEPRECATED_FRAME_SAVED_PC (prev->next) : read_pc ())
-/* NOTE: cagney/2002-12-08: Add local declaration of
- init_frame_pc_noop() because it isn't possible to include
- "arch-utils.h" here. Not too bad as this entire file is going away
- anyway. */
-extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
-#define DEPRECATED_INIT_FRAME_PC(fromleaf, prev) (init_frame_pc_noop (fromleaf, prev))
-
-/* RS6000/AIX does not support PT_STEP. Has to be simulated. */
-
-#define SOFTWARE_SINGLE_STEP_P() 1
-extern void rs6000_software_single_step (enum target_signal, int);
-#define SOFTWARE_SINGLE_STEP(sig,bp_p) rs6000_software_single_step (sig, bp_p)
/* Notice when a new child process is started. */
diff --git a/gdb/config/s390/nm-linux.h b/gdb/config/s390/nm-linux.h
index 727a66eb..df601de 100644
--- a/gdb/config/s390/nm-linux.h
+++ b/gdb/config/s390/nm-linux.h
@@ -27,6 +27,10 @@
#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
+
#define REGISTER_U_ADDR(addr, blockend, regno) \
(addr) = s390_register_u_addr((blockend),(regno));
extern int s390_register_u_addr (int, int);
diff --git a/gdb/config/s390/s390.mh b/gdb/config/s390/s390.mh
index ab3350f..b45fa11 100644
--- a/gdb/config/s390/s390.mh
+++ b/gdb/config/s390/s390.mh
@@ -1,13 +1,6 @@
# Host: S390, running Linux
-
-XM_FILE= xm-linux.h
-XM_CLIBS=
-
NAT_FILE= nm-linux.h
NATDEPFILES= infptrace.o inftarg.o fork-child.o corelow.o s390-nat.o \
core-aout.o core-regset.o linux-proc.o gcore.o thread-db.o lin-lwp.o \
proc-service.o linux-nat.o
LOADLIBES = -ldl -rdynamic
-
-
-
diff --git a/gdb/config/s390/xm-linux.h b/gdb/config/s390/xm-linux.h
deleted file mode 100644
index d059d40..0000000
--- a/gdb/config/s390/xm-linux.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Native support for GNU/Linux, for GDB, the GNU debugger.
- Copyright 2001 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.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public 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/sh/embed.mt b/gdb/config/sh/embed.mt
index 4c82134..807aa11 100644
--- a/gdb/config/sh/embed.mt
+++ b/gdb/config/sh/embed.mt
@@ -1,4 +1,4 @@
-# Target: Embedded Hitachi Super-H with ICE and simulator
+# 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
diff --git a/gdb/config/sh/linux.mt b/gdb/config/sh/linux.mt
index 92ab4c4..83ada46 100644
--- a/gdb/config/sh/linux.mt
+++ b/gdb/config/sh/linux.mt
@@ -1,4 +1,4 @@
-# Target: Hitachi Super-H running GNU/Linux
+# 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
diff --git a/gdb/config/sh/tm-linux.h b/gdb/config/sh/tm-linux.h
index e8272d0..0117d81 100644
--- a/gdb/config/sh/tm-linux.h
+++ b/gdb/config/sh/tm-linux.h
@@ -1,4 +1,4 @@
-/* Target-specific definitions for GNU/Linux running on a Hitachi
+/* Target-specific definitions for GNU/Linux running on a Renesas
Super-H.
Copyright 2000, 2002 Free Software Foundation, Inc.
diff --git a/gdb/config/sh/tm-sh.h b/gdb/config/sh/tm-sh.h
index 966c8cd..228e0bc 100644
--- a/gdb/config/sh/tm-sh.h
+++ b/gdb/config/sh/tm-sh.h
@@ -1,4 +1,4 @@
-/* Target-specific definition for a Hitachi Super-H.
+/* Target-specific definition for a Renesas Super-H.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
diff --git a/gdb/config/sh/wince.mt b/gdb/config/sh/wince.mt
index 342c2d6..89a5a89 100644
--- a/gdb/config/sh/wince.mt
+++ b/gdb/config/sh/wince.mt
@@ -1,4 +1,4 @@
-# Target: Hitachi Super-H running on Windows CE
+# Target: Renesas Super-H running on Windows CE
TDEPFILES= sh-tdep.o sh64-tdep.o wince.o
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"'
diff --git a/gdb/config/sparc/sparclet.mt b/gdb/config/sparc/sparclet.mt
deleted file mode 100644
index 5dde41b..0000000
--- a/gdb/config/sparc/sparclet.mt
+++ /dev/null
@@ -1,3 +0,0 @@
-# OBSOLETE # Target: SPARC embedded Sparclet monitor
-# OBSOLETE TDEPFILES= sparc-tdep.o monitor.o sparclet-rom.o dsrec.o
-# OBSOLETE TM_FILE= tm-sparclet.h
diff --git a/gdb/config/sparc/sparclite.mt b/gdb/config/sparc/sparclite.mt
deleted file mode 100644
index 7ae1008..0000000
--- a/gdb/config/sparc/sparclite.mt
+++ /dev/null
@@ -1,5 +0,0 @@
-# OBSOLETE # Target: Fujitsu SPARClite processor
-# OBSOLETE TDEPFILES= sparc-tdep.o sparcl-tdep.o
-# OBSOLETE TM_FILE= tm-sparclite.h
-# OBSOLETE SIM_OBS = remote-sim.o
-# OBSOLETE SIM = ../sim/erc32/libsim.a
diff --git a/gdb/config/sparc/tm-sp64linux.h b/gdb/config/sparc/tm-sp64linux.h
index 17bdd8a..81d9db0 100644
--- a/gdb/config/sparc/tm-sp64linux.h
+++ b/gdb/config/sparc/tm-sp64linux.h
@@ -29,8 +29,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#undef TM_PRINT_INSN_MACH
#define TM_PRINT_INSN_MACH bfd_mach_sparc_v9a
-#define GDB_PTRACE_REGS64
-
#include "config/tm-sysv4.h"
#endif /* TM_SPARC_LIN64_H */
diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h
index a18e203..e8deebc 100644
--- a/gdb/config/sparc/tm-sparc.h
+++ b/gdb/config/sparc/tm-sparc.h
@@ -204,18 +204,13 @@ extern const unsigned char *sparc_breakpoint_from_pc (CORE_ADDR *pc, int *len);
#define CANNOT_STORE_REGISTER(regno) ((regno) == G0_REGNUM)
-#define PRINT_EXTRA_FRAME_INFO(FI) \
+#define DEPRECATED_PRINT_EXTRA_FRAME_INFO(FI) \
sparc_print_extra_frame_info (FI)
extern void sparc_print_extra_frame_info (struct frame_info *);
/* DEPRECATED_INIT_EXTRA_FRAME_INFO needs the PC to detect flat
frames. */
-/* NOTE: cagney/2002-12-08: Add local declaration of
- init_frame_pc_noop() because it isn't possible to include
- "arch-utils.h" here. */
-extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
-#define DEPRECATED_INIT_FRAME_PC(FROMLEAF, PREV) (init_frame_pc_noop (FROMLEAF, PREV))
#define DEPRECATED_INIT_FRAME_PC_FIRST(FROMLEAF, PREV) \
((FROMLEAF) ? DEPRECATED_SAVED_PC_AFTER_CALL ((PREV)->next) : \
(PREV)->next ? DEPRECATED_FRAME_SAVED_PC ((PREV)->next) : read_pc ())
@@ -228,9 +223,7 @@ extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev);
address). Some vendors get it wrong. */
#define FRAME_SAVED_L0 0
-#define FRAME_SAVED_I0 (8 * REGISTER_RAW_SIZE (L0_REGNUM))
-
-#define FRAME_STRUCT_ARGS_ADDRESS(FI) (get_frame_base (FI))
+#define FRAME_SAVED_I0 (8 * DEPRECATED_REGISTER_RAW_SIZE (L0_REGNUM))
/* Things needed for making the inferior call functions. */
/*
diff --git a/gdb/config/sparc/tm-sparclet.h b/gdb/config/sparc/tm-sparclet.h
deleted file mode 100644
index 95bdeea..0000000
--- a/gdb/config/sparc/tm-sparclet.h
+++ /dev/null
@@ -1,158 +0,0 @@
-// OBSOLETE /* Target machine definitions for GDB for an embedded SPARC.
-// OBSOLETE Copyright 1996, 1997, 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 "regcache.h"
-// OBSOLETE
-// OBSOLETE #define TARGET_SPARCLET 1 /* Still needed for non-multi-arch case */
-// OBSOLETE
-// OBSOLETE #include "sparc/tm-sparc.h"
-// OBSOLETE
-// OBSOLETE /* Note: we are not defining GDB_MULTI_ARCH for the sparclet target
-// OBSOLETE at this time, because we have not figured out how to detect the
-// OBSOLETE sparclet target from the bfd structure. */
-// OBSOLETE
-// OBSOLETE /* Sparclet regs, for debugging purposes. */
-// OBSOLETE
-// OBSOLETE enum {
-// OBSOLETE CCSR_REGNUM = 72,
-// OBSOLETE CCPR_REGNUM = 73,
-// OBSOLETE CCCRCR_REGNUM = 74,
-// OBSOLETE CCOR_REGNUM = 75,
-// OBSOLETE CCOBR_REGNUM = 76,
-// OBSOLETE CCIBR_REGNUM = 77,
-// OBSOLETE CCIR_REGNUM = 78
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /* Select the sparclet disassembler. Slightly different instruction set from
-// OBSOLETE the V8 sparc. */
-// OBSOLETE
-// OBSOLETE #undef TM_PRINT_INSN_MACH
-// OBSOLETE #define TM_PRINT_INSN_MACH bfd_mach_sparc_sparclet
-// OBSOLETE
-// OBSOLETE /* overrides of tm-sparc.h */
-// OBSOLETE
-// OBSOLETE #undef TARGET_BYTE_ORDER
-// OBSOLETE
-// OBSOLETE /* Sequence of bytes for breakpoint instruction (ta 1). */
-// OBSOLETE #undef BREAKPOINT
-// OBSOLETE #define BIG_BREAKPOINT {0x91, 0xd0, 0x20, 0x01}
-// OBSOLETE #define LITTLE_BREAKPOINT {0x01, 0x20, 0xd0, 0x91}
-// OBSOLETE
-// OBSOLETE #if !defined (GDB_MULTI_ARCH) || (GDB_MULTI_ARCH == 0)
-// OBSOLETE /*
-// OBSOLETE * The following defines must go away for MULTI_ARCH.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #undef NUM_REGS /* formerly "72" */
-// OBSOLETE /* WIN FP CPU CCP ASR AWR APSR */
-// OBSOLETE #define NUM_REGS (32 + 32 + 8 + 8 + 8/*+ 32 + 1*/)
-// OBSOLETE
-// OBSOLETE #undef REGISTER_BYTES /* formerly "(32*4 + 32*4 + 8*4)" */
-// OBSOLETE #define REGISTER_BYTES (32*4 + 32*4 + 8*4 + 8*4 + 8*4/* + 32*4 + 1*4*/)
-// OBSOLETE
-// OBSOLETE /* Initializer for an array of names of registers.
-// OBSOLETE There should be NUM_REGS strings in this initializer. */
-// OBSOLETE /* Sparclet has no fp! */
-// OBSOLETE /* Compiler maps types for floats by number, so can't
-// OBSOLETE change the numbers here. */
-// OBSOLETE
-// OBSOLETE #undef REGISTER_NAMES
-// OBSOLETE #define REGISTER_NAMES \
-// OBSOLETE { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
-// OBSOLETE "o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7", \
-// OBSOLETE "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \
-// OBSOLETE "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", \
-// OBSOLETE \
-// OBSOLETE "", "", "", "", "", "", "", "", /* no FPU regs */ \
-// OBSOLETE "", "", "", "", "", "", "", "", \
-// OBSOLETE "", "", "", "", "", "", "", "", \
-// OBSOLETE "", "", "", "", "", "", "", "", \
-// OBSOLETE /* no CPSR, FPSR */ \
-// OBSOLETE "y", "psr", "wim", "tbr", "pc", "npc", "", "", \
-// OBSOLETE \
-// OBSOLETE "ccsr", "ccpr", "cccrcr", "ccor", "ccobr", "ccibr", "ccir", "", \
-// OBSOLETE \
-// OBSOLETE /* ASR15 ASR19 (don't display them) */ \
-// OBSOLETE "asr1", "", "asr17", "asr18", "", "asr20", "asr21", "asr22", \
-// OBSOLETE /* \
-// OBSOLETE "awr0", "awr1", "awr2", "awr3", "awr4", "awr5", "awr6", "awr7", \
-// OBSOLETE "awr8", "awr9", "awr10", "awr11", "awr12", "awr13", "awr14", "awr15", \
-// OBSOLETE "awr16", "awr17", "awr18", "awr19", "awr20", "awr21", "awr22", "awr23", \
-// OBSOLETE "awr24", "awr25", "awr26", "awr27", "awr28", "awr29", "awr30", "awr31", \
-// OBSOLETE "apsr", \
-// OBSOLETE */ \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Remove FP dependant code which was defined in tm-sparc.h */
-// OBSOLETE #undef FP0_REGNUM /* Floating point register 0 */
-// OBSOLETE #undef FPS_REGNUM /* Floating point status register */
-// OBSOLETE #undef CPS_REGNUM /* Coprocessor status register */
-// OBSOLETE
-// OBSOLETE /* sparclet register numbers */
-// OBSOLETE #define CCSR_REGNUM 72
-// OBSOLETE
-// OBSOLETE #undef DEPRECATED_EXTRACT_RETURN_VALUE
-// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-// OBSOLETE { \
-// OBSOLETE memcpy ((VALBUF), \
-// OBSOLETE (char *)(REGBUF) + REGISTER_RAW_SIZE (O0_REGNUM) * 8 + \
-// OBSOLETE (TYPE_LENGTH(TYPE) >= REGISTER_RAW_SIZE (O0_REGNUM) \
-// OBSOLETE ? 0 : REGISTER_RAW_SIZE (O0_REGNUM) - TYPE_LENGTH(TYPE)), \
-// OBSOLETE TYPE_LENGTH(TYPE)); \
-// OBSOLETE }
-// OBSOLETE #undef DEPRECATED_STORE_RETURN_VALUE
-// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) \
-// OBSOLETE { \
-// OBSOLETE /* Other values are returned in register %o0. */ \
-// OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), (VALBUF), \
-// OBSOLETE TYPE_LENGTH (TYPE)); \
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #endif /* GDB_MULTI_ARCH */
-// OBSOLETE
-// OBSOLETE extern void sparclet_do_registers_info (int regnum, int all);
-// OBSOLETE #undef DEPRECATED_DO_REGISTERS_INFO
-// OBSOLETE #define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) sparclet_do_registers_info (REGNUM, ALL)
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
-// OBSOLETE comment in <machine/setjmp.h>! */
-// OBSOLETE
-// OBSOLETE #define JB_ELEMENT_SIZE 4 /* Size of each element in jmp_buf */
-// OBSOLETE
-// OBSOLETE #define JB_ONSSTACK 0
-// OBSOLETE #define JB_SIGMASK 1
-// OBSOLETE #define JB_SP 2
-// OBSOLETE #define JB_PC 3
-// OBSOLETE #define JB_NPC 4
-// OBSOLETE #define JB_PSR 5
-// OBSOLETE #define JB_G1 6
-// OBSOLETE #define JB_O0 7
-// OBSOLETE #define JB_WBCNT 8
-// 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 output regs. %o0 (O0_REGNUM) 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 extern int get_longjmp_target (CORE_ADDR *);
-// OBSOLETE
-// OBSOLETE #define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
diff --git a/gdb/config/sparc/tm-sparclite.h b/gdb/config/sparc/tm-sparclite.h
deleted file mode 100644
index bd8996b..0000000
--- a/gdb/config/sparc/tm-sparclite.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// OBSOLETE /* Macro definitions for GDB for a Fujitsu SPARClite.
-// OBSOLETE Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
-// 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 #define TARGET_SPARCLITE 1 /* Still needed for non-multi-arch case */
-// OBSOLETE
-// OBSOLETE #include "sparc/tm-sparc.h"
-// OBSOLETE
-// OBSOLETE /* Note: we are not defining GDB_MULTI_ARCH for the sparclet target
-// OBSOLETE at this time, because we have not figured out how to detect the
-// OBSOLETE sparclet target from the bfd structure. */
-// OBSOLETE
-// OBSOLETE /* Sparclite regs, for debugging purposes */
-// OBSOLETE
-// OBSOLETE enum {
-// OBSOLETE DIA1_REGNUM = 72, /* debug instr address register 1 */
-// OBSOLETE DIA2_REGNUM = 73, /* debug instr address register 2 */
-// OBSOLETE DDA1_REGNUM = 74, /* debug data address register 1 */
-// OBSOLETE DDA2_REGNUM = 75, /* debug data address register 2 */
-// OBSOLETE DDV1_REGNUM = 76, /* debug data value register 1 */
-// OBSOLETE DDV2_REGNUM = 77, /* debug data value register 2 */
-// OBSOLETE DCR_REGNUM = 78, /* debug control register */
-// OBSOLETE DSR_REGNUM = 79 /* debug status regsiter */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /* overrides of tm-sparc.h */
-// OBSOLETE
-// OBSOLETE #undef TARGET_BYTE_ORDER
-// OBSOLETE
-// OBSOLETE /* Select the sparclite disassembler. Slightly different instruction set from
-// OBSOLETE the V8 sparc. */
-// OBSOLETE
-// OBSOLETE #undef TM_PRINT_INSN_MACH
-// OBSOLETE #define TM_PRINT_INSN_MACH bfd_mach_sparc_sparclite
-// OBSOLETE
-// OBSOLETE /* Amount PC must be decremented by after a hardware instruction breakpoint.
-// OBSOLETE This is often the number of bytes in BREAKPOINT
-// OBSOLETE but not always. */
-// OBSOLETE
-// OBSOLETE #define DECR_PC_AFTER_HW_BREAK 4
-// OBSOLETE
-// OBSOLETE #if !defined (GDB_MULTI_ARCH) || (GDB_MULTI_ARCH == 0)
-// OBSOLETE /*
-// OBSOLETE * The following defines must go away for MULTI_ARCH.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #undef NUM_REGS
-// OBSOLETE #define NUM_REGS 80
-// OBSOLETE
-// OBSOLETE #undef REGISTER_BYTES
-// OBSOLETE #define REGISTER_BYTES (32*4+32*4+8*4+8*4)
-// OBSOLETE
-// OBSOLETE #undef REGISTER_NAMES
-// OBSOLETE #define REGISTER_NAMES \
-// OBSOLETE { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
-// OBSOLETE "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7", \
-// OBSOLETE "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \
-// OBSOLETE "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7", \
-// OBSOLETE \
-// OBSOLETE "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \
-// OBSOLETE "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \
-// OBSOLETE "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \
-// OBSOLETE "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \
-// OBSOLETE \
-// OBSOLETE "y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr", \
-// OBSOLETE "dia1", "dia2", "dda1", "dda2", "ddv1", "ddv2", "dcr", "dsr" }
-// OBSOLETE
-// OBSOLETE #define DIA1_REGNUM 72 /* debug instr address register 1 */
-// OBSOLETE #define DIA2_REGNUM 73 /* debug instr address register 2 */
-// OBSOLETE #define DDA1_REGNUM 74 /* debug data address register 1 */
-// OBSOLETE #define DDA2_REGNUM 75 /* debug data address register 2 */
-// OBSOLETE #define DDV1_REGNUM 76 /* debug data value register 1 */
-// OBSOLETE #define DDV2_REGNUM 77 /* debug data value register 2 */
-// OBSOLETE #define DCR_REGNUM 78 /* debug control register */
-// OBSOLETE #define DSR_REGNUM 79 /* debug status regsiter */
-// OBSOLETE
-// OBSOLETE #endif /* GDB_MULTI_ARCH */
-// OBSOLETE
-// OBSOLETE #define TARGET_HW_BREAK_LIMIT 2
-// OBSOLETE #define TARGET_HW_WATCH_LIMIT 2
-// OBSOLETE
-// OBSOLETE /* Enable watchpoint macro's */
-// OBSOLETE
-// OBSOLETE #define TARGET_HAS_HARDWARE_WATCHPOINTS
-// OBSOLETE
-// OBSOLETE #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
-// OBSOLETE sparclite_check_watch_resources (type, cnt, ot)
-// OBSOLETE
-// OBSOLETE /* When a hardware watchpoint fires off the PC will be left at the
-// OBSOLETE instruction which caused the watchpoint. It will be necessary for
-// OBSOLETE GDB to step over the watchpoint. ***
-// OBSOLETE
-// OBSOLETE #define STOPPED_BY_WATCHPOINT(W) \
-// OBSOLETE ((W).kind == TARGET_WAITKIND_STOPPED \
-// OBSOLETE && (W).value.sig == TARGET_SIGNAL_TRAP \
-// OBSOLETE && ((int) read_register (IPSW_REGNUM) & 0x00100000))
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Use these macros for watchpoint insertion/deletion. */
-// OBSOLETE #define target_insert_watchpoint(addr, len, type) sparclite_insert_watchpoint (addr, len, type)
-// OBSOLETE #define target_remove_watchpoint(addr, len, type) sparclite_remove_watchpoint (addr, len, type)
-// OBSOLETE #define target_insert_hw_breakpoint(addr, len) sparclite_insert_hw_breakpoint (addr, len)
-// OBSOLETE #define target_remove_hw_breakpoint(addr, len) sparclite_remove_hw_breakpoint (addr, len)
-// OBSOLETE #define target_stopped_data_address() sparclite_stopped_data_address()
diff --git a/gdb/config/sparc/tm-sparclynx.h b/gdb/config/sparc/tm-sparclynx.h
index 3d19653..e4ea4d5 100644
--- a/gdb/config/sparc/tm-sparclynx.h
+++ b/gdb/config/sparc/tm-sparclynx.h
@@ -32,6 +32,6 @@
#undef FRAME_SAVED_L0
#define FRAME_SAVED_I0 0
-#define FRAME_SAVED_L0 (8 * REGISTER_RAW_SIZE (I0_REGNUM))
+#define FRAME_SAVED_L0 (8 * DEPRECATED_REGISTER_RAW_SIZE (I0_REGNUM))
#endif /* TM_SPARCLYNX_H */
diff --git a/gdb/config/sparc/tm-vxsparc.h b/gdb/config/sparc/tm-vxsparc.h
index f32f70d..95861ec 100644
--- a/gdb/config/sparc/tm-vxsparc.h
+++ b/gdb/config/sparc/tm-vxsparc.h
@@ -22,12 +22,6 @@
#include "sparc/tm-spc-em.h"
#include "config/tm-vxworks.h"
-/* FIXME: These are almost certainly wrong. */
-
-/* Number of registers in a ptrace_getregs call. */
-
-#define VX_NUM_REGS (NUM_REGS)
-
/* Number of registers in a ptrace_getfpregs call. */
/* #define VX_SIZE_FPREGS (don't know how many) */
diff --git a/gdb/config/z8k/tm-z8k.h b/gdb/config/z8k/tm-z8k.h
deleted file mode 100644
index 59b6ecb..0000000
--- a/gdb/config/z8k/tm-z8k.h
+++ /dev/null
@@ -1,292 +0,0 @@
-// OBSOLETE /* Parameters for execution on a z8000 series machine.
-// OBSOLETE
-// OBSOLETE Copyright 1992, 1993, 1994, 1998, 1999, 2000, 2001, 2002 Free
-// OBSOLETE 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 /* NOTE: cagney/2002-11-24: This is a guess. */
-// OBSOLETE #define DEPRECATED_USE_GENERIC_DUMMY_FRAMES 0
-// OBSOLETE #define CALL_DUMMY_LOCATION ON_STACK
-// OBSOLETE #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address)
-// OBSOLETE
-// OBSOLETE #undef TARGET_INT_BIT
-// OBSOLETE #undef TARGET_LONG_BIT
-// OBSOLETE #undef TARGET_SHORT_BIT
-// OBSOLETE #undef TARGET_PTR_BIT
-// OBSOLETE
-// OBSOLETE #define TARGET_SHORT_BIT 16
-// OBSOLETE #define TARGET_INT_BIT 16
-// OBSOLETE #define TARGET_LONG_BIT 32
-// OBSOLETE #define TARGET_PTR_BIT (BIG ? 32: 16)
-// OBSOLETE
-// OBSOLETE /* Offset from address of function to start of its code.
-// OBSOLETE Zero on most machines. */
-// OBSOLETE
-// OBSOLETE #define FUNCTION_START_OFFSET 0
-// OBSOLETE
-// OBSOLETE /* Advance PC across any function entry prologue instructions
-// OBSOLETE to reach some "real" code. */
-// OBSOLETE
-// OBSOLETE #define SKIP_PROLOGUE(ip) (z8k_skip_prologue (ip))
-// OBSOLETE extern CORE_ADDR z8k_skip_prologue (CORE_ADDR ip);
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Immediately after a function call, return the saved pc.
-// OBSOLETE Can't always go through the frames for this because on some machines
-// OBSOLETE the new frame is not set up until the new function executes
-// OBSOLETE some instructions. */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE extern int z8k_saved_pc_after_call (struct frame_info *frame);
-// OBSOLETE #define SAVED_PC_AFTER_CALL(frame) z8k_saved_pc_after_call(frame)
-// OBSOLETE
-// OBSOLETE /* Stack grows downward. */
-// OBSOLETE
-// OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs))
-// OBSOLETE
-// OBSOLETE /* Sequence of bytes for breakpoint instruction. */
-// OBSOLETE
-// OBSOLETE #define BREAKPOINT {0x36,0x00}
-// OBSOLETE
-// OBSOLETE /* If your kernel resets the pc after the trap happens you may need to
-// OBSOLETE define this before including this file. */
-// OBSOLETE
-// OBSOLETE #define DECR_PC_AFTER_BREAK 0
-// OBSOLETE
-// OBSOLETE /* Say how long registers are. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_TYPE unsigned int
-// OBSOLETE
-// OBSOLETE #define NUM_REGS 23 /* 16 registers + 1 ccr + 1 pc + 3 debug
-// OBSOLETE regs + fake fp + fake sp */
-// OBSOLETE #define REGISTER_BYTES (NUM_REGS *4)
-// OBSOLETE
-// OBSOLETE /* Index within `registers' of the first byte of the space for
-// OBSOLETE register N. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_BYTE(N) ((N)*4)
-// OBSOLETE
-// OBSOLETE /* Number of bytes of storage in the actual machine representation
-// OBSOLETE for register N. On the z8k, all but the pc are 2 bytes, but we
-// OBSOLETE keep them all as 4 bytes and trim them on I/O */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE #define REGISTER_RAW_SIZE(N) (((N) < 16)? 2:4)
-// OBSOLETE
-// OBSOLETE /* Number of bytes of storage in the program's representation
-// OBSOLETE for register N. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N)
-// OBSOLETE
-// OBSOLETE /* Largest value REGISTER_RAW_SIZE can have. */
-// OBSOLETE
-// OBSOLETE #define MAX_REGISTER_RAW_SIZE 4
-// OBSOLETE
-// OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have. */
-// OBSOLETE
-// OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 4
-// OBSOLETE
-// OBSOLETE /* Return the GDB type object for the "standard" data type
-// OBSOLETE of data in register N. */
-// OBSOLETE
-// OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \
-// OBSOLETE (REGISTER_VIRTUAL_SIZE(N) == 2? builtin_type_unsigned_int : builtin_type_long)
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_INIT_FRAME_PC(x,y) (init_frame_pc_noop (x, y))
-// OBSOLETE #define INIT_FRAME_PC_FIRST(x,y) (init_frame_pc_noop (x, y))
-// OBSOLETE
-// OBSOLETE #define REGISTER_NAMES \
-// OBSOLETE {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", \
-// OBSOLETE "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15", \
-// OBSOLETE "ccr", "pc", "cycles","insts","time","fp","sp"}
-// OBSOLETE
-// OBSOLETE /* Register numbers of various important registers.
-// OBSOLETE Note that some of these values are "real" register numbers,
-// OBSOLETE and correspond to the general registers of the machine,
-// OBSOLETE and some are "phony" register numbers which are too large
-// OBSOLETE to be actual register numbers as far as the user is concerned
-// OBSOLETE but do serve to get the desired values when passed to read_register. */
-// OBSOLETE
-// OBSOLETE #define CCR_REGNUM 16 /* Contains processor status */
-// OBSOLETE #define PC_REGNUM 17 /* Contains program counter */
-// OBSOLETE #define CYCLES_REGNUM 18
-// OBSOLETE #define INSTS_REGNUM 19
-// OBSOLETE #define TIME_REGNUM 20
-// OBSOLETE #define FP_REGNUM 21 /* Contains fp, whatever memory model */
-// OBSOLETE #define SP_REGNUM 22 /* Conatins sp, whatever memory model */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE #define PTR_SIZE (BIG ? 4: 2)
-// OBSOLETE #define PTR_MASK (BIG ? 0xff00ffff : 0x0000ffff)
-// OBSOLETE
-// OBSOLETE /* Store the address of the place in which to copy the structure the
-// OBSOLETE subroutine will return. This is called from call_function. */
-// OBSOLETE
-// OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// 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. This is assuming that floating point values are returned
-// OBSOLETE as doubles in d0/d1. */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
-// OBSOLETE memcpy(VALBUF, REGBUF + REGISTER_BYTE(2), TYPE_LENGTH(TYPE));
-// OBSOLETE
-// OBSOLETE /* Write into appropriate registers a function return value
-// OBSOLETE of type TYPE, given in virtual format. */
-// OBSOLETE
-// OBSOLETE #define DEPRECATED_STORE_RETURN_VALUE(TYPE,VALBUF) internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// 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 #define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) (*(CORE_ADDR *)(REGBUF))
-// OBSOLETE
-// OBSOLETE /* Describe the pointer in each stack frame to the previous stack frame
-// OBSOLETE (its caller). */
-// OBSOLETE
-// OBSOLETE /* FRAME_CHAIN takes a frame's nominal address and produces the frame's
-// OBSOLETE chain-pointer.
-// OBSOLETE In the case of the Z8000, the frame's nominal address
-// OBSOLETE is the address of a ptr sized byte word containing the calling
-// OBSOLETE frame's address. */
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR z8k_frame_chain (struct frame_info *thisframe);
-// OBSOLETE #define FRAME_CHAIN(thisframe) z8k_frame_chain(thisframe);
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Define other aspects of the stack frame. */
-// OBSOLETE
-// OBSOLETE /* A macro that tells us whether the function invocation represented
-// OBSOLETE by FI does not have a frame on the stack associated with it. If it
-// OBSOLETE does not, FRAMELESS is set to 1, else 0. */
-// OBSOLETE #define FRAMELESS_FUNCTION_INVOCATION(FI) \
-// OBSOLETE (frameless_look_for_prologue (FI))
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR z8k_frame_saved_pc (struct frame_info *frame);
-// OBSOLETE #define FRAME_SAVED_PC(FRAME) z8k_frame_saved_pc(FRAME)
-// OBSOLETE
-// OBSOLETE #define FRAME_ARGS_ADDRESS(fi) ((fi)->frame)
-// OBSOLETE
-// OBSOLETE #define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame)
-// OBSOLETE
-// OBSOLETE /* Set VAL to the number of args passed to frame described by FI.
-// OBSOLETE Can set VAL to -1, meaning no way to tell. */
-// OBSOLETE
-// OBSOLETE /* We can't tell how many args there are
-// OBSOLETE now that the C compiler delays popping them. */
-// OBSOLETE #if !defined (FRAME_NUM_ARGS)
-// OBSOLETE #define FRAME_NUM_ARGS(fi) (-1)
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* Return number of bytes at start of arglist that are not really args. */
-// OBSOLETE
-// OBSOLETE #define FRAME_ARGS_SKIP 8
-// OBSOLETE
-// OBSOLETE struct frame_info;
-// OBSOLETE extern void z8k_frame_init_saved_regs (struct frame_info *);
-// OBSOLETE #define FRAME_INIT_SAVED_REGS(fi) z8k_frame_init_saved_regs (fi)
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Things needed for making the inferior call functions.
-// OBSOLETE It seems like every m68k based machine has almost identical definitions
-// OBSOLETE in the individual machine's configuration files. Most other cpu types
-// OBSOLETE (mips, i386, etc) have routines in their *-tdep.c files to handle this
-// OBSOLETE for most configurations. The m68k family should be able to do this as
-// OBSOLETE well. These macros can still be overridden when necessary. */
-// OBSOLETE
-// OBSOLETE /* The CALL_DUMMY macro is the sequence of instructions, as disassembled
-// OBSOLETE by gdb itself:
-// OBSOLETE
-// OBSOLETE fmovemx fp0-fp7,sp@- 0xf227 0xe0ff
-// OBSOLETE moveml d0-a5,sp@- 0x48e7 0xfffc
-// OBSOLETE clrw sp@- 0x4267
-// OBSOLETE movew ccr,sp@- 0x42e7
-// OBSOLETE
-// OBSOLETE /..* The arguments are pushed at this point by GDB;
-// OBSOLETE no code is needed in the dummy for this.
-// OBSOLETE The CALL_DUMMY_START_OFFSET gives the position of
-// OBSOLETE the following jsr instruction. *../
-// OBSOLETE
-// OBSOLETE jsr @#0x32323232 0x4eb9 0x3232 0x3232
-// OBSOLETE addal #0x69696969,sp 0xdffc 0x6969 0x6969
-// OBSOLETE trap #<your BPT_VECTOR number here> 0x4e4?
-// OBSOLETE nop 0x4e71
-// OBSOLETE
-// OBSOLETE Note this is CALL_DUMMY_LENGTH bytes (28 for the above example).
-// OBSOLETE We actually start executing at the jsr, since the pushing of the
-// OBSOLETE registers is done by PUSH_DUMMY_FRAME. If this were real code,
-// OBSOLETE the arguments for the function called by the jsr would be pushed
-// OBSOLETE between the moveml and the jsr, and we could allow it to execute through.
-// OBSOLETE But the arguments have to be pushed by GDB after the PUSH_DUMMY_FRAME is
-// OBSOLETE done, and we cannot allow the moveml to push the registers again lest
-// OBSOLETE they be taken for the arguments. */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE #define CALL_DUMMY { 0 }
-// OBSOLETE #define CALL_DUMMY_LENGTH 24 /* Size of CALL_DUMMY */
-// OBSOLETE #define CALL_DUMMY_START_OFFSET 8 /* Offset to jsr instruction */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Insert the specified number of args and function address
-// OBSOLETE into a call sequence of the above form stored at DUMMYNAME.
-// OBSOLETE We use the BFD routines to store a big-endian value of known size. */
-// OBSOLETE
-// OBSOLETE #define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
-// OBSOLETE { bfd_putb32 (fun, (char *) dummyname + CALL_DUMMY_START_OFFSET + 2); \
-// OBSOLETE bfd_putb32 (nargs*4, (char *) dummyname + CALL_DUMMY_START_OFFSET + 8); }
-// OBSOLETE
-// OBSOLETE /* Push an empty stack frame, to record the current PC, etc. */
-// OBSOLETE
-// OBSOLETE #define PUSH_DUMMY_FRAME { z8k_push_dummy_frame (); }
-// OBSOLETE
-// OBSOLETE extern void z8k_push_dummy_frame (void);
-// OBSOLETE
-// OBSOLETE extern void z8k_pop_frame (void);
-// OBSOLETE
-// OBSOLETE /* Discard from the stack the innermost frame, restoring all registers. */
-// OBSOLETE
-// OBSOLETE #define POP_FRAME { z8k_pop_frame (); }
-// OBSOLETE
-// OBSOLETE /* Offset from SP to first arg on stack at first instruction of a function */
-// OBSOLETE
-// OBSOLETE #define SP_ARG0 (1 * 4)
-// OBSOLETE
-// OBSOLETE extern CORE_ADDR z8k_addr_bits_remove (CORE_ADDR);
-// OBSOLETE #define ADDR_BITS_REMOVE(addr) z8k_addr_bits_remove (addr)
-// OBSOLETE int sim_z8001_mode;
-// OBSOLETE #define BIG (sim_z8001_mode)
-// OBSOLETE
-// OBSOLETE #define read_memory_short(x) (read_memory_integer(x,2) & 0xffff)
-// OBSOLETE
-// OBSOLETE #define NO_STD_REGS
-// OBSOLETE
-// OBSOLETE extern void z8k_do_registers_info (int regnum, int all);
-// OBSOLETE #define DEPRECATED_DO_REGISTERS_INFO(REGNUM,ALL) \
-// OBSOLETE z8k_do_registers_info (REGNUM, ALL)
-// OBSOLETE
-// OBSOLETE extern void z8k_set_pointer_size (int newsize);
-// OBSOLETE #define INIT_EXTRA_SYMTAB_INFO \
-// OBSOLETE z8k_set_pointer_size(objfile->obfd->arch_info->bits_per_address);
-// OBSOLETE
-// OBSOLETE #define REGISTER_SIZE 4
diff --git a/gdb/config/z8k/z8k.mt b/gdb/config/z8k/z8k.mt
deleted file mode 100644
index 3eb6c7b..0000000
--- a/gdb/config/z8k/z8k.mt
+++ /dev/null
@@ -1,6 +0,0 @@
-# OBSOLETE # Target: Z8000 with simulator
-# OBSOLETE TDEPFILES= z8k-tdep.o
-# OBSOLETE TM_FILE= tm-z8k.h
-# OBSOLETE
-# OBSOLETE SIM_OBS = remote-sim.o
-# OBSOLETE SIM = ../sim/z8k/libsim.a
diff --git a/gdb/configure.host b/gdb/configure.host
index 1830fb8..1c0f9c7 100644
--- a/gdb/configure.host
+++ b/gdb/configure.host
@@ -41,18 +41,13 @@ arm*-*-linux*) gdb_host=linux ;;
arm*-*-netbsdelf*) gdb_host=nbsdelf ;;
arm*-*-netbsd*) gdb_host=nbsdaout ;;
-# OBSOLETE hppa*-*-bsd*) gdb_host=hppabsd ;;
hppa*-*-hiux*) gdb_host=hppahpux ;;
hppa*-*-hpux10.20) gdb_host=hpux1020 ;;
hppa*64*-*-hpux11*) gdb_host=hpux11w ;;
hppa*-*-hpux11*) gdb_host=hpux11 ;;
hppa*-*-hpux*) gdb_host=hppahpux ;;
-# OBSOLETE hppa*-*-osf*) gdb_host=hppaosf ;;
i[34567]86-ncr-*) gdb_host=ncr3000 ;;
-# OBSOLETE i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
-# OBSOLETE i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
-# OBSOLETE i[3456]86-sequent-sysv*) gdb_host=ptx ;;
i[34567]86-*-bsd*) gdb_host=i386bsd ;;
i[34567]86-*-dgux*) gdb_host=i386v4 ;;
i[34567]86-*-freebsd*) gdb_host=fbsd ;;
@@ -96,7 +91,6 @@ m68*-sun-sunos3*) gdb_host=sun3os3 ;;
m68*-sun-sunos4*) gdb_host=sun3os4 ;;
m68*-sun-*) gdb_host=sun3os4 ;;
-# OBSOLETE mips-dec-mach3*) gdb_host=mipsm3 ;;
mips-dec-*) gdb_host=decstation ;;
mips-little-*) gdb_host=littlemips ;;
mips-sgi-irix5*) gdb_host=irix5 ;;
@@ -151,5 +145,6 @@ vax-*-ultrix*) gdb_host=vaxult ;;
x86_64-*-linux*) gdb_host=x86-64linux ;;
x86_64-*-freebsd*) gdb_host=fbsd64 ;;
+x86_64-*-netbsd*) gdb_host=nbsd64 ;;
esac
diff --git a/gdb/configure.tgt b/gdb/configure.tgt
index e18d46c..fdaf9ec 100644
--- a/gdb/configure.tgt
+++ b/gdb/configure.tgt
@@ -67,22 +67,15 @@ cris*) gdb_target=cris ;;
d10v-*-*) gdb_target=d10v ;;
h8300-*-*) gdb_target=h8300 ;;
-# OBSOLETE h8500-*-*) gdb_target=h8500 ;;
frv-*-*) gdb_target=frv ;;
-# OBSOLETE hppa*-*-bsd*) gdb_target=hppabsd ;;
-# OBSOLETE hppa*-*-pro*) gdb_target=hppapro ;;
hppa*64*-*-hpux11*) gdb_target=hppa64 ;;
hppa*-*-hpux*) gdb_target=hppahpux ;;
hppa*-*-hiux*) gdb_target=hppahpux ;;
-# OBSOLETE hppa*-*-osf*) gdb_target=hppaosf ;;
hppa*-*-*) gdb_target=hppa ;;
-# OBSOLETE i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
-# OBSOLETE i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
-# OBSOLETE i[3456]86-sequent-sysv*) gdb_target=ptx ;;
i[34567]86-ncr-*) gdb_target=ncr3000 ;;
i[34567]86-*-bsd*) gdb_target=i386bsd ;;
i[34567]86-*-netbsd*) gdb_target=nbsd ;;
@@ -154,13 +147,11 @@ mips*-*-linux*) gdb_target=linux
build_gdbserver=yes
;;
mips*-*-netbsd*) gdb_target=nbsd ;;
-# OBSOLETE mips*-*-mach3*) gdb_target=mipsm3 ;;
mips*-*-sysv4*) gdb_target=mipsv4 ;;
mips*-*-vxworks*) gdb_target=vxmips ;;
mips64*-*-*) gdb_target=embed64 ;;
mips*-*-*) gdb_target=embed ;;
-# OBSOLETE mn10200-*-*) gdb_target=mn10200 ;;
mn10300-*-*) gdb_target=mn10300 ;;
none-*-*) gdb_target=none ;;
@@ -213,9 +204,6 @@ sparc-*-sunos4*) gdb_target=sun4os4 ;;
sparc-*-sunos5*) gdb_target=sun4sol2 ;;
sparc-*-vxworks*) gdb_target=vxsparc ;;
sparc-*-*) gdb_target=sun4os4 ;;
-# OBSOLETE sparclet-*-*) gdb_target=sparclet;;
-# OBSOLETE sparclite-*-*) gdb_target=sparclite ;;
-# OBSOLETE sparc86x-*-*) gdb_target=sparclite ;;
# It's not clear what the right solution for "v8plus" systems is yet.
# For now, stick with sparc-sun-solaris2 since that's what config.guess
# should return. Work is still needed to get gdb to print the 64 bit
@@ -241,8 +229,7 @@ v850*-*-*) gdb_target=v850
x86_64-*-linux*) gdb_target=x86-64linux
build_gdbserver=yes
;;
-
-# OBSOLETE z8k-*-coff*) gdb_target=z8k ;;
+x86_64-*-netbsd*) gdb_target=nbsd64 ;;
esac
diff --git a/gdb/core-sol2.c b/gdb/core-sol2.c
index a365233..456eebc 100644
--- a/gdb/core-sol2.c
+++ b/gdb/core-sol2.c
@@ -98,7 +98,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
/* The globals and output registers. */
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (G1_REGNUM)],
- &gregs->r_g1, 15 * REGISTER_RAW_SIZE (G1_REGNUM));
+ &gregs->r_g1, 15 * DEPRECATED_REGISTER_RAW_SIZE (G1_REGNUM));
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)]
= gregs->r_ps;
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)]
@@ -119,7 +119,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
sp = *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (SP_REGNUM)];
if (0 != target_read_memory (sp,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
- 16 * REGISTER_RAW_SIZE (L0_REGNUM)))
+ 16 * DEPRECATED_REGISTER_RAW_SIZE (L0_REGNUM)))
{
warning ("couldn't read input and local registers from core file\n");
}
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 016140f..8fc3e66 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -1,7 +1,7 @@
/* Core dump and executable file functions below target vector, for GDB.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -21,6 +21,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "arch-utils.h"
#include "gdb_string.h"
#include <errno.h>
#include <signal.h>
@@ -37,9 +38,13 @@
#include "gdbcore.h"
#include "gdbthread.h"
#include "regcache.h"
+#include "regset.h"
#include "symfile.h"
+#include "exec.h"
#include <readline/readline.h>
+#include "gdb_assert.h"
+
#ifndef O_BINARY
#define O_BINARY 0
#endif
@@ -55,6 +60,11 @@ static struct core_fns *core_file_fns = NULL;
static struct core_fns *core_vec = NULL;
+/* FIXME: kettenis/20031023: Eventually this variable should
+ disappear. */
+
+struct gdbarch *core_gdbarch = NULL;
+
static void core_files_info (struct target_ops *);
#ifdef SOLIB_ADD
@@ -124,6 +134,10 @@ sniff_core_bfd (bfd *abfd)
struct core_fns *yummy = NULL;
int matches = 0;;
+ /* Don't sniff if we have support for register sets in CORE_GDBARCH. */
+ if (core_gdbarch && gdbarch_regset_from_core_section_p (core_gdbarch))
+ return NULL;
+
for (cf = core_file_fns; cf != NULL; cf = cf->next)
{
if (cf->core_sniffer (cf, abfd))
@@ -179,7 +193,6 @@ gdb_check_format (bfd *abfd)
/* Discard all vestiges of any previous core file and mark data and stack
spaces as empty. */
-/* ARGSUSED */
static void
core_close (int quitting)
{
@@ -209,6 +222,7 @@ core_close (int quitting)
}
}
core_vec = NULL;
+ core_gdbarch = NULL;
}
static void
@@ -311,6 +325,14 @@ core_open (char *filename, int from_tty)
core_bfd = temp_bfd;
old_chain = make_cleanup (core_close_cleanup, 0 /*ignore*/);
+ /* FIXME: kettenis/20031023: This is very dangerous. The
+ CORE_GDBARCH that results from this call may very well be
+ different from CURRENT_GDBARCH. However, its methods may only
+ work if it is selected as the current architecture, because they
+ rely on swapped data (see gdbarch.c). We should get rid of that
+ swapped data. */
+ core_gdbarch = gdbarch_from_bfd (core_bfd);
+
/* Find a suitable core file handler to munch on core_bfd */
core_vec = sniff_core_bfd (core_bfd);
@@ -410,7 +432,7 @@ get_core_register_section (char *name,
int required)
{
char section_name[100];
- sec_ptr section;
+ struct bfd_section *section;
bfd_size_type size;
char *contents;
@@ -437,6 +459,24 @@ get_core_register_section (char *name,
return;
}
+ if (core_gdbarch && gdbarch_regset_from_core_section_p (core_gdbarch))
+ {
+ const struct regset *regset;
+
+ regset = gdbarch_regset_from_core_section (core_gdbarch, name, size);
+ if (regset == NULL)
+ {
+ if (required)
+ warning ("Couldn't recognize %s registers in core file.\n",
+ human_name);
+ return;
+ }
+
+ regset->supply_regset (regset, current_regcache, -1, contents, size);
+ return;
+ }
+
+ gdb_assert (core_vec);
core_vec->core_read_registers (contents, size, which,
((CORE_ADDR)
bfd_section_vma (core_bfd, section)));
@@ -449,14 +489,13 @@ get_core_register_section (char *name,
/* We just get all the registers, so we don't use regno. */
-/* ARGSUSED */
static void
get_core_registers (int regno)
{
int status;
- if (core_vec == NULL
- || core_vec->core_read_registers == NULL)
+ if (!(core_gdbarch && gdbarch_regset_from_core_section_p (core_gdbarch))
+ && (core_vec == NULL || core_vec->core_read_registers == NULL))
{
fprintf_filtered (gdb_stderr,
"Can't fetch registers from this type of core file\n");
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 89f54cf..6c5483b 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -501,10 +501,10 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi,
/* We only want to know the end of the prologue when fi->saved_regs == 0.
When the saved registers are allocated full information is required. */
- if (get_frame_saved_regs (fi))
+ if (deprecated_get_frame_saved_regs (fi))
{
for (regno = 0; regno < NUM_REGS; regno++)
- get_frame_saved_regs (fi)[regno] = 0;
+ deprecated_get_frame_saved_regs (fi)[regno] = 0;
}
/* Find the prologue instructions. */
@@ -676,34 +676,34 @@ cris_examine (CORE_ADDR ip, CORE_ADDR limit, struct frame_info *fi,
/* We only want to know the end of the prologue when
fi->saved_regs == 0. */
- if (!get_frame_saved_regs (fi))
+ if (!deprecated_get_frame_saved_regs (fi))
return ip;
if (have_fp)
{
- get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM] = get_frame_base (fi);
+ deprecated_get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM] = get_frame_base (fi);
/* Calculate the addresses. */
for (regno = regsave; regno >= 0; regno--)
{
- get_frame_saved_regs (fi)[regno] = get_frame_base (fi) - val;
+ deprecated_get_frame_saved_regs (fi)[regno] = get_frame_base (fi) - val;
val -= 4;
}
if (get_frame_extra_info (fi)->leaf_function)
{
/* Set the register SP to contain the stack pointer of
the caller. */
- get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) + 4;
+ deprecated_get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) + 4;
}
else
{
/* Set the register SP to contain the stack pointer of
the caller. */
- get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) + 8;
+ deprecated_get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) + 8;
/* Set the register SRP to contain the return address of
the caller. */
- get_frame_saved_regs (fi)[SRP_REGNUM] = get_frame_base (fi) + 4;
+ deprecated_get_frame_saved_regs (fi)[SRP_REGNUM] = get_frame_base (fi) + 4;
}
}
return ip;
@@ -1151,7 +1151,7 @@ cris_frame_init_saved_regs (struct frame_info *fi)
int frameless_p = 0;
/* Has this frame's registers already been initialized? */
- if (get_frame_saved_regs (fi))
+ if (deprecated_get_frame_saved_regs (fi))
return;
frame_saved_regs_zalloc (fi);
@@ -1161,7 +1161,7 @@ cris_frame_init_saved_regs (struct frame_info *fi)
/* I don't see this ever happening, considering the context in which
cris_frame_init_saved_regs is called (always when we're not in
a dummy frame). */
- memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
+ memcpy (deprecated_get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
}
else
{
@@ -1219,12 +1219,12 @@ cris_init_extra_frame_info (int fromleaf, struct frame_info *fi)
/* Check fromleaf/frameless_function_invocation. (FIXME) */
- if (get_frame_saved_regs (fi)[SRP_REGNUM] != 0)
+ if (deprecated_get_frame_saved_regs (fi)[SRP_REGNUM] != 0)
{
/* SRP was saved on the stack; non-leaf function. */
get_frame_extra_info (fi)->return_pc =
- read_memory_integer (get_frame_saved_regs (fi)[SRP_REGNUM],
- REGISTER_RAW_SIZE (SRP_REGNUM));
+ read_memory_integer (deprecated_get_frame_saved_regs (fi)[SRP_REGNUM],
+ DEPRECATED_REGISTER_RAW_SIZE (SRP_REGNUM));
}
else
{
@@ -1527,30 +1527,30 @@ cris_pop_frame (void)
after SP was saved. */
for (regno = 0; regno < DEPRECATED_FP_REGNUM; regno++)
{
- if (get_frame_saved_regs (fi)[regno])
+ if (deprecated_get_frame_saved_regs (fi)[regno])
{
write_register (regno,
- read_memory_integer (get_frame_saved_regs (fi)[regno], 4));
+ read_memory_integer (deprecated_get_frame_saved_regs (fi)[regno], 4));
}
}
- if (get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM])
+ if (deprecated_get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM])
{
/* Pop the frame pointer (R8). It was pushed before SP
was saved. */
write_register (DEPRECATED_FP_REGNUM,
- read_memory_integer (get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM], 4));
+ read_memory_integer (deprecated_get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM], 4));
stack_offset += 4;
/* Not a leaf function. */
- if (get_frame_saved_regs (fi)[SRP_REGNUM])
+ if (deprecated_get_frame_saved_regs (fi)[SRP_REGNUM])
{
/* SRP was pushed before SP was saved. */
stack_offset += 4;
}
/* Restore the SP and adjust for R8 and (possibly) SRP. */
- write_register (SP_REGNUM, get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM] + stack_offset);
+ write_register (SP_REGNUM, deprecated_get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM] + stack_offset);
}
else
{
@@ -3916,7 +3916,7 @@ cris_version_update (char *ignore_args, int from_tty,
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. Unfortunatly, for ``show'' commands cloned from
+ 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?). */
@@ -3943,7 +3943,7 @@ cris_mode_update (char *ignore_args, int from_tty,
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. Unfortunatly, for ``show'' commands cloned from
+ 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?). */
@@ -3970,7 +3970,7 @@ cris_abi_update (char *ignore_args, int from_tty,
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. Unfortunatly, for ``show'' commands cloned from
+ 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?). */
@@ -4126,7 +4126,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* NOTE: cagney/2002-12-06: This can be deleted when this arch is
ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
+ set_gdbarch_deprecated_init_frame_pc (gdbarch, deprecated_init_frame_pc_default);
tdep->cris_version = cris_version;
tdep->cris_mode = cris_mode;
@@ -4184,8 +4184,9 @@ 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.
- REGISTER_RAW_SIZE is the real way to know how big a register is. */
+ /* 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. */
set_gdbarch_deprecated_register_size (gdbarch, 4);
/* NEW */
@@ -4239,13 +4240,13 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* The length of the registers in the actual machine representation. */
set_gdbarch_deprecated_register_raw_size (gdbarch, cris_register_size);
- /* The largest value REGISTER_RAW_SIZE can have. */
+ /* 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 REGISTER_VIRTUAL_SIZE can have. */
+ /* 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);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 129f563..6ad5ed5 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -1,4 +1,4 @@
-/* Target-dependent code for Mitsubishi D10V, for GDB.
+/* Target-dependent code for Renesas D10V, for GDB.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software
Foundation, Inc.
@@ -57,7 +57,7 @@ struct gdbarch_tdep
};
/* These are the addresses the D10V-EVA board maps data and
- instruction memory to. */
+ instruction memory to. */
enum memspace {
DMEM_START = 0x2000000,
@@ -65,7 +65,7 @@ enum memspace {
STACK_START = 0x200bffe
};
-/* d10v register names. */
+/* d10v register names. */
enum
{
@@ -80,10 +80,9 @@ enum
NR_A_REGS = 2,
TS2_NUM_REGS = 37,
TS3_NUM_REGS = 42,
- /* d10v calling convention. */
+ /* d10v calling convention. */
ARG1_REGNUM = R0_REGNUM,
- ARGN_REGNUM = R3_REGNUM,
- RET1_REGNUM = R0_REGNUM,
+ ARGN_REGNUM = R3_REGNUM
};
static int
@@ -114,44 +113,6 @@ d10v_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
return sp & ~3;
}
-/* Should we use EXTRACT_STRUCT_VALUE_ADDRESS instead of
- EXTRACT_RETURN_VALUE? GCC_P is true if compiled with gcc
- and TYPE is the type (which is known to be struct, union or array).
-
- The d10v returns anything less than 8 bytes in size in
- registers. */
-
-static int
-d10v_use_struct_convention (int gcc_p, struct type *type)
-{
- long alignment;
- int i;
- /* The d10v only passes a struct in a register when that structure
- has an alignment that matches the size of a register. */
- /* If the structure doesn't fit in 4 registers, put it on the
- stack. */
- if (TYPE_LENGTH (type) > 8)
- return 1;
- /* If the struct contains only one field, don't put it on the stack
- - gcc can fit it in one or more registers. */
- if (TYPE_NFIELDS (type) == 1)
- return 0;
- alignment = TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0));
- for (i = 1; i < TYPE_NFIELDS (type); i++)
- {
- /* If the alignment changes, just assume it goes on the
- stack. */
- if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, i)) != alignment)
- return 1;
- }
- /* If the alignment is suitable for the d10v's 16 bit registers,
- don't put it on the stack. */
- if (alignment == 2 || alignment == 4)
- return 0;
- return 1;
-}
-
-
static const unsigned char *
d10v_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
@@ -162,7 +123,7 @@ d10v_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
}
/* Map the REG_NR onto an ascii name. Return NULL or an empty string
- when the reg_nr isn't valid. */
+ when the reg_nr isn't valid. */
enum ts2_regnums
{
@@ -279,7 +240,7 @@ d10v_ts3_imap_register (void *regcache, int reg_nr)
/* MAP GDB's internal register numbering (determined by the layout
from the DEPRECATED_REGISTER_BYTE array) onto the simulator's
- register numbering. */
+ register numbering. */
static int
d10v_ts2_register_sim_regno (int nr)
@@ -353,7 +314,7 @@ static CORE_ADDR
d10v_make_iaddr (CORE_ADDR x)
{
if (d10v_iaddr_p (x))
- return x; /* Idempotency -- x is already in the IMEM space. */
+ return x; /* Idempotency -- x is already in the IMEM space. */
else
return (((x) << 2) | IMEM_START);
}
@@ -413,54 +374,88 @@ d10v_integer_to_address (struct type *type, void *buf)
return val;
}
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format.
-
- Things always get returned in RET1_REGNUM, RET2_REGNUM, ... */
+/* Handle the d10v's return_value convention. */
-static void
-d10v_store_return_value (struct type *type, struct regcache *regcache,
- const void *valbuf)
+static enum return_value_convention
+d10v_return_value (struct gdbarch *gdbarch, struct type *valtype,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
{
- /* Only char return values need to be shifted right within the first
- regnum. */
- if (TYPE_LENGTH (type) == 1
- && TYPE_CODE (type) == TYPE_CODE_INT)
+ if (TYPE_LENGTH (valtype) > 8)
+ /* Anything larger than 8 bytes (4 registers) goes on the stack. */
+ return RETURN_VALUE_STRUCT_CONVENTION;
+ if (TYPE_LENGTH (valtype) == 5
+ || TYPE_LENGTH (valtype) == 6)
+ /* Anything 5 or 6 bytes in size goes in memory. Contents don't
+ appear to matter. Note that 7 and 8 byte objects do end up in
+ registers! */
+ return RETURN_VALUE_STRUCT_CONVENTION;
+ if (TYPE_LENGTH (valtype) == 1)
{
- bfd_byte tmp[2];
- tmp[1] = *(bfd_byte *)valbuf;
- regcache_cooked_write (regcache, RET1_REGNUM, tmp);
+ /* All single byte values go in a register stored right-aligned.
+ Note: 2 byte integer values are handled further down. */
+ if (readbuf)
+ {
+ /* Since TYPE is smaller than the register, there isn't a
+ sign extension problem. Let the extraction truncate the
+ register value. */
+ ULONGEST regval;
+ regcache_cooked_read_unsigned (regcache, R0_REGNUM,
+ &regval);
+ store_unsigned_integer (readbuf, TYPE_LENGTH (valtype), regval);
+
+ }
+ if (writebuf)
+ {
+ ULONGEST regval;
+ if (TYPE_CODE (valtype) == TYPE_CODE_INT)
+ /* Some sort of integer value stored in R0. Use
+ unpack_long since that should handle any required sign
+ extension. */
+ regval = unpack_long (valtype, writebuf);
+ else
+ /* Some other type. Don't sign-extend the value when
+ storing it in the register. */
+ regval = extract_unsigned_integer (writebuf, 1);
+ regcache_cooked_write_unsigned (regcache, R0_REGNUM, regval);
+ }
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
- else
+ if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
+ || TYPE_CODE (valtype) == TYPE_CODE_UNION)
+ && TYPE_NFIELDS (valtype) > 1
+ && TYPE_FIELD_BITPOS (valtype, 1) == 8)
+ /* If a composite is 8 bit aligned (determined by looking at the
+ start address of the second field), put it in memory. */
+ return RETURN_VALUE_STRUCT_CONVENTION;
+ /* Assume it is in registers. */
+ if (writebuf || readbuf)
{
int reg;
- /* A structure is never more than 8 bytes long. See
- use_struct_convention(). */
- gdb_assert (TYPE_LENGTH (type) <= 8);
- /* Write out most registers, stop loop before trying to write
- out any dangling byte at the end of the buffer. */
- for (reg = 0; (reg * 2) + 1 < TYPE_LENGTH (type); reg++)
+ /* Per above, the value is never more than 8 bytes long. */
+ gdb_assert (TYPE_LENGTH (valtype) <= 8);
+ /* Xfer 2 bytes at a time. */
+ for (reg = 0; (reg * 2) + 1 < TYPE_LENGTH (valtype); reg++)
{
- regcache_cooked_write (regcache, RET1_REGNUM + reg,
- (bfd_byte *) valbuf + reg * 2);
+ if (readbuf)
+ regcache_cooked_read (regcache, R0_REGNUM + reg,
+ (bfd_byte *) readbuf + reg * 2);
+ if (writebuf)
+ regcache_cooked_write (regcache, R0_REGNUM + reg,
+ (bfd_byte *) writebuf + reg * 2);
+ }
+ /* Any trailing byte ends up _left_ aligned. */
+ if ((reg * 2) < TYPE_LENGTH (valtype))
+ {
+ if (readbuf)
+ regcache_cooked_read_part (regcache, R0_REGNUM + reg,
+ 0, 1, (bfd_byte *) readbuf + reg * 2);
+ if (writebuf)
+ regcache_cooked_write_part (regcache, R0_REGNUM + reg,
+ 0, 1, (bfd_byte *) writebuf + reg * 2);
}
- /* Write out any dangling byte at the end of the buffer. */
- if ((reg * 2) + 1 == TYPE_LENGTH (type))
- regcache_cooked_write_part (regcache, reg, 0, 1,
- (bfd_byte *) valbuf + reg * 2);
}
-}
-
-/* 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
-d10v_extract_struct_value_address (struct regcache *regcache)
-{
- ULONGEST addr;
- regcache_cooked_read_unsigned (regcache, ARG1_REGNUM, &addr);
- return (addr | DMEM_START);
+ return RETURN_VALUE_REGISTER_CONVENTION;
}
static int
@@ -505,8 +500,8 @@ d10v_skip_prologue (CORE_ADDR pc)
CORE_ADDR func_addr, func_end;
struct symtab_and_line sal;
- /* If we have line debugging information, then the end of the */
- /* prologue should the first assembly instruction of the first source line */
+ /* If we have line debugging information, then the end of the prologue
+ should be the first assembly instruction of the first source line. */
if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
{
sal = find_pc_line (func_addr, 0);
@@ -515,7 +510,7 @@ d10v_skip_prologue (CORE_ADDR pc)
}
if (target_read_memory (pc, (char *) &op, 4))
- return pc; /* Can't access it -- assume no prologue. */
+ return pc; /* Can't access it -- assume no prologue. */
while (1)
{
@@ -545,8 +540,9 @@ d10v_skip_prologue (CORE_ADDR pc)
{
if (!check_prologue (op2))
{
- /* if the previous opcode was really part of the prologue */
- /* and not just a NOP, then we want to break after both instructions */
+ /* If the previous opcode was really part of the
+ prologue and not just a NOP, then we want to
+ break after both instructions. */
if (op1 != 0x5E00)
pc += 4;
break;
@@ -657,7 +653,7 @@ prologue_find_regs (struct d10v_unwind_cache *info, unsigned short op,
the saved registers of frame described by FRAME_INFO. This
includes special registers such as pc and fp saved in special ways
in the stack frame. sp is even more special: the address we return
- for it IS the sp for the next frame. */
+ for it IS the sp for the next frame. */
static struct d10v_unwind_cache *
d10v_frame_unwind_cache (struct frame_info *next_frame,
@@ -795,11 +791,11 @@ d10v_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
{
ULONGEST pc, psw, rpt_s, rpt_e, rpt_c;
- frame_read_unsigned_register (frame, D10V_PC_REGNUM, &pc);
- frame_read_unsigned_register (frame, PSW_REGNUM, &psw);
- frame_read_unsigned_register (frame, frame_map_name_to_regnum (frame, "rpt_s", -1), &rpt_s);
- frame_read_unsigned_register (frame, frame_map_name_to_regnum (frame, "rpt_e", -1), &rpt_e);
- frame_read_unsigned_register (frame, frame_map_name_to_regnum (frame, "rpt_c", -1), &rpt_c);
+ pc = get_frame_register_unsigned (frame, D10V_PC_REGNUM);
+ psw = get_frame_register_unsigned (frame, PSW_REGNUM);
+ rpt_s = get_frame_register_unsigned (frame, frame_map_name_to_regnum (frame, "rpt_s", -1));
+ rpt_e = get_frame_register_unsigned (frame, frame_map_name_to_regnum (frame, "rpt_e", -1));
+ rpt_c = get_frame_register_unsigned (frame, frame_map_name_to_regnum (frame, "rpt_c", -1));
fprintf_filtered (file, "PC=%04lx (0x%lx) PSW=%04lx RPT_S=%04lx RPT_E=%04lx RPT_C=%04lx\n",
(long) pc, (long) d10v_make_iaddr (pc), (long) psw,
(long) rpt_s, (long) rpt_e, (long) rpt_c);
@@ -814,7 +810,7 @@ d10v_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
for (r = group; r < group + 8; r++)
{
ULONGEST tmp;
- frame_read_unsigned_register (frame, r, &tmp);
+ tmp = get_frame_register_unsigned (frame, r);
fprintf_filtered (file, " %04lx", (long) tmp);
}
fprintf_filtered (file, "\n");
@@ -856,7 +852,7 @@ d10v_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
{
int i;
fprintf_filtered (file, " ");
- frame_read_register (frame, a, num);
+ get_frame_register (frame, a, num);
for (i = 0; i < register_size (gdbarch, a); i++)
{
fprintf_filtered (file, "%02x", (num[i] & 0xff));
@@ -908,7 +904,7 @@ d10v_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
}
/* When arguments must be pushed onto the stack, they go on in reverse
- order. The below implements a FILO (stack) to do this. */
+ order. The below implements a FILO (stack) to do this. */
struct stack_item
{
@@ -965,8 +961,8 @@ d10v_push_dummy_code (struct gdbarch *gdbarch,
static CORE_ADDR
d10v_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
struct regcache *regcache, CORE_ADDR bp_addr,
- int nargs, struct value **args, CORE_ADDR sp, int struct_return,
- CORE_ADDR struct_addr)
+ int nargs, struct value **args, CORE_ADDR sp,
+ int struct_return, CORE_ADDR struct_addr)
{
int i;
int regnum = ARG1_REGNUM;
@@ -1042,51 +1038,11 @@ d10v_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
return sp;
}
-
-/* Given a return value in `regbuf' with a type `valtype',
- extract and copy its value into `valbuf'. */
-
-static void
-d10v_extract_return_value (struct type *type, struct regcache *regcache,
- void *valbuf)
-{
- int len;
- if (TYPE_LENGTH (type) == 1)
- {
- ULONGEST c;
- regcache_cooked_read_unsigned (regcache, RET1_REGNUM, &c);
- store_unsigned_integer (valbuf, 1, c);
- }
- else
- {
- /* For return values of odd size, the first byte is in the
- least significant part of the first register. The
- remaining bytes in remaining registers. Interestingly, when
- such values are passed in, the last byte is in the most
- significant byte of that same register - wierd. */
- int reg = RET1_REGNUM;
- int off = 0;
- if (TYPE_LENGTH (type) & 1)
- {
- regcache_cooked_read_part (regcache, RET1_REGNUM, 1, 1,
- (bfd_byte *)valbuf + off);
- off++;
- reg++;
- }
- /* Transfer the remaining registers. */
- for (; off < TYPE_LENGTH (type); reg++, off += 2)
- {
- regcache_cooked_read (regcache, RET1_REGNUM + reg,
- (bfd_byte *) valbuf + off);
- }
- }
-}
-
/* Translate a GDB virtual ADDR/LEN into a format the remote target
understands. Returns number of bytes that can be transfered
starting at TARG_ADDR. Return ZERO if no bytes can be transfered
(segmentation fault). Since the simulator knows all about how the
- VM system works, we just call that to do the translation. */
+ VM system works, we just call that to do the translation. */
static void
remote_d10v_translate_xfer_address (struct gdbarch *gdbarch,
@@ -1313,7 +1269,8 @@ tdisassemble_command (char *arg, int from_tty)
}
}
- printf_filtered ("Dump of trace from %s to %s:\n", paddr_u (low), paddr_u (high));
+ printf_filtered ("Dump of trace from %s to %s:\n",
+ paddr_u (low), paddr_u (high));
display_trace (low, high);
@@ -1403,11 +1360,6 @@ d10v_frame_this_id (struct frame_info *next_frame,
/* The FUNC is easy. */
func = frame_func_unwind (next_frame);
- /* This is meant to halt the backtrace at "_start". Make sure we
- don't halt it at a generic dummy frame. */
- if (func <= IMEM_START || deprecated_inside_entry_file (func))
- return;
-
/* Hopefully the prologue analysis either correctly determined the
frame's base (which is the SP from the previous frame), or set
that base to "NULL". */
@@ -1483,13 +1435,13 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
gdbarch_register_name_ftype *d10v_register_name;
gdbarch_register_sim_regno_ftype *d10v_register_sim_regno;
- /* Find a candidate among the list of pre-declared architectures. */
+ /* Find a candidate among the list of pre-declared architectures. */
arches = gdbarch_list_lookup_by_info (arches, &info);
if (arches != NULL)
return arches->gdbarch;
/* None found, create a new architecture from the information
- provided. */
+ provided. */
tdep = XMALLOC (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
@@ -1535,7 +1487,7 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_long_long_bit (gdbarch, 8 * TARGET_CHAR_BIT);
/* NOTE: The d10v as a 32 bit ``float'' and ``double''. ``long
- double'' is 64 bits. */
+ double'' is 64 bits. */
set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
@@ -1549,19 +1501,17 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
case BFD_ENDIAN_LITTLE:
set_gdbarch_float_format (gdbarch, &floatformat_ieee_single_little);
set_gdbarch_double_format (gdbarch, &floatformat_ieee_single_little);
- set_gdbarch_long_double_format (gdbarch, &floatformat_ieee_double_little);
+ set_gdbarch_long_double_format (gdbarch,
+ &floatformat_ieee_double_little);
break;
default:
internal_error (__FILE__, __LINE__,
"d10v_gdbarch_init: bad byte order for float format");
}
- set_gdbarch_extract_return_value (gdbarch, d10v_extract_return_value);
+ set_gdbarch_return_value (gdbarch, d10v_return_value);
set_gdbarch_push_dummy_code (gdbarch, d10v_push_dummy_code);
set_gdbarch_push_dummy_call (gdbarch, d10v_push_dummy_call);
- set_gdbarch_store_return_value (gdbarch, d10v_store_return_value);
- set_gdbarch_extract_struct_value_address (gdbarch, d10v_extract_struct_value_address);
- set_gdbarch_use_struct_convention (gdbarch, d10v_use_struct_convention);
set_gdbarch_skip_prologue (gdbarch, d10v_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
@@ -1569,10 +1519,12 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_function_start_offset (gdbarch, 0);
set_gdbarch_breakpoint_from_pc (gdbarch, d10v_breakpoint_from_pc);
- set_gdbarch_remote_translate_xfer_address (gdbarch, remote_d10v_translate_xfer_address);
+ set_gdbarch_remote_translate_xfer_address (gdbarch,
+ remote_d10v_translate_xfer_address);
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
+ set_gdbarch_frameless_function_invocation (gdbarch,
+ frameless_look_for_prologue);
set_gdbarch_frame_align (gdbarch, d10v_frame_align);
@@ -1604,7 +1556,8 @@ _initialize_d10v_tdep (void)
target_resume_hook = d10v_eva_prepare_to_trace;
target_wait_loop_hook = d10v_eva_get_trace_data;
- deprecate_cmd (add_com ("regs", class_vars, show_regs, "Print all registers"),
+ deprecate_cmd (add_com ("regs", class_vars, show_regs,
+ "Print all registers"),
"info registers");
add_com ("itrace", class_support, trace_command,
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 6ed23c6..59c5d79 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -258,10 +258,6 @@ static int bincls_allocated;
extern void _initialize_dbxread (void);
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE static void process_now (struct objfile *);
-#endif /* OBSOLETE CFront */
-
static void read_ofile_symtab (struct partial_symtab *);
static void dbx_psymtab_to_symtab (struct partial_symtab *);
@@ -356,7 +352,7 @@ add_old_header_file (char *name, int instance)
int i;
for (i = 0; i < N_HEADER_FILES (current_objfile); i++)
- if (STREQ (p[i].name, name) && instance == p[i].instance)
+ if (strcmp (p[i].name, name) == 0 && instance == p[i].instance)
{
add_this_object_header_file (i);
return;
@@ -773,107 +769,6 @@ static struct external_nlist symbuf[4096];
static int symbuf_idx;
static int symbuf_end;
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* cont_elem is used for continuing information in cfront.
-// OBSOLETE It saves information about which types need to be fixed up and
-// OBSOLETE completed after all the stabs are read. */
-// OBSOLETE struct cont_elem
-// OBSOLETE {
-// OBSOLETE /* sym and stabstring for continuing information in cfront */
-// OBSOLETE struct symbol *sym;
-// OBSOLETE char *stabs;
-// OBSOLETE /* state dependencies (statics that must be preserved) */
-// OBSOLETE int sym_idx;
-// OBSOLETE int sym_end;
-// OBSOLETE int symnum;
-// OBSOLETE int (*func) (struct objfile *, struct symbol *, char *);
-// OBSOLETE /* other state dependencies include:
-// OBSOLETE (assumption is that these will not change since process_now FIXME!!)
-// OBSOLETE stringtab_global
-// OBSOLETE n_stabs
-// OBSOLETE objfile
-// OBSOLETE symfile_bfd */
-// OBSOLETE };
-
-// OBSOLETE static struct cont_elem *cont_list = 0;
-// OBSOLETE static int cont_limit = 0;
-// OBSOLETE static int cont_count = 0;
-
-// OBSOLETE /* Arrange for function F to be called with arguments SYM and P later
-// OBSOLETE in the stabs reading process. */
-// OBSOLETE void
-// OBSOLETE process_later (struct symbol *sym, char *p,
-// OBSOLETE int (*f) (struct objfile *, struct symbol *, char *))
-// OBSOLETE {
-
-// OBSOLETE /* Allocate more space for the deferred list. */
-// OBSOLETE if (cont_count >= cont_limit - 1)
-// OBSOLETE {
-// OBSOLETE cont_limit += 32; /* chunk size */
-
-// OBSOLETE cont_list
-// OBSOLETE = (struct cont_elem *) xrealloc (cont_list,
-// OBSOLETE (cont_limit
-// OBSOLETE * sizeof (struct cont_elem)));
-// OBSOLETE if (!cont_list)
-// OBSOLETE error ("Virtual memory exhausted\n");
-// OBSOLETE }
-
-// OBSOLETE /* Save state variables so we can process these stabs later. */
-// OBSOLETE cont_list[cont_count].sym_idx = symbuf_idx;
-// OBSOLETE cont_list[cont_count].sym_end = symbuf_end;
-// OBSOLETE cont_list[cont_count].symnum = symnum;
-// OBSOLETE cont_list[cont_count].sym = sym;
-// OBSOLETE cont_list[cont_count].stabs = p;
-// OBSOLETE cont_list[cont_count].func = f;
-// OBSOLETE cont_count++;
-// OBSOLETE }
-
-// OBSOLETE /* Call deferred funtions in CONT_LIST. */
-
-// OBSOLETE static void
-// OBSOLETE process_now (struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE int save_symbuf_idx;
-// OBSOLETE int save_symbuf_end;
-// OBSOLETE int save_symnum;
-// OBSOLETE struct symbol *sym;
-// OBSOLETE char *stabs;
-// OBSOLETE int err;
-// OBSOLETE int (*func) (struct objfile *, struct symbol *, char *);
-
-// OBSOLETE /* Save the state of our caller, we'll want to restore it before
-// OBSOLETE returning. */
-// OBSOLETE save_symbuf_idx = symbuf_idx;
-// OBSOLETE save_symbuf_end = symbuf_end;
-// OBSOLETE save_symnum = symnum;
-
-// OBSOLETE /* Iterate over all the deferred stabs. */
-// OBSOLETE for (i = 0; i < cont_count; i++)
-// OBSOLETE {
-// OBSOLETE /* Restore the state for this deferred stab. */
-// OBSOLETE symbuf_idx = cont_list[i].sym_idx;
-// OBSOLETE symbuf_end = cont_list[i].sym_end;
-// OBSOLETE symnum = cont_list[i].symnum;
-// OBSOLETE sym = cont_list[i].sym;
-// OBSOLETE stabs = cont_list[i].stabs;
-// OBSOLETE func = cont_list[i].func;
-
-// OBSOLETE /* Call the function to handle this deferrd stab. */
-// OBSOLETE err = (*func) (objfile, sym, stabs);
-// OBSOLETE if (err)
-// OBSOLETE error ("Internal error: unable to resolve stab.\n");
-// OBSOLETE }
-
-// OBSOLETE /* Restore our caller's state. */
-// OBSOLETE symbuf_idx = save_symbuf_idx;
-// OBSOLETE symbuf_end = save_symbuf_end;
-// OBSOLETE symnum = save_symnum;
-// OBSOLETE cont_count = 0;
-// OBSOLETE }
-#endif /* OBSOLETE CFront */
-
/* Name of last function encountered. Used in Solaris to approximate
object file boundaries. */
static char *last_function_name;
@@ -1040,7 +935,7 @@ find_corresponding_bincl_psymtab (char *name, int instance)
for (bincl = bincl_list; bincl < next_bincl; bincl++)
if (bincl->instance == instance
- && STREQ (name, bincl->name))
+ && strcmp (name, bincl->name) == 0)
return bincl->pst;
repeated_header_complaint (name, symnum);
@@ -1712,12 +1607,12 @@ read_dbx_symtab (struct objfile *objfile)
things like "break c-exp.y:435" need to work (I
suppose the psymtab_include_list could be hashed or put
in a binary tree, if profiling shows this is a major hog). */
- if (pst && STREQ (namestring, pst->filename))
+ if (pst && strcmp (namestring, pst->filename) == 0)
continue;
{
int i;
for (i = 0; i < includes_used; i++)
- if (STREQ (namestring, psymtab_include_list[i]))
+ if (strcmp (namestring, psymtab_include_list[i]) == 0)
{
i = -1;
break;
@@ -1838,22 +1733,6 @@ read_dbx_symtab (struct objfile *objfile)
psymtab_language, objfile);
p += 1;
}
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* The semantics of C++ state that "struct foo { ... }"
-// OBSOLETE also defines a typedef for "foo". Unfortuantely, cfront
-// OBSOLETE never makes the typedef when translating from C++ to C.
-// OBSOLETE We make the typedef here so that "ptype foo" works as
-// OBSOLETE expected for cfront translated code. */
-// OBSOLETE else if (psymtab_language == language_cplus)
-// OBSOLETE {
-// OBSOLETE /* Also a typedef with the same name. */
-// OBSOLETE add_psymbol_to_list (namestring, p - namestring,
-// OBSOLETE VAR_DOMAIN, LOC_TYPEDEF,
-// OBSOLETE &objfile->static_psymbols,
-// OBSOLETE nlist.n_value, 0,
-// OBSOLETE psymtab_language, objfile);
-// OBSOLETE }
-#endif /* OBSOLETE CFront */
}
goto check_enum;
case 't':
@@ -2088,11 +1967,6 @@ read_dbx_symtab (struct objfile *objfile)
case '9':
case '-':
case '#': /* for symbol identification (used in live ranges) */
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* added to support cfront stabs strings */
-// OBSOLETE case 'Z': /* for definition continuations */
-// OBSOLETE case 'P': /* for prototypes */
-#endif /* OBSOLETE CFront */
continue;
case ':':
@@ -2764,11 +2638,6 @@ read_ofile_symtab (struct partial_symtab *pst)
pst->symtab = end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT (objfile));
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* Process items which we had to "process_later" due to dependencies
-// OBSOLETE on other stabs. */
-// OBSOLETE process_now (objfile);
-#endif /* OBSOLETE CFront */
end_stabs ();
}
@@ -3300,12 +3169,12 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
int l = colon_pos - name;
m = lookup_minimal_symbol_by_pc (last_pc_address);
- if (m && STREQN (DEPRECATED_SYMBOL_NAME (m), name, l)
+ 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)
- && STREQN (DEPRECATED_SYMBOL_NAME (m + 1), name, l)
+ && 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);
@@ -3360,7 +3229,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
case N_OPT: /* Solaris 2: Compiler options */
if (name)
{
- if (STREQ (name, GCC2_COMPILED_FLAG_SYMBOL))
+ if (strcmp (name, GCC2_COMPILED_FLAG_SYMBOL) == 0)
{
processing_gcc_compilation = 2;
#if 0 /* Works, but is experimental. -fnf */
diff --git a/gdb/defs.h b/gdb/defs.h
index 642ecc9..78beb3c 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -230,6 +230,21 @@ enum auto_boolean
AUTO_BOOLEAN_AUTO
};
+/* Potential ways that a function can return a value of a given type. */
+enum return_value_convention
+{
+ /* Where the return value has been squeezed into one or more
+ registers. */
+ RETURN_VALUE_REGISTER_CONVENTION,
+ /* Commonly known as the "struct return convention". The caller
+ passes an additional hidden first parameter to the caller. That
+ parameter contains the address at which the value being returned
+ 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
+};
+
/* the cleanup list records things that have to be undone
if an error happens (descriptors to be closed, memory to be freed, etc.)
Each link in the chain records a function to call and an
@@ -853,9 +868,10 @@ extern void xmfree (void *md, void *ptr);
"libiberty.h". */
extern void xfree (void *);
-/* Utility macros to allocate typed memory. Avoids errors like
- ``struct foo *foo = xmalloc (sizeof bar)'' and ``struct foo *foo =
- (struct foo *) xmalloc (sizeof bar)''. */
+/* Utility macros to allocate typed memory. Avoids errors like:
+ struct foo *foo = xmalloc (sizeof struct bar); and memset (foo,
+ sizeof (struct foo), 0). */
+#define XZALLOC(TYPE) ((TYPE*) memset (xmalloc (sizeof (TYPE)), 0, sizeof (TYPE)))
#define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
#define XCALLOC(NMEMB, TYPE) ((TYPE*) xcalloc ((NMEMB), sizeof (TYPE)))
@@ -1264,4 +1280,36 @@ extern int use_windows;
#define ISATTY(FP) (isatty (fileno (FP)))
#endif
+/* Ensure that V is aligned to an N byte boundary (B's assumed to be a
+ power of 2). Round up/down when necessary. Examples of correct
+ use include:
+
+ addr = align_up (addr, 8); -- VALUE needs 8 byte alignment
+ write_memory (addr, value, len);
+ addr += len;
+
+ and:
+
+ sp = align_down (sp - len, 16); -- Keep SP 16 byte aligned
+ write_memory (sp, value, len);
+
+ Note that uses such as:
+
+ write_memory (addr, value, len);
+ addr += align_up (len, 8);
+
+ and:
+
+ sp -= align_up (len, 8);
+ write_memory (sp, value, len);
+
+ are typically not correct as they don't ensure that the address (SP
+ or ADDR) is correctly aligned (relying on previous alignment to
+ keep things right). This is also why the methods are called
+ "align_..." instead of "round_..." as the latter reads better with
+ this incorrect coding style. */
+
+extern ULONGEST align_up (ULONGEST v, int n);
+extern ULONGEST align_down (ULONGEST v, int n);
+
#endif /* #ifndef DEFS_H */
diff --git a/gdb/disasm.c b/gdb/disasm.c
index 5f4d07a..20d0ab3 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -337,7 +337,7 @@ gdb_disassemble_info (struct gdbarch *gdbarch, struct ui_file *file)
/* NOTE: cagney/2003-04-28: The original code, from the old Insight
disassembler had a local optomization here. By default it would
access the executable file, instead of the target memory (there
- was a growing list of exceptions though). Unfortunatly, the
+ was a growing list of exceptions though). Unfortunately, the
heuristic was flawed. Commands like "disassemble &variable"
didn't work as they relied on the access going to the target.
Further, it has been supperseeded by trust-read-only-sections
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index ce378b4..1bd7401 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,124 @@
+2003-11-11 Elena Zannoni <ezannoni@redhat.com>
+
+ * stabs.texinfo: Add dircategory and direntry commands.
+ * annotate.texinfo: Ditto.
+
+2003-11-10 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Replace the
+ return_value method's "inval" and "outval" parameters with
+ "readbuf" and "writebuf".
+
+2003-10-28 Jim Blandy <jimb@redhat.com>
+
+ * gdb.texinfo (The F request packet, The F reply packet): Renamed
+ from "The `F' request packet" and "The `F' reply packet", to make
+ texi2dvi happy.
+ (File-I/O remote protocol extension): Update menu entries, too.
+
+2003-10-26 Michael Chastain <mec@shout.net>
+
+ * gdb.texinfo (Thread Stops): Document the issue with
+ premature return from system calls in multi-threaded programs.
+
+2003-10-24 Andrew Cagney <cagney@redhat.com>
+
+ * annotate.texinfo: Fix "fortunatly"[sic].
+
+2003-10-23 Kei Sakamoto <sakamoto.kei@renesas.com>
+
+ * gdb.texinfo (Contributors to GDB): Replace "Renesas"
+ with "Hitachi" and "Mitsubishi".
+
+2003-10-20 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Document
+ gdbarch_return_value. Add cross references from
+ USE_STRUCT_CONVENTION, EXTRACT_RETURN_VALUE, and
+ STORE_RETURN_VALUE, and from/to EXTRACT_STRUCT_VALUE_ADDRESS.
+
+2003-10-18 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Document
+ regset_from_core_section.
+
+2003-10-16 Kei Sakamot Sakamoto <sakamoto.kei@renesas.com>
+
+ * gdb.texinfo (M32R/D): Mention m32rsdi target.
+
+2003-10-15 Kevin Buettner <kevinb@redhat.com>
+
+ From Anthony Green <green@redhat.com>:
+ * gdb.texinfo (Breakpoints related warnings): Insert into menu.
+
+2003-10-14 Kevin Buettner <kevinb@redhat.com>
+
+ * gdb.texinfo (Breakpoint related warnings): New node.
+ * gdbint.texinfo (ADJUST_BREAKPOINT_ADDRESS): Document.
+
+2003-10-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.texinfo (Remote Protocol): Document v and vCont.
+
+2003-10-10 Kei Sakamoto <sakamoto.kei@renesas.com>
+
+ * gdb.texinfo: Replace "Hitachi" and "Mitsubishi" with "Renesas".
+ * gdbint.texinfo: Ditto.
+
+2003-10-09 Andrew Cagney <cagney@redhat.com>
+
+ From 2003-09-18 David Anderson <davea@sgi.com>:
+ * gdb.texinfo (GDB/MI Symbol Query): Replace "comamnd" with
+ "command".
+
+2003-10-03 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Deprecate
+ IBM6000_TARGET. Mention that it implies an RS/6000 system and not
+ just target.
+
+2003-10-02 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Rename
+ REGISTER_RAW_SIZE to DEPRECATED_REGISTER_RAW_SIZE.
+ * gdb.texinfo (Packets, Stop Reply Packets): Ditto.
+ * gdbint.texinfo (Target Architecture Definition): Rename
+
+2003-09-30 Andrew Cagney <cagney@redhat.com>
+
+ REGISTER_VIRTUAL_SIZE to DEPRECATED_REGISTER_VIRTUAL_SIZE.
+ (Target Architecture Definition):
+
+ * gdbint.texinfo (Target Architecture Definition): Rename
+ REGISTER_VIRTUAL_TYPE to DEPRECATED_REGISTER_VIRTUAL_TYPE.
+
+2003-09-29 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ documentation for NEED_TEXT_START_END.
+
+ * gdbint.texinfo (Target Architecture Definition): Rename
+ NPC_REGNUM to DEPRECATED_NPC_REGNUM. Add cross reference to
+ TARGET_WRITE_PC.
+
+2003-09-22 Michael Chastain <mec@shout.net>
+
+ * gdbint.texinfo (Testsuite Organization): Change gdb.c++ to gdb.cp.
+
+2003-09-21 Anthony Green <green@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Fix typos.
+
+2003-09-21 Mark Kettenis <kettenis@gnu.org>
+
+ * gdbint.texinfo (Target Architecture Definition): Document
+ stabs_argument_has_addr.
+
+2003-09-18 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ documentation on REGISTER_NAMES.
+
2003-09-13 Mark Kettenis <kettenis@gnu.org>
* gdbint.texinfo (Target Architecture Definition): Replace
diff --git a/gdb/doc/annotate.texinfo b/gdb/doc/annotate.texinfo
index 401657d..901c6e1 100644
--- a/gdb/doc/annotate.texinfo
+++ b/gdb/doc/annotate.texinfo
@@ -1,6 +1,14 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename annotate.info
+
+@c This is a dir.info fragment to support semi-automated addition of
+@c manuals to an info tree.
+@dircategory Programming & development tools.
+@direntry
+* Annotate: (annotate). The obsolete annotation interface.
+@end direntry
+
@c
@include gdb-cfg.texi
@c
@@ -146,7 +154,7 @@ This chapter discusses the known problems.
@section Dependant on @sc{cli} output
The annotation interface works by interspersing markups with
-@value{GDBN} normal command-line interpreter output. Unfortunatly, this
+@value{GDBN} normal command-line interpreter output. Unfortunately, this
makes the annotation client dependant on not just the annotations, but
also the @sc{cli} output. This is because the client is forced to
assume that specific @value{GDBN} commands provide specific information.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index cf69fd3..f470800 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -418,12 +418,13 @@ Fred Fish wrote most of the support for Unix System Vr4.
He also enhanced the command-completion support to cover C@t{++} overloaded
symbols.
-Hitachi America, Ltd. sponsored the support for H8/300, H8/500, and
-Super-H processors.
+Hitachi America (now Renesas America), Ltd. sponsored the support for
+H8/300, H8/500, and Super-H processors.
NEC sponsored the support for the v850, Vr4xxx, and Vr5xxx processors.
-Mitsubishi sponsored the support for D10V, D30V, and M32R/D processors.
+Mitsubishi (now Renesas) sponsored the support for D10V, D30V, and M32R/D
+processors.
Toshiba sponsored the support for the TX39 Mips processor.
@@ -2441,6 +2442,7 @@ all breakpoint in that range are operated on.
* Break Commands:: Breakpoint command lists
* Breakpoint Menus:: Breakpoint menus
* Error in Breakpoints:: ``Cannot insert breakpoints''
+* Breakpoint related warnings:: ``Breakpoint address adjusted...''
@end menu
@node Set Breaks
@@ -3309,6 +3311,58 @@ watchpoints it needs to insert.
When this message is printed, you need to disable or remove some of the
hardware-assisted breakpoints and watchpoints, and then continue.
+@node Breakpoint related warnings
+@subsection ``Breakpoint address adjusted...''
+@cindex breakpoint address adjusted
+
+Some processor architectures place constraints on the addresses at
+which breakpoints may be placed. For architectures thus constrained,
+@value{GDBN} will attempt to adjust the breakpoint's address to comply
+with the constraints dictated by the architecture.
+
+One example of such an architecture is the Fujitsu FR-V. The FR-V is
+a VLIW architecture in which a number of RISC-like instructions may be
+bundled together for parallel execution. The FR-V architecture
+constrains the location of a breakpoint instruction within such a
+bundle to the instruction with the lowest address. @value{GDBN}
+honors this constraint by adjusting a breakpoint's address to the
+first in the bundle.
+
+It is not uncommon for optimized code to have bundles which contain
+instructions from different source statements, thus it may happen that
+a breakpoint's address will be adjusted from one source statement to
+another. Since this adjustment may significantly alter @value{GDBN}'s
+breakpoint related behavior from what the user expects, a warning is
+printed when the breakpoint is first set and also when the breakpoint
+is hit.
+
+A warning like the one below is printed when setting a breakpoint
+that's been subject to address adjustment:
+
+@smallexample
+warning: Breakpoint address adjusted from 0x00010414 to 0x00010410.
+@end smallexample
+
+Such warnings are printed both for user settable and @value{GDBN}'s
+internal breakpoints. If you see one of these warnings, you should
+verify that a breakpoint set at the adjusted address will have the
+desired affect. If not, the breakpoint in question may be removed and
+other breakpoints may be set which will have the desired behavior.
+E.g., it may be sufficient to place the breakpoint at a later
+instruction. A conditional breakpoint may also be useful in some
+cases to prevent the breakpoint from triggering too often.
+
+@value{GDBN} will also issue a warning when stopping at one of these
+adjusted breakpoints:
+
+@smallexample
+warning: Breakpoint 1 address previously adjusted from 0x00010414
+to 0x00010410.
+@end smallexample
+
+When this warning is encountered, it may be too late to take remedial
+action except in cases where the breakpoint is hit earlier or more
+frequently than expected.
@node Continuing and Stepping
@section Continuing and stepping
@@ -3707,6 +3761,47 @@ allows you to examine the overall state of the program, including
switching between threads, without worrying that things may change
underfoot.
+@cindex thread breakpoints and system calls
+@cindex system calls and thread breakpoints
+@cindex premature return from system calls
+There is an unfortunate side effect. If one thread stops for a
+breakpoint, or for some other reason, and another thread is blocked in a
+system call, then the system call may return prematurely. This is a
+consequence of the interaction between multiple threads and the signals
+that @value{GDBN} uses to implement breakpoints and other events that
+stop execution.
+
+To handle this problem, your program should check the return value of
+each system call and react appropriately. This is good programming
+style anyways.
+
+For example, do not write code like this:
+
+@smallexample
+ sleep (10);
+@end smallexample
+
+The call to @code{sleep} will return early if a different thread stops
+at a breakpoint or for some other reason.
+
+Instead, write this:
+
+@smallexample
+ int unslept = 10;
+ while (unslept > 0)
+ unslept = sleep (unslept);
+@end smallexample
+
+A system call is allowed to return early, so the system is still
+conforming to its specification. But @value{GDBN} does cause your
+multi-threaded program to behave differently than it would without
+@value{GDBN}.
+
+Also, @value{GDBN} uses internal breakpoints in the thread library to
+monitor certain events such as thread creation and thread destruction.
+When such an event happens, a system call in another thread may return
+prematurely, even though your program does not appear to stop.
+
@cindex continuing threads
@cindex threads, continuing
Conversely, whenever you restart the program, @emph{all} threads start
@@ -10481,7 +10576,7 @@ specifies a fixed address.
@cindex choosing target byte order
@cindex target byte order
-Some types of processors, such as the MIPS, PowerPC, and Hitachi SH,
+Some types of processors, such as the MIPS, PowerPC, and Renesas SH,
offer the ability to run either big-endian or little-endian byte
orders. Usually the executable or symbol will include a bit to
designate the endian-ness, and you will not need to worry about
@@ -10928,9 +11023,9 @@ For Motorola 680x0 architectures.
@item sh-stub.c
@cindex @file{sh-stub.c}
-@cindex Hitachi
+@cindex Renesas
@cindex SH
-For Hitachi SH architectures.
+For Renesas SH architectures.
@item sparc-stub.c
@cindex @file{sparc-stub.c}
@@ -11782,15 +11877,15 @@ configurations.
@menu
* ARM:: ARM
-* H8/300:: Hitachi H8/300
-* H8/500:: Hitachi H8/500
-* M32R/D:: Mitsubishi M32R/D
+* H8/300:: Renesas H8/300
+* H8/500:: Renesas H8/500
+* M32R/D:: Renesas M32R/D
* M68K:: Motorola M68K
* MIPS Embedded:: MIPS Embedded
* OpenRISC 1000:: OpenRisc 1000
* PA:: HP PA Embedded
* PowerPC: PowerPC
-* SH:: Hitachi SH
+* SH:: Renesas SH
* Sparclet:: Tsqware Sparclet
* Sparclite:: Fujitsu Sparclite
* ST2000:: Tandem ST2000
@@ -11815,50 +11910,50 @@ ARM Demon monitor.
@end table
@node H8/300
-@subsection Hitachi H8/300
+@subsection Renesas H8/300
@table @code
@kindex target hms@r{, with H8/300}
@item target hms @var{dev}
-A Hitachi SH, H8/300, or H8/500 board, attached via serial line to your host.
+A Renesas SH, H8/300, or H8/500 board, attached via serial line to your host.
Use special commands @code{device} and @code{speed} to control the serial
line and the communications speed used.
@kindex target e7000@r{, with H8/300}
@item target e7000 @var{dev}
-E7000 emulator for Hitachi H8 and SH.
+E7000 emulator for Renesas H8 and SH.
@kindex target sh3@r{, with H8/300}
@kindex target sh3e@r{, with H8/300}
@item target sh3 @var{dev}
@itemx target sh3e @var{dev}
-Hitachi SH-3 and SH-3E target systems.
+Renesas SH-3 and SH-3E target systems.
@end table
@cindex download to H8/300 or H8/500
@cindex H8/300 or H8/500 download
-@cindex download to Hitachi SH
-@cindex Hitachi SH download
-When you select remote debugging to a Hitachi SH, H8/300, or H8/500
-board, the @code{load} command downloads your program to the Hitachi
+@cindex download to Renesas SH
+@cindex Renesas SH download
+When you select remote debugging to a Renesas SH, H8/300, or H8/500
+board, the @code{load} command downloads your program to the Renesas
board and also opens it as the current executable target for
@value{GDBN} on your host (like the @code{file} command).
@value{GDBN} needs to know these things to talk to your
-Hitachi SH, H8/300, or H8/500:
+Renesas SH, H8/300, or H8/500:
@enumerate
@item
that you want to use @samp{target hms}, the remote debugging interface
-for Hitachi microprocessors, or @samp{target e7000}, the in-circuit
-emulator for the Hitachi SH and the Hitachi 300H. (@samp{target hms} is
-the default when @value{GDBN} is configured specifically for the Hitachi SH,
+for Renesas microprocessors, or @samp{target e7000}, the in-circuit
+emulator for the Renesas SH and the Renesas 300H. (@samp{target hms} is
+the default when @value{GDBN} is configured specifically for the Renesas SH,
H8/300, or H8/500.)
@item
-what serial device connects your host to your Hitachi board (the first
+what serial device connects your host to your Renesas board (the first
serial device available on your host is the default).
@item
@@ -11866,24 +11961,24 @@ what speed to use over the serial device.
@end enumerate
@menu
-* Hitachi Boards:: Connecting to Hitachi boards.
-* Hitachi ICE:: Using the E7000 In-Circuit Emulator.
-* Hitachi Special:: Special @value{GDBN} commands for Hitachi micros.
+* Renesas Boards:: Connecting to Renesas boards.
+* Renesas ICE:: Using the E7000 In-Circuit Emulator.
+* Renesas Special:: Special @value{GDBN} commands for Renesas micros.
@end menu
-@node Hitachi Boards
-@subsubsection Connecting to Hitachi boards
+@node Renesas Boards
+@subsubsection Connecting to Renesas boards
@c only for Unix hosts
@kindex device
-@cindex serial device, Hitachi micros
+@cindex serial device, Renesas micros
Use the special @code{@value{GDBN}} command @samp{device @var{port}} if you
need to explicitly set the serial device. The default @var{port} is the
first available port on your host. This is only necessary on Unix
hosts, where it is typically something like @file{/dev/ttya}.
@kindex speed
-@cindex serial line speed, Hitachi micros
+@cindex serial line speed, Renesas micros
@code{@value{GDBN}} has another special command to set the communications
speed: @samp{speed @var{bps}}. This command also is only used from Unix
hosts; on DOS hosts, set the line speed as usual from outside @value{GDBN} with
@@ -11891,7 +11986,7 @@ the DOS @code{mode} command (for instance,
@w{@kbd{mode com2:9600,n,8,1,p}} for a 9600@dmn{bps} connection).
The @samp{device} and @samp{speed} commands are available only when you
-use a Unix host to debug your Hitachi microprocessor programs. If you
+use a Unix host to debug your Renesas microprocessor programs. If you
use a DOS host,
@value{GDBN} depends on an auxiliary terminate-and-stay-resident program
called @code{asynctsr} to communicate with the development board
@@ -11901,7 +11996,7 @@ to set up the serial port on the DOS side.
The following sample session illustrates the steps needed to start a
program under @value{GDBN} control on an H8/300. The example uses a
sample H8/300 program called @file{t.x}. The procedure is the same for
-the Hitachi SH and the H8/500.
+the Renesas SH and the H8/500.
First hook up your development board. In this example, we use a
board attached to serial port @code{COM2}; if you use a different serial
@@ -11934,7 +12029,7 @@ connected, you can start up @value{GDBN}. Call @code{@value{GDBP}} with
the name of your program as the argument. @code{@value{GDBN}} prompts
you, as usual, with the prompt @samp{(@value{GDBP})}. Use two special
commands to begin your debugging session: @samp{target hms} to specify
-cross-debugging to the Hitachi board, and the @code{load} command to
+cross-debugging to the Renesas board, and the @code{load} command to
download your program to the board. @code{load} displays the names of
the program's sections, and a @samp{*} for each 2K of data downloaded.
(If you want to refresh @value{GDBN} data on symbols or on the
@@ -11984,12 +12079,12 @@ to detect program completion.
In either case, @value{GDBN} sees the effect of a @sc{reset} on the
development board as a ``normal exit'' of your program.
-@node Hitachi ICE
+@node Renesas ICE
@subsubsection Using the E7000 in-circuit emulator
-@kindex target e7000@r{, with Hitachi ICE}
+@kindex target e7000@r{, with Renesas ICE}
You can use the E7000 in-circuit emulator to develop code for either the
-Hitachi SH or the H8/300H. Use one of these forms of the @samp{target
+Renesas SH or the H8/300H. Use one of these forms of the @samp{target
e7000} command to connect @value{GDBN} to your E7000:
@table @code
@@ -12004,8 +12099,8 @@ If your E7000 is installed as a host on a TCP/IP network, you can just
specify its hostname; @value{GDBN} uses @code{telnet} to connect.
@end table
-@node Hitachi Special
-@subsubsection Special @value{GDBN} commands for Hitachi micros
+@node Renesas Special
+@subsubsection Special @value{GDBN} commands for Renesas micros
Some @value{GDBN} commands are available only for the H8/300:
@@ -12038,13 +12133,17 @@ memory}. The accepted values for @var{mod} are @code{small},
@end table
@node M32R/D
-@subsection Mitsubishi M32R/D
+@subsection Renesas M32R/D
@table @code
@kindex target m32r
@item target m32r @var{dev}
-Mitsubishi M32R/D ROM monitor.
+Renesas M32R/D ROM monitor.
+
+@kindex target m32rsdi
+@item target m32rsdi @var{dev}
+Renesas M32R SDI server, connected via parallel port to the board.
@end table
@@ -12391,25 +12490,25 @@ W89K monitor, running on a Winbond HPPA board.
@end table
@node SH
-@subsection Hitachi SH
+@subsection Renesas SH
@table @code
-@kindex target hms@r{, with Hitachi SH}
+@kindex target hms@r{, with Renesas SH}
@item target hms @var{dev}
-A Hitachi SH board attached via serial line to your host. Use special
+A Renesas SH board attached via serial line to your host. Use special
commands @code{device} and @code{speed} to control the serial line and
the communications speed used.
-@kindex target e7000@r{, with Hitachi SH}
+@kindex target e7000@r{, with Renesas SH}
@item target e7000 @var{dev}
-E7000 emulator for Hitachi SH.
+E7000 emulator for Renesas SH.
@kindex target sh3@r{, with SH}
@kindex target sh3e@r{, with SH}
@item target sh3 @var{dev}
@item target sh3e @var{dev}
-Hitachi SH-3 and SH-3E target systems.
+Renesas SH-3 and SH-3E target systems.
@end table
@@ -17226,7 +17325,7 @@ Show the core addresses of the code for a source line.
@subsubheading @value{GDBN} Command
-The corresponding @value{GDBN} comamnd is @samp{info line}.
+The corresponding @value{GDBN} command is @samp{info line}.
@code{gdbtk} has the @samp{gdb_get_line} and @samp{gdb_get_file} commands.
@subsubheading Example
@@ -19517,9 +19616,9 @@ Reply:
Each byte of register data is described by two hex digits. The bytes
with the register are transmitted in target byte order. The size of
each register and their position within the @samp{g} @var{packet} are
-determined by the @value{GDBN} internal macros @var{REGISTER_RAW_SIZE}
-and @var{REGISTER_NAME} macros. The specification of several standard
-@code{g} packets is specified below.
+determined by the @value{GDBN} internal macros
+@var{DEPRECATED_REGISTER_RAW_SIZE} and @var{REGISTER_NAME} macros. The
+specification of several standard @code{g} packets is specified below.
@item E@var{NN}
for an error.
@end table
@@ -19781,9 +19880,51 @@ Reserved for future use.
Reserved for future use.
-@item @code{v} --- reserved
+@item @code{v} --- verbose packet prefix
-Reserved for future use.
+Packets starting with @code{v} are identified by a multi-letter name,
+up to the first @code{;} or @code{?} (or the end of the packet).
+
+@item @code{vCont}[;@var{action}[@code{:}@var{tid}]]... --- extended resume
+@cindex @code{vCont} packet
+
+Resume the inferior. Different actions may be specified for each thread.
+If an action is specified with no @var{tid}, then it is applied to any
+threads that don't have a specific action specified; if no default action is
+specified then other threads should remain stopped. Specifying multiple
+default actions is an error; specifying no actions is also an error.
+Thread IDs are specified in hexadecimal. Currently supported actions are:
+
+@table @code
+@item c
+Continue.
+@item C@var{sig}
+Continue with signal @var{sig}. @var{sig} should be two hex digits.
+@item s
+Step.
+@item S@var{sig}
+Step with signal @var{sig}. @var{sig} should be two hex digits.
+@end table
+
+The optional @var{addr} argument normally associated with these packets is
+not supported in @code{vCont}.
+
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
+
+@item @code{vCont?} --- extended resume query
+@cindex @code{vCont?} packet
+
+Query support for the @code{vCont} packet.
+
+Reply:
+@table @samp
+@item @code{vCont}[;@var{action}]...
+The @code{vCont} packet is supported. Each @var{action} is a supported
+command in the @code{vCont} packet.
+@item
+The @code{vCont} packet is not supported.
+@end table
@item @code{V} --- reserved
@@ -19971,12 +20112,13 @@ conventions is used.
@var{AA} = two hex digit signal number; @var{n...} = register number
(hex), @var{r...} = target byte ordered register contents, size defined
-by @code{REGISTER_RAW_SIZE}; @var{n...} = @samp{thread}, @var{r...} =
-thread process ID, this is a hex integer; @var{n...} = (@samp{watch} |
-@samp{rwatch} | @samp{awatch}, @var{r...} = data address, this is a hex
-integer; @var{n...} = other string not starting with valid hex digit.
-@value{GDBN} should ignore this @var{n...}, @var{r...} pair and go on
-to the next. This way we can extend the protocol.
+by @code{DEPRECATED_REGISTER_RAW_SIZE}; @var{n...} = @samp{thread},
+@var{r...} = thread process ID, this is a hex integer; @var{n...} =
+(@samp{watch} | @samp{rwatch} | @samp{awatch}, @var{r...} = data
+address, this is a hex integer; @var{n...} = other string not starting
+with valid hex digit. @value{GDBN} should ignore this @var{n...},
+@var{r...} pair and go on to the next. This way we can extend the
+protocol.
@item W@var{AA}
@@ -20269,8 +20411,8 @@ Example sequence of a target being stepped by a single instruction:
@menu
* File-I/O Overview::
* Protocol basics::
-* The `F' request packet::
-* The `F' reply packet::
+* The F request packet::
+* The F reply packet::
* Memory transfer::
* The Ctrl-C message::
* Console I/O::
@@ -20397,7 +20539,7 @@ Return value.
After having done the needed type and value coercion, the target continues
the latest continue or step action.
-@node The `F' request packet
+@node The F request packet
@subsection The @code{F} request packet
@cindex file-i/o request packet
@cindex @code{F} request packet
@@ -20424,7 +20566,7 @@ of string parameters. These are appended to the call-id, each separated
from its predecessor by a comma. All values are transmitted in ASCII
string representation, pointer/length pairs separated by a slash.
-@node The `F' reply packet
+@node The F reply packet
@subsection The @code{F} reply packet
@cindex file-i/o reply packet
@cindex @code{F} reply packet
diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo
index 31c6695..3170ce2 100644
--- a/gdb/doc/gdbint.texinfo
+++ b/gdb/doc/gdbint.texinfo
@@ -2505,7 +2505,7 @@ However, architectures with smaller word sizes are often cramped for
address space, so they may choose a pointer representation that breaks this
identity, and allows a larger code address space.
-For example, the Mitsubishi D10V is a 16-bit VLIW processor whose
+For example, the Renesas D10V is a 16-bit VLIW processor whose
instructions are 32 bits long@footnote{Some D10V instructions are
actually pairs of 16-bit sub-instructions. However, since you can't
jump into the middle of such a pair, code addresses can only refer to
@@ -2766,19 +2766,19 @@ You should not use @code{REGISTER_CONVERT_TO_VIRTUAL} for a register
unless this macro returns a non-zero value for that register.
@end deftypefn
-@deftypefn {Target Macro} int REGISTER_RAW_SIZE (int @var{reg})
+@deftypefn {Target Macro} int DEPRECATED_REGISTER_RAW_SIZE (int @var{reg})
The size of register number @var{reg}'s raw value. This is the number
of bytes the register will occupy in @code{registers}, or in a @value{GDBN}
remote protocol packet.
@end deftypefn
-@deftypefn {Target Macro} int REGISTER_VIRTUAL_SIZE (int @var{reg})
+@deftypefn {Target Macro} int DEPRECATED_REGISTER_VIRTUAL_SIZE (int @var{reg})
The size of register number @var{reg}'s value, in its virtual format.
This is the size a @code{struct value}'s buffer will have, holding that
register's value.
@end deftypefn
-@deftypefn {Target Macro} struct type *REGISTER_VIRTUAL_TYPE (int @var{reg})
+@deftypefn {Target Macro} struct type *DEPRECATED_REGISTER_VIRTUAL_TYPE (int @var{reg})
This is the type of the virtual representation of register number
@var{reg}. Note that there is no need for a macro giving a type for the
register's raw form; once the register's value has been obtained, @value{GDBN}
@@ -2787,7 +2787,7 @@ always uses the virtual form.
@deftypefn {Target Macro} void REGISTER_CONVERT_TO_VIRTUAL (int @var{reg}, struct type *@var{type}, char *@var{from}, char *@var{to})
Convert the value of register number @var{reg} to @var{type}, which
-should always be @code{REGISTER_VIRTUAL_TYPE (@var{reg})}. The buffer
+should always be @code{DEPRECATED_REGISTER_VIRTUAL_TYPE (@var{reg})}. The buffer
at @var{from} holds the register's value in raw format; the macro should
convert the value to virtual format, and place it at @var{to}.
@@ -2802,7 +2802,7 @@ value.
@deftypefn {Target Macro} void REGISTER_CONVERT_TO_RAW (struct type *@var{type}, int @var{reg}, char *@var{from}, char *@var{to})
Convert the value of register number @var{reg} to @var{type}, which
-should always be @code{REGISTER_VIRTUAL_TYPE (@var{reg})}. The buffer
+should always be @code{DEPRECATED_REGISTER_VIRTUAL_TYPE (@var{reg})}. The buffer
at @var{from} holds the register's value in raw format; the macro should
convert the value to virtual format, and place it at @var{to}.
@@ -3052,6 +3052,39 @@ custom breakpoint insertion and removal routines if
@code{BREAKPOINT_FROM_PC} needs to read the target's memory for some
reason.
+@item ADJUST_BREAKPOINT_ADDRESS (@var{address})
+@findex ADJUST_BREAKPOINT_ADDRESS
+@cindex breakpoint address adjusted
+Given an address at which a breakpoint is desired, return a breakpoint
+address adjusted to account for architectural constraints on
+breakpoint placement. This method is not needed by most targets.
+
+The FR-V target (see @file{frv-tdep.c}) requires this method.
+The FR-V is a VLIW architecture in which a number of RISC-like
+instructions are grouped (packed) together into an aggregate
+instruction or instruction bundle. When the processor executes
+one of these bundles, the component instructions are executed
+in parallel.
+
+In the course of optimization, the compiler may group instructions
+from distinct source statements into the same bundle. The line number
+information associated with one of the latter statements will likely
+refer to some instruction other than the first one in the bundle. So,
+if the user attempts to place a breakpoint on one of these latter
+statements, @value{GDBN} must be careful to @emph{not} place the break
+instruction on any instruction other than the first one in the bundle.
+(Remember though that the instructions within a bundle execute
+in parallel, so the @emph{first} instruction is the instruction
+at the lowest address and has nothing to do with execution order.)
+
+The FR-V's @code{ADJUST_BREAKPOINT_ADDRESS} method will adjust a
+breakpoint's address by scanning backwards for the beginning of
+the bundle, returning the address of the bundle.
+
+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
@@ -3186,13 +3219,17 @@ Define this to extract a function's return value of type @var{type} from
the raw register state @var{regbuf} and copy that, in virtual format,
into @var{valbuf}.
+This method has been deprecated in favour of @code{gdbarch_return_value}
+(@pxref{gdbarch_return_value}).
+
@item EXTRACT_STRUCT_VALUE_ADDRESS(@var{regbuf})
@findex EXTRACT_STRUCT_VALUE_ADDRESS
+@anchor{EXTRACT_STRUCT_VALUE_ADDRESS}
When defined, extract from the array @var{regbuf} (containing the raw
register state) the @code{CORE_ADDR} at which a function should return
its structure value.
-If not defined, @code{EXTRACT_RETURN_VALUE} is used.
+@xref{gdbarch_return_value}.
@item EXTRACT_STRUCT_VALUE_ADDRESS_P()
@findex EXTRACT_STRUCT_VALUE_ADDRESS_P
@@ -3382,9 +3419,9 @@ pointer. It examines the current state of the machine as needed.
Define this if you need to supply your own definition for the function
@code{DEPRECATED_GET_SAVED_REGISTER}.
-@item IBM6000_TARGET
-@findex IBM6000_TARGET
-Shows that we are configured for an IBM RS/6000 target. This
+@item DEPRECATED_IBM6000_TARGET
+@findex DEPRECATED_IBM6000_TARGET
+Shows that we are configured for an IBM RS/6000 system. This
conditional should be eliminated (FIXME) and replaced by
feature-specific macros. It was introduced in a haste and we are
repenting at leisure.
@@ -3483,11 +3520,6 @@ method like @code{INTEGER_TO_ADDRESS} certainly makes it possible for
@xref{Target Architecture Definition, , Pointers Are Not Always
Addresses}.
-@item NEED_TEXT_START_END
-@findex NEED_TEXT_START_END
-Define this if @value{GDBN} should determine the start and end addresses of the
-text section. (Seems dubious.)
-
@item NO_HIF_SUPPORT
@findex NO_HIF_SUPPORT
(Specific to the a29k.)
@@ -3510,8 +3542,8 @@ Convert the raw contents of register @var{regnum} into a value of type
@var{type}.
@xref{Target Architecture Definition, , Using Different Register and Memory Data Representations}.
-@item REGISTER_RAW_SIZE (@var{reg})
-@findex REGISTER_RAW_SIZE
+@item DEPRECATED_REGISTER_RAW_SIZE (@var{reg})
+@findex DEPRECATED_REGISTER_RAW_SIZE
Return the raw size of @var{reg}; defaults to the size of the register's
virtual type.
@xref{Target Architecture Definition, , Raw and Virtual Register Representations}.
@@ -3538,14 +3570,14 @@ floating-point. @samp{float_reggroup}.
Any register with a valid name.
@end table
-@item REGISTER_VIRTUAL_SIZE (@var{reg})
-@findex REGISTER_VIRTUAL_SIZE
+@item DEPRECATED_REGISTER_VIRTUAL_SIZE (@var{reg})
+@findex DEPRECATED_REGISTER_VIRTUAL_SIZE
Return the virtual size of @var{reg}; defaults to the size of the
register's virtual type.
Return the virtual size of @var{reg}.
@xref{Target Architecture Definition, , Raw and Virtual Register Representations}.
-@item REGISTER_VIRTUAL_TYPE (@var{reg})
+@item DEPRECATED_REGISTER_VIRTUAL_TYPE (@var{reg})
@findex REGISTER_VIRTUAL_TYPE
Return the virtual type of @var{reg}.
@xref{Target Architecture Definition, , Raw and Virtual Register Representations}.
@@ -3553,7 +3585,7 @@ Return the virtual type of @var{reg}.
@item struct type *register_type (@var{gdbarch}, @var{reg})
@findex register_type
If defined, return the type of register @var{reg}. This function
-superseeds @code{REGISTER_VIRTUAL_TYPE}. @xref{Target Architecture
+superseeds @code{DEPRECATED_REGISTER_VIRTUAL_TYPE}. @xref{Target Architecture
Definition, , Raw and Virtual Register Representations}.
@item REGISTER_CONVERT_TO_VIRTUAL(@var{reg}, @var{type}, @var{from}, @var{to})
@@ -3568,6 +3600,12 @@ Convert the value of register @var{reg} from its virtual form to its raw
form.
@xref{Target Architecture Definition, , Raw and Virtual Register Representations}.
+@item const struct regset *regset_from_core_section (struct gdbarch * @var{gdbarch}, const char * @var{sect_name}, size_t @var{sect_size})
+@findex regset_from_core_section
+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
@@ -3677,15 +3715,28 @@ be the number (greater than or equal to zero) of that register.
This should only need to be defined if @code{TARGET_READ_PC} and
@code{TARGET_WRITE_PC} are not defined.
-@item NPC_REGNUM
-@findex NPC_REGNUM
+@item DEPRECATED_NPC_REGNUM
+@findex DEPRECATED_NPC_REGNUM
The number of the ``next program counter'' register, if defined.
+@code{DEPRECATED_NPC_REGNUM} has been replaced by @code{TARGET_WRITE_PC}
+(@pxref{TARGET_WRITE_PC}).
+
@item PARM_BOUNDARY
@findex PARM_BOUNDARY
If non-zero, round arguments to a boundary of this many bits before
pushing them on the stack.
+@item stabs_argument_has_addr (@var{gdbarch}, @var{type})
+@findex stabs_argument_has_addr
+@findex DEPRECATED_REG_STRUCT_HAS_ADDR
+@anchor{stabs_argument_has_addr} Define this to return nonzero if a
+function argument of type @var{type} is passed by reference instead of
+value.
+
+This method replaces @code{DEPRECATED_REG_STRUCT_HAS_ADDR}
+(@pxref{DEPRECATED_REG_STRUCT_HAS_ADDR}).
+
@item PROCESS_LINENUMBER_HOOK
@findex PROCESS_LINENUMBER_HOOK
A hook defined for XCOFF reading.
@@ -3756,14 +3807,13 @@ register buffer at run-time.
Return the name of register @var{i} as a string. May return @code{NULL}
or @code{NUL} to indicate that register @var{i} is not valid.
-@item REGISTER_NAMES
-@findex REGISTER_NAMES
-Deprecated in favor of @code{REGISTER_NAME}.
-
@item DEPRECATED_REG_STRUCT_HAS_ADDR (@var{gcc_p}, @var{type})
@findex DEPRECATED_REG_STRUCT_HAS_ADDR
-Define this to return 1 if the given type will be passed by pointer
-rather than directly.
+@anchor{DEPRECATED_REG_STRUCT_HAS_ADDR}Define this to return 1 if the
+given type will be passed by pointer rather than directly.
+
+This method has been replaced by @code{stabs_argument_has_addr}
+(@pxref{stabs_argument_has_addr}).
@item SAVE_DUMMY_FRAME_TOS (@var{sp})
@findex SAVE_DUMMY_FRAME_TOS
@@ -3778,6 +3828,48 @@ allocated on the stack. @xref{unwind_dummy_id}.
Define this to convert sdb register numbers into @value{GDBN} regnums. If not
defined, no conversion will be done.
+@item enum return_value_convention gdbarch_return_value (struct gdbarch *@var{gdbarch}, struct type *@var{valtype}, struct regcache *@var{regcache}, void *@var{readbuf}, const void *@var{writebuf})
+@findex gdbarch_return_value
+@anchor{gdbarch_return_value} Given a function with a return-value of
+type @var{rettype}, return which return-value convention that function
+would use.
+
+@value{GDBN} currently recognizes two function return-value conventions:
+@code{RETURN_VALUE_REGISTER_CONVENTION} where the return value is found
+in registers; and @code{RETURN_VALUE_STRUCT_CONVENTION} where the return
+value is found in memory and the address of that memory location is
+passed in as the function's first parameter.
+
+If the register convention is being used, and @var{writebuf} is
+non-@code{NULL}, also copy the return-value in @var{writebuf} into
+@var{regcache}.
+
+If the register convention is being used, and @var{readbuf} is
+non-@code{NULL}, also copy the return value from @var{regcache} into
+@var{readbuf} (@var{regcache} contains a copy of the registers from the
+just returned function).
+
+@xref{EXTRACT_STRUCT_VALUE_ADDRESS}, for a description of how
+return-values that use the struct convention are handled.
+
+@emph{Maintainer note: This method replaces separate predicate, extract,
+store methods. By having only one method, the logic needed to determine
+the return-value convention need only be implemented in one place. If
+@value{GDBN} were written in an @sc{oo} language, this method would
+instead return an object that knew how to perform the register
+return-value extract and store.}
+
+@emph{Maintainer note: This method does not take a @var{gcc_p}
+parameter, and such a parameter should not be added. If an architecture
+that requires per-compiler or per-function information be identified,
+then the replacement of @var{rettype} with @code{struct value}
+@var{function} should be persued.}
+
+@emph{Maintainer note: The @var{regcache} parameter limits this methods
+to the inner most frame. While replacing @var{regcache} with a
+@code{struct frame_info} @var{frame} parameter would remove that
+limitation there has yet to be a demonstrated need for such a change.}
+
@item SKIP_PERMANENT_BREAKPOINT
@findex SKIP_PERMANENT_BREAKPOINT
Advance the inferior's PC past a permanent breakpoint. @value{GDBN} normally
@@ -3836,6 +3928,9 @@ A C expression that writes the function return value, found in
@var{valbuf}, into the @var{regcache}. @var{type} is the type of the
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.)
@@ -3909,6 +4004,7 @@ Number of bits in a short integer; defaults to @code{2 * TARGET_CHAR_BIT}.
@findex TARGET_READ_PC
@itemx TARGET_WRITE_PC (@var{val}, @var{pid})
@findex TARGET_WRITE_PC
+@anchor{TARGET_WRITE_PC}
@itemx TARGET_READ_SP
@findex TARGET_READ_SP
@itemx TARGET_READ_FP
@@ -3970,6 +4066,9 @@ being considered is known to have been compiled by GCC; this is helpful
for systems where GCC is known to use different calling convention than
other compilers.
+This method has been deprecated in favour of @code{gdbarch_return_value}
+(@pxref{gdbarch_return_value}).
+
@item VALUE_TO_REGISTER(@var{type}, @var{regnum}, @var{from}, @var{to})
@findex VALUE_TO_REGISTER
Convert a value of type @var{type} into the raw contents of register
@@ -6381,7 +6480,7 @@ for prototypes).
@item gdb.@var{lang}
Language-specific tests for any language @var{lang} besides C. Examples are
-@file{gdb.c++} and @file{gdb.java}.
+@file{gdb.cp} and @file{gdb.java}.
@item gdb.@var{platform}
Non-portable tests. The tests are specific to a specific configuration
diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo
index bd59116..8597384 100644
--- a/gdb/doc/stabs.texinfo
+++ b/gdb/doc/stabs.texinfo
@@ -3,13 +3,12 @@
@c @finalout
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* Stabs: (stabs). The "stabs" debugging information format.
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
+@c This is a dir.info fragment to support semi-automated addition of
+@c manuals to an info tree.
+@dircategory Programming & development tools.
+@direntry
+* Stabs: (stabs). The "stabs" debugging information format.
+@end direntry
@ifinfo
This document describes the stabs debugging symbol tables.
diff --git a/gdb/dpx2-nat.c b/gdb/dpx2-nat.c
index 04018db..488c06a 100644
--- a/gdb/dpx2-nat.c
+++ b/gdb/dpx2-nat.c
@@ -32,7 +32,7 @@
#include <sys/utsname.h>
-/* this table must line up with REGISTER_NAMES in tm-68k.h */
+/* This table must line up with REGISTER_NAME in "m68k-tdep.c". */
/* symbols like 'A0' come from <sys/reg.h> */
static int regmap[] =
{
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index 36c7dbb..3b10c51 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -387,7 +387,7 @@ dummy_frame_this_id (struct frame_info *next_frame,
}
else
{
- /* Outch! We're not trying to find the innermost frame's ID yet
+ /* 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. */
diff --git a/gdb/dve3900-rom.c b/gdb/dve3900-rom.c
index 02a273c..665179f 100644
--- a/gdb/dve3900-rom.c
+++ b/gdb/dve3900-rom.c
@@ -471,7 +471,7 @@ fetch_bitmapped_register (int regno, struct bit_field *bf)
/* supply register stores in target byte order, so swap here */
- store_unsigned_integer (regbuf, REGISTER_RAW_SIZE (regno), val);
+ store_unsigned_integer (regbuf, DEPRECATED_REGISTER_RAW_SIZE (regno), val);
supply_register (regno, regbuf);
}
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index d6b8f26..6e420cd 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -383,6 +383,7 @@ execute_cfa_program (unsigned char *insn_ptr, unsigned char *insn_end,
insn_ptr = read_uleb128 (insn_ptr, insn_end, &reg);
insn_ptr = read_uleb128 (insn_ptr, insn_end, &utmp);
dwarf2_frame_state_alloc_regs (&fs->regs, reg + 1);
+ fs->regs.reg[reg].how = REG_SAVED_REG;
fs->regs.reg[reg].loc.reg = utmp;
break;
@@ -770,7 +771,7 @@ dwarf2_frame_prev_register (struct frame_info *next_frame, void **this_cache,
either a register and a signed offset that are added
together or a DWARF expression that is evaluated. */
/* NOTE: cagney/2003-09-05: Should issue a complain.
- Unfortunatly it turns out that DWARF2 CFI has a problem.
+ Unfortunately it turns out that DWARF2 CFI has a problem.
Since CFI specifies the location at which a register was
saved (not its value) it isn't possible to specify
something like "unwound(REG) == REG + constant" using CFI
@@ -885,6 +886,9 @@ struct comp_unit
/* Base for DW_EH_PE_datarel encodings. */
bfd_vma dbase;
+
+ /* Base for DW_EH_PE_textrel encodings. */
+ bfd_vma tbase;
};
const struct objfile_data *dwarf2_frame_data;
@@ -1063,6 +1067,9 @@ read_encoded_value (struct comp_unit *unit, unsigned char encoding,
case DW_EH_PE_datarel:
base = unit->dbase;
break;
+ case DW_EH_PE_textrel:
+ base = unit->tbase;
+ break;
case DW_EH_PE_aligned:
base = 0;
offset = buf - unit->dwarf_frame_buffer;
@@ -1523,12 +1530,13 @@ dwarf2_build_frame_info (struct objfile *objfile)
unit.objfile = objfile;
unit.addr_size = objfile->obfd->arch_info->bits_per_address / 8;
unit.dbase = 0;
+ unit.tbase = 0;
/* First add the information from the .eh_frame section. That way,
the FDEs from that section are searched last. */
if (dwarf_eh_frame_offset)
{
- asection *got;
+ asection *got, *txt;
unit.cie = NULL;
unit.dwarf_frame_buffer = dwarf2_read_section (objfile,
@@ -1540,13 +1548,19 @@ dwarf2_build_frame_info (struct objfile *objfile)
unit.dwarf_frame_section = dwarf_eh_frame_section;
/* FIXME: kettenis/20030602: This is the DW_EH_PE_datarel base
- that for the i386/amd64 target, which currently is the only
- target in GCC that supports/uses the DW_EH_PE_datarel
- encoding. */
+ that is used for the i386/amd64 target, which currently is
+ the only target in GCC that supports/uses the
+ DW_EH_PE_datarel encoding. */
got = bfd_get_section_by_name (unit.abfd, ".got");
if (got)
unit.dbase = got->vma;
+ /* GCC emits the DW_EH_PE_textrel encoding type on sh and ia64
+ so far. */
+ txt = bfd_get_section_by_name (unit.abfd, ".text");
+ if (txt)
+ unit.tbase = txt->vma;
+
frame_ptr = unit.dwarf_frame_buffer;
while (frame_ptr < unit.dwarf_frame_buffer + unit.dwarf_frame_size)
frame_ptr = decode_frame_entry (&unit, frame_ptr, 1);
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index 3d1523b..cf00929 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -441,18 +441,6 @@ execute_stack_op (struct dwarf_expr_context *ctx, unsigned char *op_ptr,
result = dwarf_expr_fetch (ctx, 0);
if (ctx->in_reg)
result = (ctx->read_reg) (ctx->baton, result);
- else
- {
- char *buf = alloca (TARGET_ADDR_BIT / TARGET_CHAR_BIT);
- int bytes_read;
-
- (ctx->read_mem) (ctx->baton, buf, result,
- TARGET_ADDR_BIT / TARGET_CHAR_BIT);
- result = dwarf2_read_address (buf,
- buf + (TARGET_ADDR_BIT
- / TARGET_CHAR_BIT),
- &bytes_read);
- }
result = result + offset;
ctx->stack_len = before_stack_len;
ctx->in_reg = 0;
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index bfd9031..ffadd23 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -320,9 +320,16 @@ struct die_info
unsigned int num_attrs; /* Number of attributes */
struct attribute *attrs; /* An array of attributes */
struct die_info *next_ref; /* Next die in ref hash table */
+
+ /* The dies in a compilation unit form an n-ary tree. PARENT
+ points to this die's parent; CHILD points to the first child of
+ this node; and all the children of a given node are chained
+ together via their SIBLING fields, terminated by a die whose
+ tag is zero. */
struct die_info *child; /* Its first child, if any. */
struct die_info *sibling; /* Its next sibling, if any. */
struct die_info *parent; /* Its parent, if any. */
+
struct type *type; /* Cached type information */
};
@@ -1009,61 +1016,61 @@ dwarf2_has_info (bfd *abfd)
static void
dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr)
{
- if (STREQ (sectp->name, INFO_SECTION))
+ if (strcmp (sectp->name, INFO_SECTION) == 0)
{
dwarf_info_offset = sectp->filepos;
dwarf_info_size = bfd_get_section_size_before_reloc (sectp);
dwarf_info_section = sectp;
}
- else if (STREQ (sectp->name, ABBREV_SECTION))
+ else if (strcmp (sectp->name, ABBREV_SECTION) == 0)
{
dwarf_abbrev_offset = sectp->filepos;
dwarf_abbrev_size = bfd_get_section_size_before_reloc (sectp);
dwarf_abbrev_section = sectp;
}
- else if (STREQ (sectp->name, LINE_SECTION))
+ else if (strcmp (sectp->name, LINE_SECTION) == 0)
{
dwarf_line_offset = sectp->filepos;
dwarf_line_size = bfd_get_section_size_before_reloc (sectp);
dwarf_line_section = sectp;
}
- else if (STREQ (sectp->name, PUBNAMES_SECTION))
+ else if (strcmp (sectp->name, PUBNAMES_SECTION) == 0)
{
dwarf_pubnames_offset = sectp->filepos;
dwarf_pubnames_size = bfd_get_section_size_before_reloc (sectp);
dwarf_pubnames_section = sectp;
}
- else if (STREQ (sectp->name, ARANGES_SECTION))
+ else if (strcmp (sectp->name, ARANGES_SECTION) == 0)
{
dwarf_aranges_offset = sectp->filepos;
dwarf_aranges_size = bfd_get_section_size_before_reloc (sectp);
dwarf_aranges_section = sectp;
}
- else if (STREQ (sectp->name, LOC_SECTION))
+ else if (strcmp (sectp->name, LOC_SECTION) == 0)
{
dwarf_loc_offset = sectp->filepos;
dwarf_loc_size = bfd_get_section_size_before_reloc (sectp);
dwarf_loc_section = sectp;
}
- else if (STREQ (sectp->name, MACINFO_SECTION))
+ else if (strcmp (sectp->name, MACINFO_SECTION) == 0)
{
dwarf_macinfo_offset = sectp->filepos;
dwarf_macinfo_size = bfd_get_section_size_before_reloc (sectp);
dwarf_macinfo_section = sectp;
}
- else if (STREQ (sectp->name, STR_SECTION))
+ else if (strcmp (sectp->name, STR_SECTION) == 0)
{
dwarf_str_offset = sectp->filepos;
dwarf_str_size = bfd_get_section_size_before_reloc (sectp);
dwarf_str_section = sectp;
}
- else if (STREQ (sectp->name, FRAME_SECTION))
+ else if (strcmp (sectp->name, FRAME_SECTION) == 0)
{
dwarf_frame_offset = sectp->filepos;
dwarf_frame_size = bfd_get_section_size_before_reloc (sectp);
dwarf_frame_section = sectp;
}
- else if (STREQ (sectp->name, EH_FRAME_SECTION))
+ else if (strcmp (sectp->name, EH_FRAME_SECTION) == 0)
{
flagword aflag = bfd_get_section_flags (ignore_abfd, sectp);
if (aflag & SEC_HAS_CONTENTS)
@@ -1073,7 +1080,7 @@ dwarf2_locate_sections (bfd *ignore_abfd, asection *sectp, void *ignore_ptr)
dwarf_eh_frame_section = sectp;
}
}
- else if (STREQ (sectp->name, RANGES_SECTION))
+ else if (strcmp (sectp->name, RANGES_SECTION) == 0)
{
dwarf_ranges_offset = sectp->filepos;
dwarf_ranges_size = bfd_get_section_size_before_reloc (sectp);
@@ -3443,8 +3450,14 @@ read_array_type (struct die_info *die, struct objfile *objfile,
with a DW_FORM_block1 attribute.
FIXME: GDB does not yet know how to handle dynamic
arrays properly, treat them as arrays with unspecified
- length for now. */
- high = -1;
+ length for now.
+
+ FIXME: jimb/2003-09-22: GDB does not really know
+ how to handle arrays of unspecified length
+ either; we just represent them as zero-length
+ arrays. Choose an appropriate upper bound given
+ the lower bound we've computed above. */
+ high = low - 1;
}
else
{
@@ -4240,7 +4253,6 @@ dwarf2_read_abbrevs (bfd *abfd, struct comp_unit_head *cu_header)
/* Empty the abbrev table for a new compilation unit. */
-/* ARGSUSED */
static void
dwarf2_empty_abbrev_table (void *ptr_to_abbrevs_table)
{
@@ -7590,7 +7602,6 @@ decode_locdesc (struct dwarf_block *blk, struct objfile *objfile,
/* memory allocation interface */
-/* ARGSUSED */
static void
dwarf2_free_tmp_obstack (void *ignore)
{
diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c
index 6f1c76a..5c18487 100644
--- a/gdb/dwarfread.c
+++ b/gdb/dwarfread.c
@@ -1810,7 +1810,7 @@ handle_producer (char *producer)
else
{
processing_gcc_compilation =
- STREQN (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER));
+ strncmp (producer, GPLUS_PRODUCER, strlen (GPLUS_PRODUCER)) == 0;
}
/* Select a demangling style if we can identify the producer and if
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 8c27810..8814f89 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -80,59 +80,30 @@ elf_locate_sections (bfd *ignore_abfd, asection *sectp, void *eip)
struct elfinfo *ei;
ei = (struct elfinfo *) eip;
- if (STREQ (sectp->name, ".debug"))
+ if (strcmp (sectp->name, ".debug") == 0)
{
ei->dboffset = sectp->filepos;
ei->dbsize = bfd_get_section_size_before_reloc (sectp);
}
- else if (STREQ (sectp->name, ".line"))
+ else if (strcmp (sectp->name, ".line") == 0)
{
ei->lnoffset = sectp->filepos;
ei->lnsize = bfd_get_section_size_before_reloc (sectp);
}
- else if (STREQ (sectp->name, ".stab"))
+ else if (strcmp (sectp->name, ".stab") == 0)
{
ei->stabsect = sectp;
}
- else if (STREQ (sectp->name, ".stab.index"))
+ else if (strcmp (sectp->name, ".stab.index") == 0)
{
ei->stabindexsect = sectp;
}
- else if (STREQ (sectp->name, ".mdebug"))
+ else if (strcmp (sectp->name, ".mdebug") == 0)
{
ei->mdebugsect = sectp;
}
}
-#if 0 /* Currently unused */
-
-char *
-elf_interpreter (bfd *abfd)
-{
- sec_ptr interp_sec;
- unsigned size;
- char *interp = NULL;
-
- interp_sec = bfd_get_section_by_name (abfd, ".interp");
- if (interp_sec)
- {
- size = bfd_section_size (abfd, interp_sec);
- interp = alloca (size);
- if (bfd_get_section_contents (abfd, interp_sec, interp, (file_ptr) 0,
- size))
- {
- interp = savestring (interp, size - 1);
- }
- else
- {
- interp = NULL;
- }
- }
- return (interp);
-}
-
-#endif
-
static struct minimal_symbol *
record_minimal_symbol_and_info (char *name, CORE_ADDR address,
enum minimal_symbol_type ms_type, char *info, /* FIXME, is this really char *? */
@@ -398,9 +369,17 @@ elf_symtab_read (struct objfile *objfile, int dynamic)
= max (SECT_OFF_BSS (objfile),
max (SECT_OFF_DATA (objfile),
SECT_OFF_RODATA (objfile)));
+
+ /* max_index is the largest index we'll
+ use into this array, so we must
+ allocate max_index+1 elements for it.
+ However, 'struct stab_section_info'
+ already includes one element, so we
+ need to allocate max_index aadditional
+ elements. */
size = (sizeof (struct stab_section_info)
+ (sizeof (CORE_ADDR)
- * (max_index - 1)));
+ * max_index));
sectinfo = (struct stab_section_info *)
xmmalloc (objfile->md, size);
memset (sectinfo, 0, size);
@@ -711,7 +690,7 @@ elfstab_offset_sections (struct objfile *objfile, struct partial_symtab *pst)
for (; maybe; maybe = maybe->next)
{
if (filename[0] == maybe->filename[0]
- && STREQ (filename, maybe->filename))
+ && strcmp (filename, maybe->filename) == 0)
{
/* We found a match. But there might be several source files
(from different directories) with the same name. */
diff --git a/gdb/environ.c b/gdb/environ.c
index 8612b0a..01eb57a 100644
--- a/gdb/environ.c
+++ b/gdb/environ.c
@@ -106,7 +106,7 @@ get_in_environ (const struct environ *e, const char *var)
char *s;
for (; (s = *vector) != NULL; vector++)
- if (STREQN (s, var, len) && s[len] == '=')
+ if (strncmp (s, var, len) == 0 && s[len] == '=')
return &s[len + 1];
return 0;
@@ -123,7 +123,7 @@ set_in_environ (struct environ *e, const char *var, const char *value)
char *s;
for (i = 0; (s = vector[i]) != NULL; i++)
- if (STREQN (s, var, len) && s[len] == '=')
+ if (strncmp (s, var, len) == 0 && s[len] == '=')
break;
if (s == 0)
diff --git a/gdb/eval.c b/gdb/eval.c
index 6b504c6..a83c6fa 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -35,6 +35,7 @@
#include "infcall.h"
#include "objc-lang.h"
#include "block.h"
+#include "parser-defs.h"
/* Defined in symtab.c */
extern int hp_som_som_object_present;
@@ -70,7 +71,8 @@ static struct value *
evaluate_subexp (struct type *expect_type, struct expression *exp,
int *pos, 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);
}
/* Parse the string EXP as a C expression, evaluate it,
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 21f8a7a..913e030 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -702,7 +702,7 @@ command_line_handler (char *rl)
#define SERVER_COMMAND_LENGTH 7
server_command =
(p - linebuffer > SERVER_COMMAND_LENGTH)
- && STREQN (linebuffer, "server ", SERVER_COMMAND_LENGTH);
+ && strncmp (linebuffer, "server ", SERVER_COMMAND_LENGTH) == 0;
if (server_command)
{
/* Note that we don't set `line'. Between this and the check in
@@ -1084,7 +1084,6 @@ handle_sigwinch (int sig)
/* Called by do_setshow_command. */
-/* ARGSUSED */
void
set_async_editing_command (char *args, int from_tty, struct cmd_list_element *c)
{
@@ -1092,7 +1091,6 @@ set_async_editing_command (char *args, int from_tty, struct cmd_list_element *c)
}
/* Called by do_setshow_command. */
-/* ARGSUSED */
void
set_async_annotation_level (char *args, int from_tty, struct cmd_list_element *c)
{
@@ -1100,7 +1098,6 @@ set_async_annotation_level (char *args, int from_tty, struct cmd_list_element *c
}
/* Called by do_setshow_command. */
-/* ARGSUSED */
void
set_async_prompt (char *args, int from_tty, struct cmd_list_element *c)
{
diff --git a/gdb/exec.c b/gdb/exec.c
index 468b0ea..1c51917 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -1,7 +1,8 @@
/* Work with executable files, for GDB.
- Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
+ Inc.
This file is part of GDB.
@@ -30,6 +31,7 @@
#include "objfiles.h"
#include "completer.h"
#include "value.h"
+#include "exec.h"
#ifdef USG
#include <sys/types.h>
@@ -55,8 +57,6 @@ void (*file_changed_hook) (char *);
/* Prototypes for local functions */
-static void add_to_section_table (bfd *, sec_ptr, void *);
-
static void exec_close (int);
static void file_command (char *, int);
@@ -65,8 +65,6 @@ static void set_section_command (char *, int);
static void exec_files_info (struct target_ops *);
-static void bfdsec_to_vmap (bfd *, sec_ptr, void *);
-
static int ignore (CORE_ADDR, char *);
static void init_exec_ops (void);
@@ -85,13 +83,6 @@ bfd *exec_bfd = NULL;
int write_files = 0;
-/* Text start and end addresses (KLUDGE) if needed */
-
-#ifndef NEED_TEXT_START_END
-#define NEED_TEXT_START_END (0)
-#endif
-CORE_ADDR text_end = 0;
-
struct vmap *vmap;
void
@@ -101,7 +92,6 @@ exec_open (char *args, int from_tty)
exec_file_attach (args, from_tty);
}
-/* ARGSUSED */
static void
exec_close (int quitting)
{
@@ -266,30 +256,9 @@ exec_file_attach (char *filename, int from_tty)
scratch_pathname, bfd_errmsg (bfd_get_error ()));
}
- /* text_end is sometimes used for where to put call dummies. A
- few ports use these for other purposes too. */
- if (NEED_TEXT_START_END)
- {
- struct section_table *p;
-
- /* Set text_start to the lowest address of the start of any
- readonly code section and set text_end to the highest
- address of the end of any readonly code section. */
- /* FIXME: The comment above does not match the code. The
- code checks for sections with are either code *or*
- readonly. */
- CORE_ADDR text_start = ~(CORE_ADDR) 0;
- text_end = (CORE_ADDR) 0;
- for (p = exec_ops.to_sections; p < exec_ops.to_sections_end; p++)
- if (bfd_get_section_flags (p->bfd, p->the_bfd_section)
- & (SEC_CODE | SEC_READONLY))
- {
- if (text_start > p->addr)
- text_start = p->addr;
- if (text_end < p->endaddr)
- text_end = p->endaddr;
- }
- }
+#ifdef DEPRECATED_HPUX_TEXT_END
+ DEPRECATED_HPUX_TEXT_END (&exec_ops);
+#endif
validate_files ();
@@ -365,7 +334,8 @@ file_command (char *arg, int from_tty)
we cast it back to its proper type. */
static void
-add_to_section_table (bfd *abfd, sec_ptr asect, void *table_pp_char)
+add_to_section_table (bfd *abfd, struct bfd_section *asect,
+ void *table_pp_char)
{
struct section_table **table_pp = (struct section_table **) table_pp_char;
flagword aflag;
@@ -386,7 +356,7 @@ add_to_section_table (bfd *abfd, sec_ptr asect, void *table_pp_char)
Returns 0 if OK, 1 on error. */
int
-build_section_table (bfd *some_bfd, struct section_table **start,
+build_section_table (struct bfd *some_bfd, struct section_table **start,
struct section_table **end)
{
unsigned count;
@@ -404,7 +374,7 @@ build_section_table (bfd *some_bfd, struct section_table **start,
}
static void
-bfdsec_to_vmap (bfd *abfd, sec_ptr sect, void *arg3)
+bfdsec_to_vmap (struct bfd *abfd, struct bfd_section *sect, void *arg3)
{
struct vmap_and_bfd *vmap_bfd = (struct vmap_and_bfd *) arg3;
struct vmap *vp;
@@ -484,7 +454,6 @@ xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
int res;
struct section_table *p;
CORE_ADDR nextsectaddr, memend;
- int (*xfer_fn) (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
asection *section = NULL;
if (len <= 0)
@@ -498,7 +467,6 @@ xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
}
memend = memaddr + len;
- xfer_fn = write ? bfd_set_section_contents : bfd_get_section_contents;
nextsectaddr = memend;
for (p = target->to_sections; p < target->to_sections_end; p++)
@@ -511,8 +479,14 @@ xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
if (memend <= p->endaddr)
{
/* Entire transfer is within this section. */
- res = xfer_fn (p->bfd, p->the_bfd_section, myaddr,
- memaddr - p->addr, len);
+ if (write)
+ res = bfd_set_section_contents (p->bfd, p->the_bfd_section,
+ myaddr, memaddr - p->addr,
+ len);
+ else
+ res = bfd_get_section_contents (p->bfd, p->the_bfd_section,
+ myaddr, memaddr - p->addr,
+ len);
return (res != 0) ? len : 0;
}
else if (memaddr >= p->endaddr)
@@ -524,8 +498,14 @@ xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
{
/* This section overlaps the transfer. Just do half. */
len = p->endaddr - memaddr;
- res = xfer_fn (p->bfd, p->the_bfd_section, myaddr,
- memaddr - p->addr, len);
+ if (write)
+ res = bfd_set_section_contents (p->bfd, p->the_bfd_section,
+ myaddr, memaddr - p->addr,
+ len);
+ else
+ res = bfd_get_section_contents (p->bfd, p->the_bfd_section,
+ myaddr, memaddr - p->addr,
+ len);
return (res != 0) ? len : 0;
}
}
diff --git a/gdb/expprint.c b/gdb/expprint.c
index a3001b1..5949475 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -36,11 +36,6 @@
#include <ctype.h>
#endif
-/* Prototypes for local functions */
-
-static void print_subexp (struct expression *, int *, struct ui_file *,
- enum precedence);
-
void
print_expression (struct expression *exp, struct ui_file *stream)
{
@@ -53,10 +48,19 @@ print_expression (struct expression *exp, struct ui_file *stream)
if the precedence of the main operator of this subexpression is less,
parentheses are needed here. */
-static void
+void
print_subexp (struct expression *exp, int *pos,
struct ui_file *stream, enum precedence prec)
{
+ exp->language_defn->la_exp_desc->print_subexp (exp, pos, stream, prec);
+}
+
+/* Standard implementation of print_subexp for use in language_defn
+ vectors. */
+void
+print_subexp_standard (struct expression *exp, int *pos,
+ struct ui_file *stream, enum precedence prec)
+{
unsigned tem;
const struct op_print *op_print_tab;
int pc;
@@ -547,10 +551,22 @@ op_string (enum exp_opcode op)
/* Support for dumping the raw data from expressions in a human readable
form. */
-static char *op_name (int opcode);
+static char *op_name (struct expression *, enum exp_opcode);
+static int dump_subexp_body (struct expression *exp, struct ui_file *, int);
+
+/* Name for OPCODE, when it appears in expression EXP. */
static char *
-op_name (int opcode)
+op_name (struct expression *exp, enum exp_opcode opcode)
+{
+ return exp->language_defn->la_exp_desc->op_name (opcode);
+}
+
+/* Default name for the standard operator OPCODE (i.e., one defined in
+ the definition of enum exp_opcode). */
+
+char *
+op_name_standard (enum exp_opcode opcode)
{
switch (opcode)
{
@@ -737,8 +753,8 @@ op_name (int opcode)
}
void
-dump_prefix_expression (struct expression *exp, struct ui_file *stream,
- char *note)
+dump_raw_expression (struct expression *exp, struct ui_file *stream,
+ char *note)
{
int elt;
char *opcode_name;
@@ -747,11 +763,6 @@ dump_prefix_expression (struct expression *exp, struct ui_file *stream,
fprintf_filtered (stream, "Dump of expression @ ");
gdb_print_host_address (exp, stream);
- fprintf_filtered (stream, ", %s:\nExpression: `", note);
- if (exp->elts[0].opcode != OP_TYPE)
- print_expression (exp, stream);
- else
- fprintf_filtered (stream, "Type printing not yet supported....");
fprintf_filtered (stream, "'\n\tLanguage %s, %d elements, %ld bytes each.\n",
exp->language_defn->la_name, exp->nelts,
(long) sizeof (union exp_element));
@@ -760,7 +771,7 @@ dump_prefix_expression (struct expression *exp, struct ui_file *stream,
for (elt = 0; elt < exp->nelts; elt++)
{
fprintf_filtered (stream, "\t%5d ", elt);
- opcode_name = op_name (exp->elts[elt].opcode);
+ opcode_name = op_name (exp, exp->elts[elt].opcode);
fprintf_filtered (stream, "%20s ", opcode_name);
print_longest (stream, 'd', 0, exp->elts[elt].longconst);
@@ -778,10 +789,11 @@ dump_prefix_expression (struct expression *exp, struct ui_file *stream,
}
}
-static int dump_subexp (struct expression *exp, struct ui_file *stream,
- int elt);
+/* Dump the subexpression of prefix expression EXP whose operator is at
+ position ELT onto STREAM. Returns the position of the next
+ subexpression in EXP. */
-static int
+int
dump_subexp (struct expression *exp, struct ui_file *stream, int elt)
{
static int indent = 0;
@@ -794,9 +806,34 @@ dump_subexp (struct expression *exp, struct ui_file *stream, int elt)
fprintf_filtered (stream, " ");
indent += 2;
- fprintf_filtered (stream, "%-20s ", op_name (exp->elts[elt].opcode));
+ fprintf_filtered (stream, "%-20s ", op_name (exp, exp->elts[elt].opcode));
- switch (exp->elts[elt++].opcode)
+ elt = dump_subexp_body (exp, stream, elt);
+
+ indent -= 2;
+
+ return elt;
+}
+
+/* Dump the operands of prefix expression EXP whose opcode is at
+ position ELT onto STREAM. Returns the position of the next
+ subexpression in EXP. */
+
+static int
+dump_subexp_body (struct expression *exp, struct ui_file *stream, int elt)
+{
+ return exp->language_defn->la_exp_desc->dump_subexp_body (exp, stream, elt);
+}
+
+/* Default value for subexp_body in exp_descriptor vector. */
+
+int
+dump_subexp_body_standard (struct expression *exp,
+ struct ui_file *stream, int elt)
+{
+ int opcode = exp->elts[elt++].opcode;
+
+ switch (opcode)
{
case TERNOP_COND:
case TERNOP_SLICE:
@@ -914,7 +951,7 @@ dump_subexp (struct expression *exp, struct ui_file *stream, int elt)
break;
case OP_FUNCALL:
{
- int nargs;
+ int i, nargs;
nargs = longest_to_int (exp->elts[elt].longconst);
@@ -1006,20 +1043,17 @@ dump_subexp (struct expression *exp, struct ui_file *stream, int elt)
fprintf_filtered (stream, "Unknown format");
}
- indent -= 2;
-
return elt;
}
void
-dump_postfix_expression (struct expression *exp, struct ui_file *stream,
- char *note)
+dump_prefix_expression (struct expression *exp, struct ui_file *stream)
{
int elt;
fprintf_filtered (stream, "Dump of expression @ ");
gdb_print_host_address (exp, stream);
- fprintf_filtered (stream, ", %s:\nExpression: `", note);
+ fputs_filtered (", after conversion to prefix form:\nExpression: `", stream);
if (exp->elts[0].opcode != OP_TYPE)
print_expression (exp, stream);
else
diff --git a/gdb/expression.h b/gdb/expression.h
index da95fcb..03b45c2 100644
--- a/gdb/expression.h
+++ b/gdb/expression.h
@@ -322,7 +322,27 @@ enum exp_opcode
OP_EXPRSTRING,
/* An Objective C Foundation Class NSString constant */
- OP_OBJC_NSSTRING
+ OP_OBJC_NSSTRING,
+
+ /* First extension operator. Individual language modules define
+ extra operators they need as constants with values
+ OP_LANGUAGE_SPECIFIC0 + k, for k >= 0, using a separate
+ enumerated type definition:
+ enum foo_extension_operator {
+ BINOP_MOGRIFY = OP_EXTENDED0,
+ BINOP_FROB,
+ ...
+ }; */
+ OP_EXTENDED0,
+
+ /* Last possible extension operator. Defined to provide an
+ explicit and finite number of extended operators. */
+ OP_EXTENDED_LAST = 0xff
+ /* NOTE: Eventually, we expect to convert to an object-oriented
+ formulation for expression operators that does away with the
+ need for these extension operators, and indeed for this
+ entire enumeration type. Therefore, consider the OP_EXTENDED
+ definitions to be a temporary measure. */
};
union exp_element
@@ -393,11 +413,7 @@ extern void print_expression (struct expression *, struct ui_file *);
extern char *op_string (enum exp_opcode);
-extern void dump_prefix_expression (struct expression *,
- struct ui_file *,
- char *);
-extern void dump_postfix_expression (struct expression *,
- struct ui_file *,
- char *);
+extern void dump_raw_expression (struct expression *, struct ui_file *, char *);
+extern void dump_prefix_expression (struct expression *, struct ui_file *);
#endif /* !defined (EXPRESSION_H) */
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 495ec6a..308e807 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -476,7 +476,7 @@ variable: name_not_typename
else
{
struct minimal_symbol *msymbol;
- register char *arg = copy_name ($1.stoken);
+ char *arg = copy_name ($1.stoken);
msymbol =
lookup_minimal_symbol_linkage_or_natural (arg);
@@ -641,15 +641,15 @@ name_not_typename : NAME
static int
parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
+ char *p;
+ int len;
int parsed_float;
YYSTYPE *putithere;
{
- register LONGEST n = 0;
- register LONGEST prevn = 0;
- register int c;
- register int base = input_radix;
+ LONGEST n = 0;
+ LONGEST prevn = 0;
+ int c;
+ int base = input_radix;
int unsigned_p = 0;
int long_p = 0;
ULONGEST high_bit;
@@ -944,8 +944,8 @@ yylex ()
{
for (i = 0; boolean_values[i].name != NULL; i++)
{
- if STREQN (tokstart, boolean_values[i].name,
- strlen (boolean_values[i].name))
+ if (strncmp (tokstart, boolean_values[i].name,
+ strlen (boolean_values[i].name)) == 0)
{
lexptr += strlen (boolean_values[i].name);
yylval.lval = boolean_values[i].value;
@@ -957,7 +957,7 @@ yylex ()
/* See if it is a special .foo. operator */
for (i = 0; dot_ops[i].operator != NULL; i++)
- if (STREQN (tokstart, dot_ops[i].operator, strlen (dot_ops[i].operator)))
+ if (strncmp (tokstart, dot_ops[i].operator, strlen (dot_ops[i].operator)) == 0)
{
lexptr += strlen (dot_ops[i].operator);
yylval.opcode = dot_ops[i].opcode;
@@ -1018,7 +1018,7 @@ yylex ()
{
/* It's a number. */
int got_dot = 0, got_e = 0, got_d = 0, toktype;
- register char *p = tokstart;
+ char *p = tokstart;
int hex = input_radix > 10;
if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
@@ -1114,8 +1114,8 @@ yylex ()
/* Catch specific keywords. */
for (i = 0; f77_keywords[i].operator != NULL; i++)
- if (STREQN(tokstart, f77_keywords[i].operator,
- strlen(f77_keywords[i].operator)))
+ if (strncmp (tokstart, f77_keywords[i].operator,
+ strlen(f77_keywords[i].operator)) == 0)
{
/* lexptr += strlen(f77_keywords[i].operator); */
yylval.opcode = f77_keywords[i].opcode;
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 52f56b3..9ad4792 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -462,9 +462,9 @@ const struct language_defn f_language_defn =
range_check_on,
type_check_on,
case_sensitive_off,
+ &exp_descriptor_standard,
f_parse, /* parser */
f_error, /* parser error function */
- evaluate_subexp_standard,
f_printchar, /* Print character constant */
f_printstr, /* function to print string constant */
f_emit_char, /* Function to print a single character */
@@ -484,6 +484,7 @@ const struct language_defn f_language_defn =
0, /* arrays are first-class (not c-style) */
1, /* String lower bound */
&builtin_type_f_character, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
@@ -672,8 +673,8 @@ add_common_block (char *name, CORE_ADDR offset, int secnum, char *func_stab)
parser have fits. */
- if (STREQ (name, BLANK_COMMON_NAME_ORIGINAL) ||
- STREQ (name, BLANK_COMMON_NAME_MF77))
+ if (strcmp (name, BLANK_COMMON_NAME_ORIGINAL) == 0
+ || strcmp (name, BLANK_COMMON_NAME_MF77) == 0)
{
xfree (name);
@@ -776,7 +777,7 @@ find_first_common_named (char *name)
while (tmp != NULL)
{
- if (STREQ (tmp->name, name))
+ if (strcmp (tmp->name, name) == 0)
return (tmp);
else
tmp = tmp->next;
@@ -847,8 +848,8 @@ patch_all_commons_by_name (char *name, CORE_ADDR offset, int secnum)
/* For blank common blocks, change the canonical reprsentation
of a blank name */
- if ((STREQ (name, BLANK_COMMON_NAME_ORIGINAL)) ||
- (STREQ (name, BLANK_COMMON_NAME_MF77)))
+ if (strcmp (name, BLANK_COMMON_NAME_ORIGINAL) == 0
+ || strcmp (name, BLANK_COMMON_NAME_MF77) == 0)
{
xfree (name);
name = alloca (strlen (BLANK_COMMON_NAME_LOCAL) + 1);
@@ -860,7 +861,7 @@ patch_all_commons_by_name (char *name, CORE_ADDR offset, int secnum)
while (tmp != NULL)
{
if (COMMON_NEEDS_PATCHING (tmp))
- if (STREQ (tmp->name, name))
+ if (strcmp (tmp->name, name) == 0)
patch_common_entries (tmp, offset, secnum);
tmp = tmp->next;
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
index f6b4263..2a6d232 100644
--- a/gdb/f-typeprint.c
+++ b/gdb/f-typeprint.c
@@ -330,6 +330,11 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
break;
+ case TYPE_CODE_REF:
+ fprintf_filtered (stream, "REF TO -> ( ");
+ f_type_print_base (TYPE_TARGET_TYPE (type), stream, 0, level);
+ break;
+
case TYPE_CODE_VOID:
fprintf_filtered (stream, "VOID");
break;
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index cc337e9..805590f 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -276,6 +276,7 @@ f77_create_arrayprint_offset_tbl (struct type *type, struct ui_file *stream)
/* Actual function which prints out F77 arrays, Valaddr == address in
the superior. Address == the address in the inferior. */
+
static void
f77_print_array_1 (int nss, int ndimensions, struct type *type, char *valaddr,
CORE_ADDR address, struct ui_file *stream, int format,
@@ -295,13 +296,13 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type, char *valaddr,
stream, format, deref_ref, recurse, pretty, elts);
fprintf_filtered (stream, ") ");
}
- if (*elts >= print_max && i < F77_DIM_SIZE (nss)) {
+ if (*elts >= print_max && i < F77_DIM_SIZE (nss))
fprintf_filtered (stream, "...");
- }
}
else
{
- for (i = 0; (i < F77_DIM_SIZE (nss) && (*elts) < print_max); i++, (*elts)++)
+ for (i = 0; i < F77_DIM_SIZE (nss) && (*elts) < print_max;
+ i++, (*elts)++)
{
val_print (TYPE_TARGET_TYPE (type),
valaddr + i * F77_DIM_OFFSET (ndimensions),
@@ -312,7 +313,7 @@ f77_print_array_1 (int nss, int ndimensions, struct type *type, char *valaddr,
if (i != (F77_DIM_SIZE (nss) - 1))
fprintf_filtered (stream, ", ");
- if ((( *elts) == print_max - 1) && (i != (F77_DIM_SIZE (nss) - 1)))
+ if ((*elts == print_max - 1) && (i != (F77_DIM_SIZE (nss) - 1)))
fprintf_filtered (stream, "...");
}
}
@@ -383,11 +384,7 @@ f_val_print (struct type *type, char *valaddr, int embedded_offset,
deref_ref, recurse, pretty);
fprintf_filtered (stream, ")");
break;
-#if 0
- /* Array of unspecified length: treat like pointer to first elt. */
- valaddr = (char *) &address;
- /* FALL THROUGH */
-#endif
+
case TYPE_CODE_PTR:
if (format && format != 's')
{
@@ -408,7 +405,7 @@ f_val_print (struct type *type, char *valaddr, int embedded_offset,
}
if (addressprint && format != 's')
- fprintf_filtered (stream, "0x%s", paddr_nz (addr));
+ print_address_numeric (addr, 1, stream);
/* For a pointer to char or unsigned char, also print the string
pointed to, unless pointer is null. */
@@ -418,9 +415,47 @@ f_val_print (struct type *type, char *valaddr, int embedded_offset,
&& addr != 0)
i = val_print_string (addr, -1, TYPE_LENGTH (elttype), stream);
- /* Return number of characters printed, plus one for the
- terminating null if we have "reached the end". */
- return (i + (print_max && i != print_max));
+ /* Return number of characters printed, including the terminating
+ '\0' if we reached the end. val_print_string takes care including
+ the terminating '\0' if necessary. */
+ return i;
+ }
+ break;
+
+ case TYPE_CODE_REF:
+ elttype = check_typedef (TYPE_TARGET_TYPE (type));
+ if (addressprint)
+ {
+ CORE_ADDR addr
+ = extract_typed_address (valaddr + embedded_offset, type);
+ fprintf_filtered (stream, "@");
+ print_address_numeric (addr, 1, stream);
+ if (deref_ref)
+ fputs_filtered (": ", stream);
+ }
+ /* De-reference the reference. */
+ if (deref_ref)
+ {
+ if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
+ {
+ struct value *deref_val =
+ value_at
+ (TYPE_TARGET_TYPE (type),
+ unpack_pointer (lookup_pointer_type (builtin_type_void),
+ valaddr + embedded_offset),
+ NULL);
+ val_print (VALUE_TYPE (deref_val),
+ VALUE_CONTENTS (deref_val),
+ 0,
+ VALUE_ADDRESS (deref_val),
+ stream,
+ format,
+ deref_ref,
+ recurse,
+ pretty);
+ }
+ else
+ fputs_filtered ("???", stream);
}
break;
diff --git a/gdb/fbsd-proc.c b/gdb/fbsd-proc.c
index 6c47979..16813a9 100644
--- a/gdb/fbsd-proc.c
+++ b/gdb/fbsd-proc.c
@@ -1,5 +1,6 @@
/* FreeBSD-specific methods for using the /proc file system.
- Copyright 2002 Free Software Foundation, Inc.
+
+ Copyright 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -48,34 +49,29 @@ child_pid_to_exec_file (int pid)
}
static int
-read_mapping (FILE *mapfile,
- unsigned long *start,
- unsigned long *end,
+read_mapping (FILE *mapfile, unsigned long *start, unsigned long *end,
char *protection)
{
+ /* FreeBSD 5.1-RELEASE uses a 256-byte buffer. */
+ char buf[256];
int resident, privateresident;
unsigned long obj;
- int ref_count, shadow_count;
- unsigned flags;
- char cow[5], access[4];
- char type[8];
- int ret;
-
- /* The layout is described in /usr/src/miscfs/procfs/procfs_map.c. */
- ret = fscanf (mapfile, "%lx %lx %d %d %lx %s %d %d %x %s %s %s\n",
- start, end,
- &resident, &privateresident, &obj,
- protection,
- &ref_count, &shadow_count, &flags, cow, access, type);
+ int ret = EOF;
+
+ /* As of FreeBSD 5.0-RELEASE, the layout is described in
+ /usr/src/sys/fs/procfs/procfs_map.c. Somewhere in 5.1-CURRENT a
+ new column was added to the procfs map. Therefore we can't use
+ fscanf since we need to support older releases too. */
+ if (fgets (buf, sizeof buf, mapfile) != NULL)
+ ret = sscanf (buf, "%lx %lx %d %d %lx %s", start, end,
+ &resident, &privateresident, &obj, protection);
return (ret != 0 && ret != EOF);
}
static int
-fbsd_find_memory_regions (int (*func) (CORE_ADDR,
- unsigned long,
- int, int, int,
- void *),
+fbsd_find_memory_regions (int (*func) (CORE_ADDR, unsigned long,
+ int, int, int, void *),
void *obfd)
{
pid_t pid = ptid_get_pid (inferior_ptid);
@@ -127,21 +123,20 @@ fbsd_make_corefile_notes (bfd *obfd, int *note_size)
gregset_t gregs;
fpregset_t fpregs;
char *note_data = NULL;
+ Elf_Internal_Ehdr *i_ehdrp;
+
+ /* 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);
- note_data = (char *) elfcore_write_prstatus (obfd,
- note_data,
- note_size,
- ptid_get_pid (inferior_ptid),
- stop_signal,
- &gregs);
+ note_data = elfcore_write_prstatus (obfd, note_data, note_size,
+ ptid_get_pid (inferior_ptid),
+ stop_signal, &gregs);
fill_fpregset (&fpregs, -1);
- note_data = (char *) elfcore_write_prfpreg (obfd,
- note_data,
- note_size,
- &fpregs,
- sizeof (fpregs));
+ note_data = elfcore_write_prfpreg (obfd, note_data, note_size,
+ &fpregs, sizeof (fpregs));
if (get_exec_file (0))
{
@@ -151,11 +146,8 @@ fbsd_make_corefile_notes (bfd *obfd, int *note_size)
if (get_inferior_args ())
psargs = reconcat (psargs, psargs, " ", get_inferior_args (), NULL);
- note_data = (char *) elfcore_write_prpsinfo (obfd,
- note_data,
- note_size,
- fname,
- psargs);
+ note_data = elfcore_write_prpsinfo (obfd, note_data, note_size,
+ fname, psargs);
}
make_cleanup (xfree, note_data);
diff --git a/gdb/findvar.c b/gdb/findvar.c
index 1489978..dc82bfe 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -289,16 +289,16 @@ value_of_register (int regnum, struct frame_info *frame)
DEPRECATED_REGISTER_CONVERT_TO_VIRTUAL (regnum, register_type (current_gdbarch, regnum),
raw_buffer, VALUE_CONTENTS_RAW (reg_val));
}
- else if (REGISTER_RAW_SIZE (regnum) == REGISTER_VIRTUAL_SIZE (regnum))
+ else if (DEPRECATED_REGISTER_RAW_SIZE (regnum) == DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum))
memcpy (VALUE_CONTENTS_RAW (reg_val), raw_buffer,
- REGISTER_RAW_SIZE (regnum));
+ 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,
- REGISTER_RAW_SIZE (regnum),
- REGISTER_VIRTUAL_SIZE (regnum));
+ DEPRECATED_REGISTER_RAW_SIZE (regnum),
+ DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
VALUE_LVAL (reg_val) = lval;
VALUE_ADDRESS (reg_val) = addr;
VALUE_REGNO (reg_val) = regnum;
@@ -647,7 +647,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 += REGISTER_RAW_SIZE (local_regnum),
+ (value_bytes_copied += DEPRECATED_REGISTER_RAW_SIZE (local_regnum),
++local_regnum))
{
int realnum;
@@ -713,9 +713,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 < REGISTER_RAW_SIZE (regnum))
+ && len < DEPRECATED_REGISTER_RAW_SIZE (regnum))
/* Big-endian, and we want less than full size. */
- VALUE_OFFSET (v) = REGISTER_RAW_SIZE (regnum) - len;
+ VALUE_OFFSET (v) = DEPRECATED_REGISTER_RAW_SIZE (regnum) - len;
else
VALUE_OFFSET (v) = 0;
memcpy (VALUE_CONTENTS_RAW (v), value_bytes + VALUE_OFFSET (v), len);
diff --git a/gdb/frame.c b/gdb/frame.c
index 4e88018..a405a6b 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -65,7 +65,7 @@ struct frame_info
/* The frame's type. */
/* FIXME: cagney/2003-04-02: Should instead be returning
- ->unwind->type. Unfortunatly, legacy code is still explicitly
+ ->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;
@@ -144,9 +144,10 @@ static unsigned int backtrace_limit = UINT_MAX;
void
fprint_frame_id (struct ui_file *file, struct frame_id id)
{
- fprintf_unfiltered (file, "{stack=0x%s,code=0x%s}",
+ 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.code_addr),
+ paddr_nz (id.special_addr));
}
static void
@@ -234,7 +235,7 @@ get_frame_id (struct frame_info *fi)
fi->unwind = frame_unwind_find_by_frame (fi->next);
/* FIXME: cagney/2003-04-02: Rather than storing the frame's
type in the frame, the unwinder's type should be returned
- directly. Unfortunatly, legacy code, called by
+ directly. Unfortunately, legacy code, called by
legacy_get_prev_frame, explicitly set the frames type
using the method deprecated_set_frame_type(). */
gdb_assert (fi->unwind->type != UNKNOWN_FRAME);
@@ -256,14 +257,22 @@ get_frame_id (struct frame_info *fi)
const struct frame_id null_frame_id; /* All zeros. */
struct frame_id
-frame_id_build (CORE_ADDR stack_addr, CORE_ADDR code_addr)
+frame_id_build_special (CORE_ADDR stack_addr, CORE_ADDR code_addr,
+ CORE_ADDR special_addr)
{
struct frame_id id;
id.stack_addr = stack_addr;
id.code_addr = code_addr;
+ id.special_addr = special_addr;
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);
+}
+
int
frame_id_p (struct frame_id l)
{
@@ -292,8 +301,14 @@ frame_id_eq (struct frame_id l, struct frame_id r)
else if (l.code_addr == 0 || r.code_addr == 0)
/* A zero code addr is a wild card, always succeed. */
eq = 1;
- else if (l.code_addr == r.code_addr)
- /* The .stack and .code are identical, the ID's are identical. */
+ 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. */
+ eq = 1;
+ else if (l.special_addr == r.special_addr)
+ /* Frames are equal. */
eq = 1;
else
/* No luck. */
@@ -320,7 +335,7 @@ frame_id_inner (struct frame_id l, struct frame_id r)
/* Only return non-zero when strictly inner than. Note that, per
comment in "frame.h", there is some fuzz here. Frameless
functions are not strictly inner than (same .stack but
- different .code). */
+ different .code and/or .special address). */
inner = INNER_THAN (l.stack_addr, r.stack_addr);
if (frame_debug)
{
@@ -477,7 +492,7 @@ frame_pop (struct frame_info *this_frame)
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. Unfortunatly, they don't implement it. Their
+ 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.
@@ -524,7 +539,7 @@ frame_register_unwind (struct frame_info *frame, int regnum,
frame->unwind = frame_unwind_find_by_frame (frame->next);
/* FIXME: cagney/2003-04-02: Rather than storing the frame's
type in the frame, the unwinder's type should be returned
- directly. Unfortunatly, legacy code, called by
+ directly. Unfortunately, legacy code, called by
legacy_get_prev_frame, explicitly set the frames type using
the method deprecated_set_frame_type(). */
gdb_assert (frame->unwind->type != UNKNOWN_FRAME);
@@ -629,7 +644,7 @@ 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, REGISTER_VIRTUAL_SIZE (regnum));
+ return extract_signed_integer (buf, DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
}
LONGEST
@@ -643,7 +658,7 @@ 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, REGISTER_VIRTUAL_SIZE (regnum));
+ return extract_unsigned_integer (buf, DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
}
ULONGEST
@@ -658,7 +673,7 @@ frame_unwind_signed_register (struct frame_info *frame, int regnum,
{
char buf[MAX_REGISTER_SIZE];
frame_unwind_register (frame, regnum, buf);
- (*val) = extract_signed_integer (buf, REGISTER_VIRTUAL_SIZE (regnum));
+ (*val) = extract_signed_integer (buf, DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
}
void
@@ -667,48 +682,7 @@ 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, REGISTER_VIRTUAL_SIZE (regnum));
-}
-
-void
-frame_read_register (struct frame_info *frame, int regnum, void *buf)
-{
- gdb_assert (frame != NULL && frame->next != NULL);
- frame_unwind_register (frame->next, regnum, buf);
-}
-
-void
-frame_read_unsigned_register (struct frame_info *frame, int regnum,
- ULONGEST *val)
-{
- /* NOTE: cagney/2002-10-31: There is a bit of dogma here - there is
- always a frame. Both this, and the equivalent
- frame_read_signed_register() function, can only be called with a
- valid frame. If, for some reason, this function is called
- without a frame then the problem isn't here, but rather in the
- caller. It should of first created a frame and then passed that
- in. */
- /* NOTE: cagney/2002-10-31: As a side bar, keep in mind that the
- ``current_frame'' should not be treated as a special case. While
- ``get_next_frame (current_frame) == NULL'' currently holds, it
- should, as far as possible, not be relied upon. In the future,
- ``get_next_frame (current_frame)'' may instead simply return a
- normal frame object that simply always gets register values from
- the register cache. Consequently, frame code should try to avoid
- tests like ``if get_next_frame() == NULL'' and instead just rely
- on recursive frame calls (like the below code) when manipulating
- a frame chain. */
- gdb_assert (frame != NULL && frame->next != NULL);
- frame_unwind_unsigned_register (frame->next, regnum, val);
-}
-
-void
-frame_read_signed_register (struct frame_info *frame, int regnum,
- LONGEST *val)
-{
- /* See note above in frame_read_unsigned_register(). */
- gdb_assert (frame != NULL && frame->next != NULL);
- frame_unwind_signed_register (frame->next, regnum, val);
+ (*val) = extract_unsigned_integer (buf, DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
}
void
@@ -744,7 +718,8 @@ 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 REGISTER_RAW_SIZE (REGNUM).
+ The number of bytes copied is DEPRECATED_REGISTER_RAW_SIZE
+ (REGNUM).
Returns 0 if the register value could not be found. */
@@ -844,7 +819,7 @@ frame_saved_regs_zalloc (struct frame_info *fi)
}
CORE_ADDR *
-get_frame_saved_regs (struct frame_info *fi)
+deprecated_get_frame_saved_regs (struct frame_info *fi)
{
return fi->saved_regs;
}
@@ -978,7 +953,7 @@ legacy_saved_regs_prev_register (struct frame_info *next_frame,
int *realnump, void *bufferp)
{
/* HACK: New code is passed the next frame and this cache.
- Unfortunatly, old code expects this frame. Since this is a
+ 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.
@@ -986,16 +961,16 @@ legacy_saved_regs_prev_register (struct frame_info *next_frame,
struct frame_info *frame = next_frame->prev;
gdb_assert (frame != NULL);
- if (get_frame_saved_regs (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 (get_frame_saved_regs (frame) != NULL);
+ gdb_assert (deprecated_get_frame_saved_regs (frame) != NULL);
}
- if (get_frame_saved_regs (frame) != NULL
- && get_frame_saved_regs (frame)[regnum] != 0)
+ if (deprecated_get_frame_saved_regs (frame) != NULL
+ && deprecated_get_frame_saved_regs (frame)[regnum] != 0)
{
if (regnum == SP_REGNUM)
{
@@ -1007,8 +982,8 @@ legacy_saved_regs_prev_register (struct frame_info *next_frame,
if (bufferp != NULL)
/* NOTE: cagney/2003-05-09: In-lined store_address with
it's body - store_unsigned_integer. */
- store_unsigned_integer (bufferp, REGISTER_RAW_SIZE (regnum),
- get_frame_saved_regs (frame)[regnum]);
+ store_unsigned_integer (bufferp, DEPRECATED_REGISTER_RAW_SIZE (regnum),
+ deprecated_get_frame_saved_regs (frame)[regnum]);
}
else
{
@@ -1016,7 +991,7 @@ legacy_saved_regs_prev_register (struct frame_info *next_frame,
a local copy of its value. */
*optimizedp = 0;
*lvalp = lval_memory;
- *addrp = get_frame_saved_regs (frame)[regnum];
+ *addrp = deprecated_get_frame_saved_regs (frame)[regnum];
*realnump = -1;
if (bufferp != NULL)
{
@@ -1034,15 +1009,15 @@ legacy_saved_regs_prev_register (struct frame_info *next_frame,
if (regs[regnum] == NULL)
{
regs[regnum]
- = frame_obstack_zalloc (REGISTER_RAW_SIZE (regnum));
- read_memory (get_frame_saved_regs (frame)[regnum], regs[regnum],
- REGISTER_RAW_SIZE (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], REGISTER_RAW_SIZE (regnum));
+ memcpy (bufferp, regs[regnum], DEPRECATED_REGISTER_RAW_SIZE (regnum));
#else
/* Read the value in from memory. */
- read_memory (get_frame_saved_regs (frame)[regnum], bufferp,
- REGISTER_RAW_SIZE (regnum));
+ read_memory (deprecated_get_frame_saved_regs (frame)[regnum], bufferp,
+ DEPRECATED_REGISTER_RAW_SIZE (regnum));
#endif
}
}
@@ -1139,8 +1114,8 @@ deprecated_generic_get_saved_register (char *raw_buffer, int *optimized,
}
DEPRECATED_FRAME_INIT_SAVED_REGS (frame);
- if (get_frame_saved_regs (frame) != NULL
- && get_frame_saved_regs (frame)[regnum] != 0)
+ 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;
@@ -1150,16 +1125,16 @@ deprecated_generic_get_saved_register (char *raw_buffer, int *optimized,
/* NOTE: cagney/2003-05-09: In-line store_address
with it's body - store_unsigned_integer. */
store_unsigned_integer (raw_buffer,
- REGISTER_RAW_SIZE (regnum),
- get_frame_saved_regs (frame)[regnum]);
+ DEPRECATED_REGISTER_RAW_SIZE (regnum),
+ deprecated_get_frame_saved_regs (frame)[regnum]);
}
else
{
if (addrp) /* any other register */
- *addrp = get_frame_saved_regs (frame)[regnum];
+ *addrp = deprecated_get_frame_saved_regs (frame)[regnum];
if (raw_buffer)
- read_memory (get_frame_saved_regs (frame)[regnum], raw_buffer,
- REGISTER_RAW_SIZE (regnum));
+ read_memory (deprecated_get_frame_saved_regs (frame)[regnum], raw_buffer,
+ DEPRECATED_REGISTER_RAW_SIZE (regnum));
}
return;
}
@@ -1334,7 +1309,7 @@ legacy_get_prev_frame (struct frame_info *this_frame)
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.
- Unfortunatly those same work-arounds rely on the type defaulting
+ 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;
@@ -1444,7 +1419,7 @@ legacy_get_prev_frame (struct frame_info *this_frame)
/* 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. Unfortunatly legacy targets can't use
+ 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
@@ -1531,7 +1506,7 @@ legacy_get_prev_frame (struct frame_info *this_frame)
prev->unwind = frame_unwind_find_by_frame (this_frame->next);
/* FIXME: cagney/2003-04-02: Rather than storing the frame's
type in the frame, the unwinder's type should be returned
- directly. Unfortunatly, legacy code, called by
+ 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;
@@ -2184,7 +2159,7 @@ get_frame_type (struct frame_info *frame)
frame->unwind = frame_unwind_find_by_frame (frame->next);
/* FIXME: cagney/2003-04-02: Rather than storing the frame's
type in the frame, the unwinder's type should be returned
- directly. Unfortunatly, legacy code, called by
+ directly. Unfortunately, legacy code, called by
legacy_get_prev_frame, explicitly set the frames type using
the method deprecated_set_frame_type(). */
gdb_assert (frame->unwind->type != UNKNOWN_FRAME);
diff --git a/gdb/frame.h b/gdb/frame.h
index 7ce81d0..c31f41e 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -95,8 +95,6 @@ struct frame_id
is used. Watch out for all the legacy targets that still use the
function pointer register or stack pointer register. They are
wrong. */
- /* NOTE: cagney/2002-11-16: The ia64 has two stacks and hence two
- frame bases. This will need to be expanded to accomodate that. */
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)
@@ -104,15 +102,33 @@ struct frame_id
Typically, it is set to the address of the entry point of the
frame's function (as returned by frame_func_unwind(). */
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. */
+ CORE_ADDR special_addr;
};
/* Methods for constructing and comparing Frame IDs.
- NOTE: Given frameless functions A and B, where A calls B (and hence
+ NOTE: Given stackless functions A and B, where A calls B (and hence
B is inner-to A). The relationships: !eq(A,B); !eq(B,A);
- !inner(A,B); !inner(B,A); all hold. This is because, while B is
- inner to A, B is not strictly inner to A (being frameless, they
- have the same .base value). */
+ !inner(A,B); !inner(B,A); all hold.
+
+ This is because, while B is inner-to A, B is not strictly inner-to A.
+ Being stackless, they have an identical .stack_addr value, and differ
+ only by their unordered .code_addr and/or .special_addr values.
+
+ Because frame_id_inner is only used as a safety net (e.g.,
+ detect a corrupt stack) the lack of strictness is not a problem.
+ Code needing to determine an exact relationship between two frames
+ must instead use frame_id_eq and frame_id_unwind. For instance,
+ in the above, to determine that A stepped-into B, the equation
+ "A.id != B.id && A.id == id_unwind (B)" can be used. */
/* For convenience. All fields are zero. */
extern const struct frame_id null_frame_id;
@@ -120,10 +136,21 @@ 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). */
+ to indicate a wild card). The special identifier address is
+ defaulted to zero. */
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). */
+extern struct frame_id frame_id_build_special (CORE_ADDR stack_addr,
+ CORE_ADDR code_addr,
+ CORE_ADDR special_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);
@@ -398,22 +425,6 @@ extern void frame_register (struct frame_info *frame, int regnum,
CORE_ADDR *addrp, int *realnump,
void *valuep);
-/* More convenient interface to frame_register(). */
-/* NOTE: cagney/2002-09-13: Return void as one day these functions may
- be changed to return an indication that the read succeeded. */
-
-/* Use get_frame_register. */
-extern void frame_read_register (struct frame_info *frame, int regnum,
- void *buf);
-
-/* Use get_frame_register_signed. */
-extern void frame_read_signed_register (struct frame_info *frame,
- int regnum, LONGEST *val);
-
-/* Use get_frame_register_unsigned. */
-extern void frame_read_unsigned_register (struct frame_info *frame,
- int regnum, ULONGEST *val);
-
/* The reverse. Store a register value relative to the specified
frame. Note: this call makes the frame's state undefined. The
register and frame caches must be flushed. */
@@ -591,11 +602,11 @@ extern void deprecated_generic_get_saved_register (char *, int *, CORE_ADDR *,
extern void generic_save_call_dummy_addr (CORE_ADDR lo, CORE_ADDR hi);
/* FIXME: cagney/2003-02-02: Should be deprecated or replaced with a
- function called frame_read_register_p(). This slightly weird (and
- older) variant of frame_read_register() returns zero (indicating
- the register is unavailable) if either: the register isn't cached;
- or the register has been optimized out. Problem is, neither check
- is exactly correct. A register can't be optimized out (it may not
+ function called get_frame_register_p(). This slightly weird (and
+ older) variant of get_frame_register() returns zero (indicating the
+ register is unavailable) if either: the register isn't cached; or
+ the register has been optimized out. Problem is, neither check is
+ exactly correct. A register can't be optimized out (it may not
have been saved as part of a function call); The fact that a
register isn't in the register cache doesn't mean that the register
isn't available (it could have been fetched from memory). */
@@ -618,7 +629,7 @@ extern void return_command (char *, int);
You might think that the below global can simply be replaced by a
call to either get_selected_frame() or select_frame().
- Unfortunatly, it isn't that easy.
+ 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
@@ -671,7 +682,7 @@ extern struct frame_extra_info *get_frame_extra_info (struct frame_info *fi);
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 *get_frame_saved_regs (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
@@ -682,8 +693,8 @@ extern void deprecated_update_frame_pc_hack (struct frame_info *frame,
CORE_ADDR pc);
/* FIXME: cagney/2002-12-18: Has the frame's base changed? Or to be
- more exact, whas that initial guess at the frame's base as returned
- by deprecated_read_fp() wrong. If it was, fix it. This shouldn't
+ 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
be necessary since the code should be getting the frame's base
correct from the outset.
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index fe53e56..e08ebe4 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -30,6 +30,10 @@
#include "frame-base.h"
#include "trad-frame.h"
#include "dis-asm.h"
+#include "gdb_assert.h"
+#include "sim-regno.h"
+#include "gdb/sim-frv.h"
+#include "opcodes/frv-desc.h" /* for the H_SPR_... enums */
extern void _initialize_frv_tdep (void);
@@ -37,19 +41,15 @@ static gdbarch_init_ftype frv_gdbarch_init;
static gdbarch_register_name_ftype frv_register_name;
static gdbarch_breakpoint_from_pc_ftype frv_breakpoint_from_pc;
+static gdbarch_adjust_breakpoint_address_ftype frv_gdbarch_adjust_breakpoint_address;
static gdbarch_skip_prologue_ftype frv_skip_prologue;
-static gdbarch_deprecated_extract_return_value_ftype frv_extract_return_value;
-static gdbarch_deprecated_extract_struct_value_address_ftype frv_extract_struct_value_address;
static gdbarch_frameless_function_invocation_ftype frv_frameless_function_invocation;
static gdbarch_deprecated_push_arguments_ftype frv_push_arguments;
static gdbarch_deprecated_saved_pc_after_call_ftype frv_saved_pc_after_call;
-/* Register numbers. You can change these as needed, but don't forget
- to update the simulator accordingly. */
+/* Register numbers. The order in which these appear define the
+ remote protocol, so take care in changing them. */
enum {
- /* The total number of registers we know exist. */
- frv_num_regs = 147,
-
/* Register numbers 0 -- 63 are always reserved for general-purpose
registers. The chip at hand may have less. */
first_gpr_regnum = 0,
@@ -63,10 +63,12 @@ enum {
first_fpr_regnum = 64,
last_fpr_regnum = 127,
- /* Register numbers 128 on up are always reserved for special-purpose
- registers. */
- first_spr_regnum = 128,
+ /* The PC register. */
pc_regnum = 128,
+
+ /* Register numbers 129 on up are always reserved for special-purpose
+ registers. */
+ first_spr_regnum = 129,
psr_regnum = 129,
ccr_regnum = 130,
cccr_regnum = 131,
@@ -78,7 +80,21 @@ enum {
dbar3_regnum = 140,
lr_regnum = 145,
lcr_regnum = 146,
- last_spr_regnum = 146
+ iacc0h_regnum = 147,
+ iacc0l_regnum = 148,
+ last_spr_regnum = 148,
+
+ /* The total number of registers we know exist. */
+ frv_num_regs = last_spr_regnum + 1,
+
+ /* Pseudo registers */
+ first_pseudo_regnum = frv_num_regs,
+
+ /* iacc0 - the 64-bit concatenation of iacc0h and iacc0l. */
+ iacc0_regnum = first_pseudo_regnum + 0,
+
+ last_pseudo_regnum = iacc0_regnum,
+ frv_num_pseudo_regs = last_pseudo_regnum - first_pseudo_regnum + 1,
};
static LONGEST frv_call_dummy_words[] =
@@ -154,17 +170,14 @@ new_variant (void)
/* By default, don't supply any general-purpose or floating-point
register names. */
- var->register_names = (char **) xmalloc (frv_num_regs * sizeof (char *));
- for (r = 0; r < frv_num_regs; r++)
+ var->register_names
+ = (char **) xmalloc ((frv_num_regs + frv_num_pseudo_regs)
+ * sizeof (char *));
+ for (r = 0; r < frv_num_regs + frv_num_pseudo_regs; r++)
var->register_names[r] = "";
- /* Do, however, supply default names for the special-purpose
+ /* Do, however, supply default names for the known special-purpose
registers. */
- for (r = first_spr_regnum; r <= last_spr_regnum; ++r)
- {
- sprintf (buf, "x%d", r);
- var->register_names[r] = xstrdup (buf);
- }
var->register_names[pc_regnum] = "pc";
var->register_names[lr_regnum] = "lr";
@@ -182,6 +195,11 @@ new_variant (void)
var->register_names[dbar2_regnum] = "dbar2";
var->register_names[dbar3_regnum] = "dbar3";
+ /* iacc0 (Only found on MB93405.) */
+ var->register_names[iacc0h_regnum] = "iacc0h";
+ var->register_names[iacc0l_regnum] = "iacc0l";
+ var->register_names[iacc0_regnum] = "iacc0";
+
return var;
}
@@ -229,38 +247,93 @@ frv_register_name (int reg)
{
if (reg < 0)
return "?toosmall?";
- if (reg >= frv_num_regs)
+ if (reg >= frv_num_regs + frv_num_pseudo_regs)
return "?toolarge?";
return CURRENT_VARIANT->register_names[reg];
}
-static int
-frv_register_raw_size (int reg)
+static struct type *
+frv_register_type (struct gdbarch *gdbarch, int reg)
{
- return 4;
+ if (reg >= first_fpr_regnum && reg <= last_fpr_regnum)
+ return builtin_type_float;
+ else if (reg == iacc0_regnum)
+ return builtin_type_int64;
+ else
+ return builtin_type_int32;
}
-static int
-frv_register_virtual_size (int reg)
+static void
+frv_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+ int reg, void *buffer)
{
- return 4;
+ if (reg == iacc0_regnum)
+ {
+ regcache_raw_read (regcache, iacc0h_regnum, buffer);
+ regcache_raw_read (regcache, iacc0l_regnum, (bfd_byte *) buffer + 4);
+ }
}
-static struct type *
-frv_register_virtual_type (int reg)
+static void
+frv_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
+ int reg, const void *buffer)
{
- if (reg >= 64 && reg <= 127)
- return builtin_type_float;
- else
- return builtin_type_int;
+ if (reg == iacc0_regnum)
+ {
+ regcache_raw_write (regcache, iacc0h_regnum, buffer);
+ regcache_raw_write (regcache, iacc0l_regnum, (bfd_byte *) buffer + 4);
+ }
}
static int
-frv_register_byte (int reg)
+frv_register_sim_regno (int reg)
{
- return (reg * 4);
+ static const int spr_map[] =
+ {
+ H_SPR_PSR, /* psr_regnum */
+ H_SPR_CCR, /* ccr_regnum */
+ H_SPR_CCCR, /* cccr_regnum */
+ -1, /* 132 */
+ -1, /* 133 */
+ -1, /* 134 */
+ H_SPR_TBR, /* tbr_regnum */
+ H_SPR_BRR, /* brr_regnum */
+ H_SPR_DBAR0, /* dbar0_regnum */
+ 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_LR, /* lr_regnum */
+ H_SPR_LCR, /* lcr_regnum */
+ H_SPR_IACC0H, /* iacc0h_regnum */
+ H_SPR_IACC0L /* iacc0l_regnum */
+ };
+
+ gdb_assert (reg >= 0 && reg < NUM_REGS);
+
+ if (first_gpr_regnum <= reg && reg <= last_gpr_regnum)
+ return reg - first_gpr_regnum + SIM_FRV_GR0_REGNUM;
+ else if (first_fpr_regnum <= reg && reg <= last_fpr_regnum)
+ return reg - first_fpr_regnum + SIM_FRV_FR0_REGNUM;
+ else if (pc_regnum == reg)
+ return SIM_FRV_PC_REGNUM;
+ else if (reg >= first_spr_regnum
+ && reg < first_spr_regnum + sizeof (spr_map) / sizeof (spr_map[0]))
+ {
+ int spr_reg_offset = spr_map[reg - first_spr_regnum];
+
+ if (spr_reg_offset < 0)
+ return SIM_REGNO_DOES_NOT_EXIST;
+ else
+ return SIM_FRV_SPR0_REGNUM + spr_reg_offset;
+ }
+
+ internal_error (__FILE__, __LINE__, "Bad register number %d", reg);
}
static const unsigned char *
@@ -271,6 +344,51 @@ frv_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenp)
return breakpoint;
}
+/* Define the maximum number of instructions which may be packed into a
+ bundle (VLIW instruction). */
+static const int max_instrs_per_bundle = 8;
+
+/* Define the size (in bytes) of an FR-V instruction. */
+static const int frv_instr_size = 4;
+
+/* Adjust a breakpoint's address to account for the FR-V architecture's
+ constraint that a break instruction must not appear as any but the
+ first instruction in the bundle. */
+static CORE_ADDR
+frv_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
+{
+ int count = max_instrs_per_bundle;
+ CORE_ADDR addr = bpaddr - frv_instr_size;
+ CORE_ADDR func_start = get_pc_function_start (bpaddr);
+
+ /* Find the end of the previous packing sequence. This will be indicated
+ by either attempting to access some inaccessible memory or by finding
+ an instruction word whose packing bit is set to one. */
+ while (count-- > 0 && addr >= func_start)
+ {
+ char instr[frv_instr_size];
+ int status;
+
+ status = read_memory_nobpt (addr, instr, sizeof instr);
+
+ if (status != 0)
+ break;
+
+ /* This is a big endian architecture, so byte zero will have most
+ significant byte. The most significant bit of this byte is the
+ packing bit. */
+ if (instr[0] & 0x80)
+ break;
+
+ addr -= frv_instr_size;
+ }
+
+ if (count > 0)
+ bpaddr = addr + frv_instr_size;
+
+ return bpaddr;
+}
+
/* Return true if REG is a caller-saves ("scratch") register,
false otherwise. */
@@ -732,20 +850,35 @@ frv_frame_unwind_cache (struct frame_info *next_frame,
}
static void
-frv_extract_return_value (struct type *type, char *regbuf, char *valbuf)
+frv_extract_return_value (struct type *type, struct regcache *regcache,
+ void *valbuf)
{
- memcpy (valbuf, (regbuf
- + frv_register_byte (8)
- + (TYPE_LENGTH (type) < 4 ? 4 - TYPE_LENGTH (type) : 0)),
- TYPE_LENGTH (type));
+ int len = TYPE_LENGTH (type);
+
+ if (len <= 4)
+ {
+ ULONGEST gpr8_val;
+ regcache_cooked_read_unsigned (regcache, 8, &gpr8_val);
+ store_unsigned_integer (valbuf, len, gpr8_val);
+ }
+ else if (len == 8)
+ {
+ ULONGEST regval;
+ regcache_cooked_read_unsigned (regcache, 8, &regval);
+ store_unsigned_integer (valbuf, 4, regval);
+ regcache_cooked_read_unsigned (regcache, 9, &regval);
+ store_unsigned_integer ((bfd_byte *) valbuf + 4, 4, regval);
+ }
+ else
+ internal_error (__FILE__, __LINE__, "Illegal return value length: %d", len);
}
static CORE_ADDR
-frv_extract_struct_value_address (char *regbuf)
+frv_extract_struct_value_address (struct regcache *regcache)
{
- return extract_unsigned_integer (regbuf +
- frv_register_byte (struct_return_regnum),
- 4);
+ ULONGEST addr;
+ regcache_cooked_read_unsigned (regcache, struct_return_regnum, &addr);
+ return addr;
}
static void
@@ -760,14 +893,11 @@ frv_frameless_function_invocation (struct frame_info *frame)
return frameless_look_for_prologue (frame);
}
-#define ROUND_UP(n,a) (((n)+(a)-1) & ~((a)-1))
-#define ROUND_DOWN(n,a) ((n) & ~((a)-1))
-
static CORE_ADDR
frv_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
{
/* Require dword alignment. */
- return ROUND_DOWN (sp, 8);
+ return align_down (sp, 8);
}
static CORE_ADDR
@@ -795,14 +925,14 @@ frv_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
stack_space = 0;
for (argnum = 0; argnum < nargs; ++argnum)
- stack_space += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])), 4);
+ stack_space += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])), 4);
stack_space -= (6 * 4);
if (stack_space > 0)
sp -= stack_space;
/* Make sure stack is dword aligned. */
- sp = ROUND_DOWN (sp, 8);
+ sp = align_down (sp, 8);
stack_offset = 0;
@@ -852,7 +982,7 @@ frv_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
argnum, *((int *)val), stack_offset, (int) (sp + stack_offset));
#endif
write_memory (sp + stack_offset, val, partial_len);
- stack_offset += ROUND_UP(partial_len, 4);
+ stack_offset += align_up (partial_len, 4);
}
len -= partial_len;
val += partial_len;
@@ -870,19 +1000,26 @@ frv_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
}
static void
-frv_store_return_value (struct type *type, char *valbuf)
+frv_store_return_value (struct type *type, struct regcache *regcache,
+ const void *valbuf)
{
- int length = TYPE_LENGTH (type);
- int reg8_offset = frv_register_byte (8);
-
- if (length <= 4)
- deprecated_write_register_bytes (reg8_offset + (4 - length), valbuf,
- length);
- else if (length == 8)
- deprecated_write_register_bytes (reg8_offset, valbuf, length);
+ int len = TYPE_LENGTH (type);
+
+ if (len <= 4)
+ {
+ bfd_byte val[4];
+ memset (val, 0, sizeof (val));
+ memcpy (val + (4 - len), valbuf, len);
+ regcache_cooked_write (regcache, 8, val);
+ }
+ else if (len == 8)
+ {
+ regcache_cooked_write (regcache, 8, valbuf);
+ regcache_cooked_write (regcache, 9, (bfd_byte *) valbuf + 4);
+ }
else
internal_error (__FILE__, __LINE__,
- "Don't know how to return a %d-byte value.", length);
+ "Don't know how to return a %d-byte value.", len);
}
@@ -966,7 +1103,7 @@ frv_frame_this_id (struct frame_info *next_frame,
/* This is meant to halt the backtrace at "_start". Make sure we
don't halt it at a generic dummy frame. */
- if (deprecated_inside_entry_file (func))
+ if (inside_entry_func (func))
return;
/* Check if the stack is empty. */
@@ -1101,32 +1238,32 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_ptr_bit (gdbarch, 32);
set_gdbarch_num_regs (gdbarch, frv_num_regs);
+ set_gdbarch_num_pseudo_regs (gdbarch, frv_num_pseudo_regs);
+
set_gdbarch_sp_regnum (gdbarch, sp_regnum);
set_gdbarch_deprecated_fp_regnum (gdbarch, fp_regnum);
set_gdbarch_pc_regnum (gdbarch, pc_regnum);
set_gdbarch_register_name (gdbarch, frv_register_name);
- set_gdbarch_deprecated_register_size (gdbarch, 4);
- set_gdbarch_deprecated_register_bytes (gdbarch, frv_num_regs * 4);
- set_gdbarch_deprecated_register_byte (gdbarch, frv_register_byte);
- set_gdbarch_deprecated_register_raw_size (gdbarch, frv_register_raw_size);
- set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4);
- set_gdbarch_deprecated_register_virtual_size (gdbarch, frv_register_virtual_size);
- set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 4);
- set_gdbarch_deprecated_register_virtual_type (gdbarch, frv_register_virtual_type);
+ set_gdbarch_register_type (gdbarch, frv_register_type);
+ set_gdbarch_register_sim_regno (gdbarch, frv_register_sim_regno);
+
+ set_gdbarch_pseudo_register_read (gdbarch, frv_pseudo_register_read);
+ set_gdbarch_pseudo_register_write (gdbarch, frv_pseudo_register_write);
set_gdbarch_skip_prologue (gdbarch, frv_skip_prologue);
set_gdbarch_breakpoint_from_pc (gdbarch, frv_breakpoint_from_pc);
+ set_gdbarch_adjust_breakpoint_address (gdbarch, frv_gdbarch_adjust_breakpoint_address);
set_gdbarch_frame_args_skip (gdbarch, 0);
set_gdbarch_frameless_function_invocation (gdbarch, frv_frameless_function_invocation);
set_gdbarch_use_struct_convention (gdbarch, always_use_struct_convention);
- set_gdbarch_deprecated_extract_return_value (gdbarch, frv_extract_return_value);
+ set_gdbarch_extract_return_value (gdbarch, frv_extract_return_value);
set_gdbarch_deprecated_store_struct_return (gdbarch, frv_store_struct_return);
- set_gdbarch_deprecated_store_return_value (gdbarch, frv_store_return_value);
- set_gdbarch_deprecated_extract_struct_value_address (gdbarch, frv_extract_struct_value_address);
+ set_gdbarch_store_return_value (gdbarch, frv_store_return_value);
+ set_gdbarch_extract_struct_value_address (gdbarch, frv_extract_struct_value_address);
/* Frame stuff. */
set_gdbarch_unwind_pc (gdbarch, frv_unwind_pc);
diff --git a/gdb/gcore.c b/gdb/gcore.c
index 5bf09fd..d1525dd 100644
--- a/gdb/gcore.c
+++ b/gdb/gcore.c
@@ -62,7 +62,7 @@ gcore_command (char *args, int from_tty)
}
if (info_verbose)
- fprintf_filtered (gdb_stdout,
+ fprintf_filtered (gdb_stdout,
"Opening corefile '%s' for output.\n", corefilename);
/* Open the output file. */
@@ -84,11 +84,11 @@ gcore_command (char *args, int from_tty)
{
note_sec = bfd_make_section_anyway (obfd, "note0");
if (note_sec == NULL)
- error ("Failed to create 'note' section for corefile: %s",
+ error ("Failed to create 'note' section for corefile: %s",
bfd_errmsg (bfd_get_error ()));
bfd_set_section_vma (obfd, note_sec, 0);
- bfd_set_section_flags (obfd, note_sec,
+ bfd_set_section_flags (obfd, note_sec,
SEC_HAS_CONTENTS | SEC_READONLY | SEC_ALLOC);
bfd_set_section_alignment (obfd, note_sec, 0);
bfd_set_section_size (obfd, note_sec, note_size);
@@ -161,7 +161,7 @@ default_gcore_target (void)
and store its limits in *BOTTOM and *TOP. Return non-zero if
successful. */
-static int
+static int
derive_stack_segment (bfd_vma *bottom, bfd_vma *top)
{
struct frame_info *fi, *tmp_fi;
@@ -209,7 +209,7 @@ derive_stack_segment (bfd_vma *bottom, bfd_vma *top)
the static data sections. Store its limits in *BOTTOM and *TOP.
Return non-zero if successful. */
-static int
+static int
derive_heap_segment (bfd *abfd, bfd_vma *bottom, bfd_vma *top)
{
bfd_vma top_of_data_memory = 0;
@@ -285,7 +285,6 @@ derive_heap_segment (bfd *abfd, bfd_vma *bottom, bfd_vma *top)
return 0;
}
-/* ARGSUSED */
static void
make_output_phdrs (bfd *obfd, asection *osec, void *ignored)
{
@@ -307,55 +306,73 @@ make_output_phdrs (bfd *obfd, asection *osec, void *ignored)
bfd_record_phdr (obfd, p_type, 1, p_flags, 0, 0, 0, 0, 1, &osec);
}
-static asection *
-make_mem_sec (bfd *obfd, bfd_vma addr, bfd_size_type size,
- unsigned int flags, unsigned int alignment)
+static int
+gcore_create_callback (CORE_ADDR vaddr, unsigned long size,
+ int read, int write, int exec, void *data)
{
+ bfd *obfd = data;
asection *osec;
+ flagword flags = SEC_ALLOC | SEC_HAS_CONTENTS | SEC_LOAD;
+
+ if (write == 0)
+ {
+ /* See if this region of memory lies inside a known file on disk.
+ If so, we can avoid copying its contents by clearing SEC_LOAD. */
+ struct objfile *objfile;
+ struct obj_section *objsec;
+
+ ALL_OBJSECTIONS (objfile, objsec)
+ {
+ bfd *abfd = objfile->obfd;
+ asection *asec = objsec->the_bfd_section;
+ bfd_vma align = (bfd_vma) 1 << bfd_get_section_alignment (abfd,
+ asec);
+ bfd_vma start = objsec->addr & -align;
+ bfd_vma end = (objsec->endaddr + align - 1) & -align;
+ /* Match if either the entire memory region lies inside the
+ section (i.e. a mapping covering some pages of a large
+ segment) or the entire section lies inside the memory region
+ (i.e. a mapping covering multiple small sections).
+
+ This BFD was synthesized from reading target memory,
+ we don't want to omit that. */
+ if (((vaddr >= start && vaddr + size <= end)
+ || (start >= vaddr && end <= vaddr + size))
+ && !(bfd_get_file_flags (abfd) & BFD_IN_MEMORY))
+ {
+ flags &= ~SEC_LOAD;
+ goto keep; /* break out of two nested for loops */
+ }
+ }
+
+ keep:
+ flags |= SEC_READONLY;
+ }
+
+ if (exec)
+ flags |= SEC_CODE;
+ else
+ flags |= SEC_DATA;
osec = bfd_make_section_anyway (obfd, "load");
if (osec == NULL)
{
warning ("Couldn't make gcore segment: %s",
bfd_errmsg (bfd_get_error ()));
- return NULL;
+ return 1;
}
if (info_verbose)
{
fprintf_filtered (gdb_stdout, "Save segment, %lld bytes at 0x%s\n",
- (long long) size, paddr_nz (addr));
+ (long long) size, paddr_nz (vaddr));
}
bfd_set_section_size (obfd, osec, size);
- bfd_set_section_vma (obfd, osec, addr);
+ bfd_set_section_vma (obfd, osec, vaddr);
bfd_section_lma (obfd, osec) = 0; /* ??? bfd_set_section_lma? */
- bfd_set_section_alignment (obfd, osec, alignment);
- bfd_set_section_flags (obfd, osec,
- flags | SEC_LOAD | SEC_ALLOC | SEC_HAS_CONTENTS);
- return osec;
-}
-
-static int
-gcore_create_callback (CORE_ADDR vaddr, unsigned long size,
- int read, int write, int exec, void *data)
-{
- flagword flags = 0;
-
- if (write == 0)
- {
- flags |= SEC_READONLY;
- /* Mark readonly sections as zero-sized, such that we can avoid
- copying their contents. */
- size = 0;
- }
-
- if (exec)
- flags |= SEC_CODE;
- else
- flags |= SEC_DATA;
-
- return ((make_mem_sec (data, vaddr, size, flags, 0)) == NULL);
+ bfd_set_section_flags (obfd, osec, flags);
+ return 0;
}
static int
@@ -381,7 +398,7 @@ objfile_find_memory_regions (int (*func) (CORE_ADDR, unsigned long,
int size = bfd_section_size (ibfd, isec);
int ret;
- ret = (*func) (objsec->addr, bfd_section_size (ibfd, isec),
+ ret = (*func) (objsec->addr, bfd_section_size (ibfd, isec),
1, /* All sections will be readable. */
(flags & SEC_READONLY) == 0, /* Writable. */
(flags & SEC_CODE) != 0, /* Executable. */
@@ -393,7 +410,7 @@ objfile_find_memory_regions (int (*func) (CORE_ADDR, unsigned long,
/* Make a stack segment. */
if (derive_stack_segment (&temp_bottom, &temp_top))
- (*func) (temp_bottom, temp_top - temp_bottom,
+ (*func) (temp_bottom, temp_top - temp_bottom,
1, /* Stack section will be readable. */
1, /* Stack section will be writable. */
0, /* Stack section will not be executable. */
@@ -417,9 +434,8 @@ gcore_copy_callback (bfd *obfd, asection *osec, void *ignored)
struct cleanup *old_chain = NULL;
void *memhunk;
- /* Read-only sections are marked as zero-size. We don't have to
- copy their contents. */
- if (size == 0)
+ /* Read-only sections are marked; we don't have to copy their contents. */
+ if ((bfd_get_section_flags (obfd, osec) & SEC_LOAD) == 0)
return;
/* Only interested in "load" sections. */
@@ -432,12 +448,12 @@ gcore_copy_callback (bfd *obfd, asection *osec, void *ignored)
error ("Not enough memory to create corefile.");
old_chain = make_cleanup (xfree, memhunk);
- if (target_read_memory (bfd_section_vma (obfd, osec),
+ if (target_read_memory (bfd_section_vma (obfd, osec),
memhunk, size) != 0)
warning ("Memory read failed for corefile section, %ld bytes at 0x%s\n",
(long) size, paddr (bfd_section_vma (obfd, osec)));
if (!bfd_set_section_contents (obfd, osec, memhunk, 0, size))
- warning ("Failed to write corefile contents (%s).",
+ warning ("Failed to write corefile contents (%s).",
bfd_errmsg (bfd_get_error ()));
do_cleanups (old_chain); /* Frees MEMHUNK. */
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 974a3c0..f73a4f6 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -52,12 +52,7 @@
/* Static function declarations */
-static void verify_gdbarch (struct gdbarch *gdbarch);
static void alloc_gdbarch_data (struct gdbarch *);
-static void init_gdbarch_swap (struct gdbarch *);
-static void clear_gdbarch_swap (struct gdbarch *);
-static void swapout_gdbarch_swap (struct gdbarch *);
-static void swapin_gdbarch_swap (struct gdbarch *);
/* Non-zero if we want to trace architecture code. */
@@ -203,22 +198,24 @@ struct gdbarch
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_return_value_on_stack_ftype *return_value_on_stack;
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_extract_struct_value_address_ftype *extract_struct_value_address;
gdbarch_deprecated_extract_struct_value_address_ftype *deprecated_extract_struct_value_address;
- gdbarch_use_struct_convention_ftype *use_struct_convention;
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_prologue_frameless_p_ftype *prologue_frameless_p;
gdbarch_inner_than_ftype *inner_than;
gdbarch_breakpoint_from_pc_ftype *breakpoint_from_pc;
+ gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address;
gdbarch_memory_insert_breakpoint_ftype *memory_insert_breakpoint;
gdbarch_memory_remove_breakpoint_ftype *memory_remove_breakpoint;
CORE_ADDR decr_pc_after_break;
@@ -238,6 +235,7 @@ struct gdbarch
gdbarch_deprecated_stack_align_ftype *deprecated_stack_align;
gdbarch_frame_align_ftype *frame_align;
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;
@@ -249,6 +247,7 @@ struct gdbarch
gdbarch_software_single_step_ftype *software_single_step;
gdbarch_print_insn_ftype *print_insn;
gdbarch_skip_trampoline_code_ftype *skip_trampoline_code;
+ gdbarch_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_pc_in_sigtramp_ftype *pc_in_sigtramp;
@@ -266,6 +265,7 @@ struct gdbarch
gdbarch_address_class_name_to_type_flags_ftype *address_class_name_to_type_flags;
gdbarch_register_reggroup_p_ftype *register_reggroup_p;
gdbarch_fetch_pointer_argument_ftype *fetch_pointer_argument;
+ gdbarch_regset_from_core_section_ftype *regset_from_core_section;
};
@@ -371,22 +371,24 @@ struct gdbarch startup_gdbarch =
0, /* pointer_to_address */
0, /* address_to_pointer */
0, /* integer_to_address */
- 0, /* return_value_on_stack */
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, /* extract_struct_value_address */
0, /* deprecated_extract_struct_value_address */
- 0, /* use_struct_convention */
0, /* deprecated_frame_init_saved_regs */
0, /* deprecated_init_extra_frame_info */
0, /* skip_prologue */
0, /* prologue_frameless_p */
0, /* inner_than */
0, /* breakpoint_from_pc */
+ 0, /* adjust_breakpoint_address */
0, /* memory_insert_breakpoint */
0, /* memory_remove_breakpoint */
0, /* decr_pc_after_break */
@@ -406,17 +408,19 @@ struct gdbarch startup_gdbarch =
0, /* deprecated_stack_align */
0, /* frame_align */
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 */
- 0, /* convert_from_func_ptr_addr */
+ convert_from_func_ptr_addr_identity, /* convert_from_func_ptr_addr */
0, /* addr_bits_remove */
0, /* smash_text_address */
0, /* software_single_step */
0, /* print_insn */
0, /* skip_trampoline_code */
+ 0, /* skip_solib_resolver */
0, /* in_solib_call_trampoline */
0, /* in_solib_return_trampoline */
0, /* pc_in_sigtramp */
@@ -434,24 +438,12 @@ struct gdbarch startup_gdbarch =
0, /* address_class_name_to_type_flags */
default_register_reggroup_p, /* register_reggroup_p */
0, /* fetch_pointer_argument */
+ 0, /* regset_from_core_section */
/* startup_gdbarch() */
};
struct gdbarch *current_gdbarch = &startup_gdbarch;
-/* Do any initialization needed for a non-multiarch configuration
- after the _initialize_MODULE functions have been run. */
-void
-initialize_non_multiarch (void)
-{
- alloc_gdbarch_data (&startup_gdbarch);
- /* Ensure that all swap areas are zeroed so that they again think
- they are starting from scratch. */
- clear_gdbarch_swap (&startup_gdbarch);
- init_gdbarch_swap (&startup_gdbarch);
-}
-
-
/* Create a new ``struct gdbarch'' based on information provided by
``struct gdbarch_info''. */
@@ -540,10 +532,12 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
current_gdbarch->deprecated_frame_args_address = get_frame_base;
current_gdbarch->deprecated_frame_locals_address = get_frame_base;
- current_gdbarch->convert_from_func_ptr_addr = core_addr_identity;
+ 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;
current_gdbarch->smash_text_address = core_addr_identity;
current_gdbarch->skip_trampoline_code = generic_skip_trampoline_code;
+ 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->pc_in_sigtramp = legacy_pc_in_sigtramp;
@@ -588,10 +582,16 @@ gdbarch_free (struct gdbarch *arch)
}
-/* Ensure that all values in a GDBARCH are reasonable. */
+/* Ensure that all values in a GDBARCH are reasonable. */
+
+/* NOTE/WARNING: The parameter is called ``current_gdbarch'' so that it
+ just happens to match the global variable ``current_gdbarch''. That
+ way macros refering to that variable get the local and not the global
+ version - ulgh. Once everything is parameterised with gdbarch, this
+ will go away. */
static void
-verify_gdbarch (struct gdbarch *gdbarch)
+verify_gdbarch (struct gdbarch *current_gdbarch)
{
struct ui_file *log;
struct cleanup *cleanups;
@@ -600,9 +600,9 @@ verify_gdbarch (struct gdbarch *gdbarch)
log = mem_fileopen ();
cleanups = make_cleanup_ui_file_delete (log);
/* fundamental */
- if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
+ if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
fprintf_unfiltered (log, "\n\tbyte-order");
- if (gdbarch->bfd_arch_info == NULL)
+ if (current_gdbarch->bfd_arch_info == NULL)
fprintf_unfiltered (log, "\n\tbfd_arch_info");
/* Check those that need to be defined for the given multi-arch level. */
/* Skip verify of short_bit, invalid_p == 0 */
@@ -613,11 +613,11 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of double_bit, invalid_p == 0 */
/* Skip verify of long_double_bit, invalid_p == 0 */
/* Skip verify of ptr_bit, invalid_p == 0 */
- if (gdbarch->addr_bit == 0)
- gdbarch->addr_bit = TARGET_PTR_BIT;
+ if (current_gdbarch->addr_bit == 0)
+ current_gdbarch->addr_bit = TARGET_PTR_BIT;
/* Skip verify of bfd_vma_bit, invalid_p == 0 */
- if (gdbarch->char_signed == -1)
- gdbarch->char_signed = 1;
+ if (current_gdbarch->char_signed == -1)
+ current_gdbarch->char_signed = 1;
/* Skip verify of read_pc, has predicate */
/* Skip verify of write_pc, invalid_p == 0 */
/* Skip verify of read_sp, has predicate */
@@ -625,7 +625,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of pseudo_register_read, has predicate */
/* Skip verify of pseudo_register_write, has predicate */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->num_regs == -1))
+ && (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 */
@@ -685,37 +685,39 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* 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 return_value_on_stack, invalid_p == 0 */
/* 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 extract_struct_value_address, has predicate */
/* Skip verify of deprecated_extract_struct_value_address, has predicate */
- /* Skip verify of use_struct_convention, invalid_p == 0 */
/* 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)
- && (gdbarch->skip_prologue == 0))
+ && (current_gdbarch->skip_prologue == 0))
fprintf_unfiltered (log, "\n\tskip_prologue");
/* Skip verify of prologue_frameless_p, invalid_p == 0 */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->inner_than == 0))
+ && (current_gdbarch->inner_than == 0))
fprintf_unfiltered (log, "\n\tinner_than");
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->breakpoint_from_pc == 0))
+ && (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 */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->decr_pc_after_break == -1))
+ && (current_gdbarch->decr_pc_after_break == -1))
fprintf_unfiltered (log, "\n\tdecr_pc_after_break");
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->function_start_offset == -1))
+ && (current_gdbarch->function_start_offset == -1))
fprintf_unfiltered (log, "\n\tfunction_start_offset");
/* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->frame_args_skip == -1))
+ && (current_gdbarch->frame_args_skip == -1))
fprintf_unfiltered (log, "\n\tframe_args_skip");
/* Skip verify of frameless_function_invocation, invalid_p == 0 */
/* Skip verify of deprecated_frame_chain, has predicate */
@@ -730,20 +732,22 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* 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 */
- if (gdbarch->float_format == 0)
- gdbarch->float_format = default_float_format (gdbarch);
- if (gdbarch->double_format == 0)
- gdbarch->double_format = default_double_format (gdbarch);
- if (gdbarch->long_double_format == 0)
- gdbarch->long_double_format = default_double_format (gdbarch);
+ /* 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)
- && (gdbarch->print_insn == 0))
+ && (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 pc_in_sigtramp, invalid_p == 0 */
@@ -761,6 +765,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of address_class_name_to_type_flags, has predicate */
/* Skip verify of register_reggroup_p, invalid_p == 0 */
/* Skip verify of fetch_pointer_argument, has predicate */
+ /* Skip verify of regset_from_core_section, has predicate */
buf = ui_file_xstrdup (log, &dummy);
make_cleanup (xfree, buf);
if (strlen (buf) > 0)
@@ -780,24 +785,42 @@ verify_gdbarch (struct gdbarch *gdbarch)
will go away. */
void
-gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
+gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
{
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);
fprintf_unfiltered (file,
"gdbarch_dump: register_reggroup_p = 0x%08lx\n",
(long) current_gdbarch->register_reggroup_p);
fprintf_unfiltered (file,
+ "gdbarch_dump: stabs_argument_has_addr = 0x%08lx\n",
+ (long) current_gdbarch->stabs_argument_has_addr);
+ fprintf_unfiltered (file,
"gdbarch_dump: gdbarch_pseudo_register_read_p() = %d\n",
gdbarch_pseudo_register_read_p (current_gdbarch));
fprintf_unfiltered (file,
@@ -860,6 +883,12 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->addr_bits_remove
/*ADDR_BITS_REMOVE ()*/);
#endif
+ 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",
+ (long) current_gdbarch->adjust_breakpoint_address);
#ifdef BELIEVE_PCC_PROMOTION
fprintf_unfiltered (file,
"gdbarch_dump: BELIEVE_PCC_PROMOTION # %s\n",
@@ -935,16 +964,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: construct_inferior_arguments = 0x%08lx\n",
(long) current_gdbarch->construct_inferior_arguments);
-#ifdef CONVERT_FROM_FUNC_PTR_ADDR
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "CONVERT_FROM_FUNC_PTR_ADDR(addr)",
- XSTRING (CONVERT_FROM_FUNC_PTR_ADDR (addr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: CONVERT_FROM_FUNC_PTR_ADDR = <0x%08lx>\n",
- (long) current_gdbarch->convert_from_func_ptr_addr
- /*CONVERT_FROM_FUNC_PTR_ADDR ()*/);
-#endif
#ifdef CONVERT_REGISTER_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1517,6 +1536,25 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(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
#ifdef DEPRECATED_REGISTER_SIZE
fprintf_unfiltered (file,
"gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n",
@@ -1525,6 +1563,44 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *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",
@@ -2044,25 +2120,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->register_name
/*REGISTER_NAME ()*/);
#endif
-#ifdef REGISTER_RAW_SIZE_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "REGISTER_RAW_SIZE_P()",
- XSTRING (REGISTER_RAW_SIZE_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_RAW_SIZE_P() = %d\n",
- REGISTER_RAW_SIZE_P ());
-#endif
-#ifdef REGISTER_RAW_SIZE
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "REGISTER_RAW_SIZE(reg_nr)",
- XSTRING (REGISTER_RAW_SIZE (reg_nr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_RAW_SIZE = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_register_raw_size
- /*REGISTER_RAW_SIZE ()*/);
-#endif
#ifdef REGISTER_SIM_REGNO
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -2089,44 +2146,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"gdbarch_dump: register_type = 0x%08lx\n",
(long) current_gdbarch->register_type);
-#ifdef REGISTER_VIRTUAL_SIZE_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "REGISTER_VIRTUAL_SIZE_P()",
- XSTRING (REGISTER_VIRTUAL_SIZE_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_VIRTUAL_SIZE_P() = %d\n",
- REGISTER_VIRTUAL_SIZE_P ());
-#endif
-#ifdef REGISTER_VIRTUAL_SIZE
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "REGISTER_VIRTUAL_SIZE(reg_nr)",
- XSTRING (REGISTER_VIRTUAL_SIZE (reg_nr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_VIRTUAL_SIZE = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_register_virtual_size
- /*REGISTER_VIRTUAL_SIZE ()*/);
-#endif
-#ifdef REGISTER_VIRTUAL_TYPE_P
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "REGISTER_VIRTUAL_TYPE_P()",
- XSTRING (REGISTER_VIRTUAL_TYPE_P ()));
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_VIRTUAL_TYPE_P() = %d\n",
- REGISTER_VIRTUAL_TYPE_P ());
-#endif
-#ifdef REGISTER_VIRTUAL_TYPE
- fprintf_unfiltered (file,
- "gdbarch_dump: %s # %s\n",
- "REGISTER_VIRTUAL_TYPE(reg_nr)",
- XSTRING (REGISTER_VIRTUAL_TYPE (reg_nr)));
- fprintf_unfiltered (file,
- "gdbarch_dump: REGISTER_VIRTUAL_TYPE = <0x%08lx>\n",
- (long) current_gdbarch->deprecated_register_virtual_type
- /*REGISTER_VIRTUAL_TYPE ()*/);
-#endif
fprintf_unfiltered (file,
"gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
(long) current_gdbarch->remote_translate_xfer_address);
@@ -2198,6 +2217,16 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->skip_prologue
/*SKIP_PROLOGUE ()*/);
#endif
+#ifdef SKIP_SOLIB_RESOLVER
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "SKIP_SOLIB_RESOLVER(pc)",
+ XSTRING (SKIP_SOLIB_RESOLVER (pc)));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: SKIP_SOLIB_RESOLVER = <0x%08lx>\n",
+ (long) current_gdbarch->skip_solib_resolver
+ /*SKIP_SOLIB_RESOLVER ()*/);
+#endif
#ifdef SKIP_TRAMPOLINE_CODE
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -4205,23 +4234,6 @@ set_gdbarch_integer_to_address (struct gdbarch *gdbarch,
}
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;
-}
-
-int
gdbarch_deprecated_pop_frame_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -4269,6 +4281,47 @@ set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
gdbarch->deprecated_store_struct_return = deprecated_store_struct_return;
}
+int
+gdbarch_return_value_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->return_value != NULL;
+}
+
+enum return_value_convention
+gdbarch_return_value (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->return_value != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_return_value called\n");
+ return gdbarch->return_value (gdbarch, valtype, regcache, readbuf, writebuf);
+}
+
+void
+set_gdbarch_return_value (struct gdbarch *gdbarch,
+ gdbarch_return_value_ftype return_value)
+{
+ 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)
{
@@ -4338,6 +4391,23 @@ set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
}
int
+gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->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);
+}
+
+void
+set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
+ gdbarch_use_struct_convention_ftype use_struct_convention)
+{
+ gdbarch->use_struct_convention = use_struct_convention;
+}
+
+int
gdbarch_extract_struct_value_address_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -4386,23 +4456,6 @@ set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch *gdbarch,
}
int
-gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->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);
-}
-
-void
-set_gdbarch_use_struct_convention (struct gdbarch *gdbarch,
- gdbarch_use_struct_convention_ftype use_struct_convention)
-{
- gdbarch->use_struct_convention = use_struct_convention;
-}
-
-int
gdbarch_deprecated_frame_init_saved_regs_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -4519,6 +4572,30 @@ set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch,
}
int
+gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->adjust_breakpoint_address != NULL;
+}
+
+CORE_ADDR
+gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->adjust_breakpoint_address != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_adjust_breakpoint_address called\n");
+ return gdbarch->adjust_breakpoint_address (gdbarch, bpaddr);
+}
+
+void
+set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch,
+ gdbarch_adjust_breakpoint_address_ftype adjust_breakpoint_address)
+{
+ gdbarch->adjust_breakpoint_address = adjust_breakpoint_address;
+}
+
+int
gdbarch_memory_insert_breakpoint (struct gdbarch *gdbarch, CORE_ADDR addr, char *contents_cache)
{
gdb_assert (gdbarch != NULL);
@@ -4931,6 +5008,23 @@ set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
}
int
+gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->stabs_argument_has_addr != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_stabs_argument_has_addr called\n");
+ return gdbarch->stabs_argument_has_addr (gdbarch, type);
+}
+
+void
+set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch,
+ gdbarch_stabs_argument_has_addr_ftype stabs_argument_has_addr)
+{
+ gdbarch->stabs_argument_has_addr = stabs_argument_has_addr;
+}
+
+int
gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
@@ -5011,13 +5105,13 @@ set_gdbarch_long_double_format (struct gdbarch *gdbarch,
}
CORE_ADDR
-gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
+gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->convert_from_func_ptr_addr != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_convert_from_func_ptr_addr called\n");
- return gdbarch->convert_from_func_ptr_addr (addr);
+ return gdbarch->convert_from_func_ptr_addr (gdbarch, addr, targ);
}
void
@@ -5119,6 +5213,23 @@ set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch,
gdbarch->skip_trampoline_code = skip_trampoline_code;
}
+CORE_ADDR
+gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->skip_solib_resolver != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_skip_solib_resolver called\n");
+ return gdbarch->skip_solib_resolver (pc);
+}
+
+void
+set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch,
+ gdbarch_skip_solib_resolver_ftype skip_solib_resolver)
+{
+ gdbarch->skip_solib_resolver = skip_solib_resolver;
+}
+
int
gdbarch_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc, char *name)
{
@@ -5450,6 +5561,30 @@ set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch,
gdbarch->fetch_pointer_argument = fetch_pointer_argument;
}
+int
+gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ return gdbarch->regset_from_core_section != NULL;
+}
+
+const struct regset *
+gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size)
+{
+ gdb_assert (gdbarch != NULL);
+ gdb_assert (gdbarch->regset_from_core_section != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_regset_from_core_section called\n");
+ return gdbarch->regset_from_core_section (gdbarch, sect_name, sect_size);
+}
+
+void
+set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch,
+ gdbarch_regset_from_core_section_ftype regset_from_core_section)
+{
+ gdbarch->regset_from_core_section = regset_from_core_section;
+}
+
/* Keep a registry of per-architecture data-pointers required by GDB
modules. */
@@ -5590,31 +5725,21 @@ register_gdbarch_swap (void *data,
}
static void
-clear_gdbarch_swap (struct gdbarch *gdbarch)
-{
- struct gdbarch_swap *curr;
- for (curr = gdbarch->swap;
- curr != NULL;
- curr = curr->next)
- {
- memset (curr->source->data, 0, curr->source->sizeof_data);
- }
-}
-
-static void
-init_gdbarch_swap (struct gdbarch *gdbarch)
+current_gdbarch_swap_init_hack (void)
{
struct gdbarch_swap_registration *rego;
- struct gdbarch_swap **curr = &gdbarch->swap;
+ struct gdbarch_swap **curr = &current_gdbarch->swap;
for (rego = gdbarch_swap_registry.registrations;
rego != NULL;
rego = rego->next)
{
if (rego->data != NULL)
{
- (*curr) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct gdbarch_swap);
+ (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
+ struct gdbarch_swap);
(*curr)->source = rego;
- (*curr)->swap = gdbarch_obstack_zalloc (gdbarch, rego->sizeof_data);
+ (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
+ rego->sizeof_data);
(*curr)->next = NULL;
curr = &(*curr)->next;
}
@@ -5623,24 +5748,35 @@ init_gdbarch_swap (struct gdbarch *gdbarch)
}
}
-static void
-swapout_gdbarch_swap (struct gdbarch *gdbarch)
+static struct gdbarch *
+current_gdbarch_swap_out_hack (void)
{
+ struct gdbarch *old_gdbarch = current_gdbarch;
struct gdbarch_swap *curr;
- for (curr = gdbarch->swap;
+
+ gdb_assert (old_gdbarch != NULL);
+ for (curr = old_gdbarch->swap;
curr != NULL;
curr = curr->next)
- memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
+ {
+ memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
+ memset (curr->source->data, 0, curr->source->sizeof_data);
+ }
+ current_gdbarch = NULL;
+ return old_gdbarch;
}
static void
-swapin_gdbarch_swap (struct gdbarch *gdbarch)
+current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
{
struct gdbarch_swap *curr;
- for (curr = gdbarch->swap;
+
+ gdb_assert (current_gdbarch == NULL);
+ for (curr = new_gdbarch->swap;
curr != NULL;
curr = curr->next)
memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
+ current_gdbarch = new_gdbarch;
}
@@ -5763,50 +5899,24 @@ gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
}
-/* Update the current architecture. Return ZERO if the update request
- failed. */
+/* Find an architecture that matches the specified INFO. Create a new
+ architecture if needed. Return that new architecture. Assumes
+ that there is no current architecture. */
-int
-gdbarch_update_p (struct gdbarch_info info)
+static struct gdbarch *
+find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
{
struct gdbarch *new_gdbarch;
- struct gdbarch *old_gdbarch;
struct gdbarch_registration *rego;
+ /* The existing architecture has been swapped out - all this code
+ works from a clean slate. */
+ gdb_assert (current_gdbarch == NULL);
+
/* Fill in missing parts of the INFO struct using a number of
- sources: ``set ...''; INFOabfd supplied; existing target. */
-
- /* ``(gdb) set architecture ...'' */
- if (info.bfd_arch_info == NULL
- && !TARGET_ARCHITECTURE_AUTO)
- info.bfd_arch_info = TARGET_ARCHITECTURE;
- if (info.bfd_arch_info == NULL
- && info.abfd != NULL
- && bfd_get_arch (info.abfd) != bfd_arch_unknown
- && bfd_get_arch (info.abfd) != bfd_arch_obscure)
- info.bfd_arch_info = bfd_get_arch_info (info.abfd);
- if (info.bfd_arch_info == NULL)
- info.bfd_arch_info = TARGET_ARCHITECTURE;
-
- /* ``(gdb) set byte-order ...'' */
- if (info.byte_order == BFD_ENDIAN_UNKNOWN
- && !TARGET_BYTE_ORDER_AUTO)
- info.byte_order = TARGET_BYTE_ORDER;
- /* From the INFO struct. */
- if (info.byte_order == BFD_ENDIAN_UNKNOWN
- && info.abfd != NULL)
- info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
- : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
- : BFD_ENDIAN_UNKNOWN);
- /* From the current target. */
- if (info.byte_order == BFD_ENDIAN_UNKNOWN)
- info.byte_order = TARGET_BYTE_ORDER;
-
- /* ``(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
- if (info.osabi == GDB_OSABI_UNINITIALIZED)
- info.osabi = gdbarch_lookup_osabi (info.abfd);
- if (info.osabi == GDB_OSABI_UNINITIALIZED)
- info.osabi = current_gdbarch->osabi;
+ sources: "set ..."; INFOabfd supplied; and the existing
+ architecture. */
+ gdbarch_info_fill (old_gdbarch, &info);
/* Must have found some sort of architecture. */
gdb_assert (info.bfd_arch_info != NULL);
@@ -5814,28 +5924,28 @@ gdbarch_update_p (struct gdbarch_info info)
if (gdbarch_debug)
{
fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: info.bfd_arch_info %s\n",
+ "find_arch_by_info: info.bfd_arch_info %s\n",
(info.bfd_arch_info != NULL
? info.bfd_arch_info->printable_name
: "(null)"));
fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: info.byte_order %d (%s)\n",
+ "find_arch_by_info: info.byte_order %d (%s)\n",
info.byte_order,
(info.byte_order == BFD_ENDIAN_BIG ? "big"
: info.byte_order == BFD_ENDIAN_LITTLE ? "little"
: "default"));
fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: info.osabi %d (%s)\n",
+ "find_arch_by_info: info.osabi %d (%s)\n",
info.osabi, gdbarch_osabi_name (info.osabi));
fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: info.abfd 0x%lx\n",
+ "find_arch_by_info: info.abfd 0x%lx\n",
(long) info.abfd);
fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: info.tdep_info 0x%lx\n",
+ "find_arch_by_info: info.tdep_info 0x%lx\n",
(long) info.tdep_info);
}
- /* Find the target that knows about this architecture. */
+ /* Find the tdep code that knows about this architecture. */
for (rego = gdbarch_registry;
rego != NULL;
rego = rego->next)
@@ -5844,86 +5954,61 @@ gdbarch_update_p (struct gdbarch_info info)
if (rego == NULL)
{
if (gdbarch_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\n");
+ fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
+ "No matching architecture\n");
return 0;
}
- /* Swap the data belonging to the old target out setting the
- installed data to zero. This stops the ->init() function trying
- to refer to the previous architecture's global data structures. */
- swapout_gdbarch_swap (current_gdbarch);
- clear_gdbarch_swap (current_gdbarch);
-
- /* Save the previously selected architecture, setting the global to
- NULL. This stops ->init() trying to use the previous
- architecture's configuration. The previous architecture may not
- even be of the same architecture family. The most recent
- architecture of the same family is found at the head of the
- rego->arches list. */
- old_gdbarch = current_gdbarch;
- current_gdbarch = NULL;
-
- /* Ask the target for a replacement architecture. */
+ /* Ask the tdep code for an architecture that matches "info". */
new_gdbarch = rego->init (info, rego->arches);
- /* Did the target like it? No. Reject the change and revert to the
- old architecture. */
+ /* Did the tdep code like it? No. Reject the change and revert to
+ the old architecture. */
if (new_gdbarch == NULL)
{
if (gdbarch_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\n");
- swapin_gdbarch_swap (old_gdbarch);
- current_gdbarch = old_gdbarch;
- return 0;
+ fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
+ "Target rejected architecture\n");
+ return NULL;
}
- /* Did the architecture change? No. Oops, put the old architecture
- back. */
- if (old_gdbarch == new_gdbarch)
+ /* Is this a pre-existing architecture (as determined by already
+ being initialized)? Move it to the front of the architecture
+ list (keeping the list sorted Most Recently Used). */
+ if (new_gdbarch->initialized_p)
{
+ struct gdbarch_list **list;
+ struct gdbarch_list *this;
if (gdbarch_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\n",
+ fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
+ "Previous architecture 0x%08lx (%s) selected\n",
(long) new_gdbarch,
new_gdbarch->bfd_arch_info->printable_name);
- swapin_gdbarch_swap (old_gdbarch);
- current_gdbarch = old_gdbarch;
- return 1;
+ /* Find the existing arch in the list. */
+ for (list = &rego->arches;
+ (*list) != NULL && (*list)->gdbarch != new_gdbarch;
+ list = &(*list)->next);
+ /* It had better be in the list of architectures. */
+ gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
+ /* Unlink THIS. */
+ this = (*list);
+ (*list) = this->next;
+ /* Insert THIS at the front. */
+ this->next = rego->arches;
+ rego->arches = this;
+ /* Return it. */
+ return new_gdbarch;
}
- /* Is this a pre-existing architecture? Yes. Move it to the front
- of the list of architectures (keeping the list sorted Most
- Recently Used) and then copy it in. */
- {
- struct gdbarch_list **list;
- for (list = &rego->arches;
- (*list) != NULL;
- list = &(*list)->next)
- {
- if ((*list)->gdbarch == new_gdbarch)
- {
- struct gdbarch_list *this;
- if (gdbarch_debug)
- fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
- (long) new_gdbarch,
- new_gdbarch->bfd_arch_info->printable_name);
- /* Unlink this. */
- this = (*list);
- (*list) = this->next;
- /* Insert in the front. */
- this->next = rego->arches;
- rego->arches = this;
- /* Copy the new architecture in. */
- current_gdbarch = new_gdbarch;
- swapin_gdbarch_swap (new_gdbarch);
- architecture_changed_event ();
- return 1;
- }
- }
- }
-
- /* Prepend this new architecture to the architecture list (keep the
- list sorted Most Recently Used). */
+ /* It's a new architecture. */
+ if (gdbarch_debug)
+ fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
+ "New architecture 0x%08lx (%s) selected\n",
+ (long) new_gdbarch,
+ new_gdbarch->bfd_arch_info->printable_name);
+
+ /* Insert the new architecture into the front of the architecture
+ list (keep the list sorted Most Recently Used). */
{
struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
this->next = rego->arches;
@@ -5931,37 +6016,59 @@ gdbarch_update_p (struct gdbarch_info info)
rego->arches = this;
}
- /* Switch to this new architecture marking it initialized. */
- current_gdbarch = new_gdbarch;
- current_gdbarch->initialized_p = 1;
- if (gdbarch_debug)
- {
- fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: New architecture 0x%08lx (%s) selected\n",
- (long) new_gdbarch,
- new_gdbarch->bfd_arch_info->printable_name);
- }
-
/* Check that the newly installed architecture is valid. Plug in
any post init values. */
new_gdbarch->dump_tdep = rego->dump_tdep;
verify_gdbarch (new_gdbarch);
+ new_gdbarch->initialized_p = 1;
- /* Initialize the per-architecture memory (swap) areas.
- CURRENT_GDBARCH must be update before these modules are
- called. */
- init_gdbarch_swap (new_gdbarch);
-
- /* Initialize the per-architecture data. CURRENT_GDBARCH
- must be updated before these modules are called. */
- architecture_changed_event ();
+ /* Initialize any per-architecture swap areas. This phase requires
+ a valid global CURRENT_GDBARCH. Set it momentarially, and then
+ swap the entire architecture out. */
+ current_gdbarch = new_gdbarch;
+ current_gdbarch_swap_init_hack ();
+ current_gdbarch_swap_out_hack ();
if (gdbarch_debug)
- gdbarch_dump (current_gdbarch, gdb_stdlog);
+ gdbarch_dump (new_gdbarch, gdb_stdlog);
- return 1;
+ return new_gdbarch;
}
+struct gdbarch *
+gdbarch_find_by_info (struct gdbarch_info info)
+{
+ /* Save the previously selected architecture, setting the global to
+ NULL. This stops things like gdbarch->init() trying to use the
+ previous architecture's configuration. The previous architecture
+ may not even be of the same architecture family. The most recent
+ architecture of the same family is found at the head of the
+ rego->arches list. */
+ struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
+
+ /* Find the specified architecture. */
+ struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
+
+ /* Restore the existing architecture. */
+ gdb_assert (current_gdbarch == NULL);
+ current_gdbarch_swap_in_hack (old_gdbarch);
+
+ return new_gdbarch;
+}
+
+/* Make the specified architecture current, swapping the existing one
+ out. */
+
+void
+deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
+{
+ gdb_assert (new_gdbarch != NULL);
+ gdb_assert (current_gdbarch != NULL);
+ gdb_assert (new_gdbarch->initialized_p);
+ current_gdbarch_swap_out_hack ();
+ current_gdbarch_swap_in_hack (new_gdbarch);
+ architecture_changed_event ();
+}
extern void _initialize_gdbarch (void);
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 65006ca..3affac5 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -43,7 +43,9 @@ struct objfile;
struct minimal_symbol;
struct regcache;
struct reggroup;
+struct regset;
struct disassemble_info;
+struct target_ops;
extern struct gdbarch *current_gdbarch;
@@ -422,9 +424,7 @@ extern void set_gdbarch_dwarf_reg_to_regnum (struct gdbarch *gdbarch, gdbarch_dw
#define DWARF_REG_TO_REGNUM(dwarf_regnr) (gdbarch_dwarf_reg_to_regnum (current_gdbarch, dwarf_regnr))
#endif
-/* Convert from an sdb register number to an internal gdb register number.
- This should be defined in tm.h, if REGISTER_NAMES is not set up
- to map one to one onto the sdb register numbers. */
+/* Convert from an sdb register number to an internal gdb register number. */
typedef int (gdbarch_sdb_reg_to_regnum_ftype) (int sdb_regnr);
extern int gdbarch_sdb_reg_to_regnum (struct gdbarch *gdbarch, int sdb_regnr);
@@ -456,7 +456,7 @@ extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register
#define REGISTER_NAME(regnr) (gdbarch_register_name (current_gdbarch, regnr))
#endif
-/* REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE. */
+/* REGISTER_TYPE is a direct replacement for DEPRECATED_REGISTER_VIRTUAL_TYPE. */
extern int gdbarch_register_type_p (struct gdbarch *gdbarch);
@@ -464,31 +464,31 @@ 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 REGISTER_VIRTUAL_TYPE. */
+/* REGISTER_TYPE is a direct replacement for DEPRECATED_REGISTER_VIRTUAL_TYPE. */
-#if defined (REGISTER_VIRTUAL_TYPE)
-/* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_TYPE */
-#if !defined (REGISTER_VIRTUAL_TYPE_P)
-#define REGISTER_VIRTUAL_TYPE_P() (1)
+#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 (REGISTER_VIRTUAL_TYPE_P)
-#error "Non multi-arch definition of REGISTER_VIRTUAL_TYPE"
+#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 (REGISTER_VIRTUAL_TYPE_P)
-#define REGISTER_VIRTUAL_TYPE_P() (gdbarch_deprecated_register_virtual_type_p (current_gdbarch))
+#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 (REGISTER_VIRTUAL_TYPE)
-#error "Non multi-arch definition of 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 (REGISTER_VIRTUAL_TYPE)
-#define REGISTER_VIRTUAL_TYPE(reg_nr) (gdbarch_deprecated_register_virtual_type (current_gdbarch, reg_nr))
+#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
@@ -541,29 +541,29 @@ extern void set_gdbarch_deprecated_register_byte (struct gdbarch *gdbarch, gdbar
DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
registers. */
-#if defined (REGISTER_RAW_SIZE)
-/* Legacy for systems yet to multi-arch REGISTER_RAW_SIZE */
-#if !defined (REGISTER_RAW_SIZE_P)
-#define REGISTER_RAW_SIZE_P() (1)
+#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 (REGISTER_RAW_SIZE_P)
-#error "Non multi-arch definition of REGISTER_RAW_SIZE"
+#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 (REGISTER_RAW_SIZE_P)
-#define REGISTER_RAW_SIZE_P() (gdbarch_deprecated_register_raw_size_p (current_gdbarch))
+#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 (REGISTER_RAW_SIZE)
-#error "Non multi-arch definition of 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 (REGISTER_RAW_SIZE)
-#define REGISTER_RAW_SIZE(reg_nr) (gdbarch_deprecated_register_raw_size (current_gdbarch, reg_nr))
+#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
@@ -571,29 +571,29 @@ extern void set_gdbarch_deprecated_register_raw_size (struct gdbarch *gdbarch, g
DEPRECATED_REGISTER_VIRTUAL_SIZE can be deleted. See: maint print
registers. */
-#if defined (REGISTER_VIRTUAL_SIZE)
-/* Legacy for systems yet to multi-arch REGISTER_VIRTUAL_SIZE */
-#if !defined (REGISTER_VIRTUAL_SIZE_P)
-#define REGISTER_VIRTUAL_SIZE_P() (1)
+#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 (REGISTER_VIRTUAL_SIZE_P)
-#error "Non multi-arch definition of REGISTER_VIRTUAL_SIZE"
+#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 (REGISTER_VIRTUAL_SIZE_P)
-#define REGISTER_VIRTUAL_SIZE_P() (gdbarch_deprecated_register_virtual_size_p (current_gdbarch))
+#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 (REGISTER_VIRTUAL_SIZE)
-#error "Non multi-arch definition of 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 (REGISTER_VIRTUAL_SIZE)
-#define REGISTER_VIRTUAL_SIZE(reg_nr) (gdbarch_deprecated_register_virtual_size (current_gdbarch, reg_nr))
+#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
@@ -1393,16 +1393,6 @@ extern void set_gdbarch_integer_to_address (struct gdbarch *gdbarch, gdbarch_int
#define INTEGER_TO_ADDRESS(type, buf) (gdbarch_integer_to_address (current_gdbarch, type, buf))
#endif
-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
-
#if defined (DEPRECATED_POP_FRAME)
/* Legacy for systems yet to multi-arch DEPRECATED_POP_FRAME */
#if !defined (DEPRECATED_POP_FRAME_P)
@@ -1455,6 +1445,34 @@ extern void set_gdbarch_deprecated_store_struct_return (struct gdbarch *gdbarch,
#define DEPRECATED_STORE_STRUCT_RETURN(addr, sp) (gdbarch_deprecated_store_struct_return (current_gdbarch, addr, sp))
#endif
+/* 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. */
+
+extern int gdbarch_return_value_p (struct gdbarch *gdbarch);
+
+typedef enum return_value_convention (gdbarch_return_value_ftype) (struct gdbarch *gdbarch, struct type *valtype, struct regcache *regcache, void *readbuf, const void *writebuf);
+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. For the moment do not try to fold in
+ EXTRACT_STRUCT_VALUE_ADDRESS as, dependant on the ABI, the debug
+ info, and the level of effort, it may well be possible to find the
+ address of a structure being return on the stack. Someone else can
+ make that change. */
+
+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
+
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);
@@ -1495,6 +1513,16 @@ extern void set_gdbarch_deprecated_store_return_value (struct gdbarch *gdbarch,
#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"
+#endif
+#if !defined (USE_STRUCT_CONVENTION)
+#define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
+#endif
+
#if defined (EXTRACT_STRUCT_VALUE_ADDRESS)
/* Legacy for systems yet to multi-arch EXTRACT_STRUCT_VALUE_ADDRESS */
#if !defined (EXTRACT_STRUCT_VALUE_ADDRESS_P)
@@ -1545,16 +1573,6 @@ extern void set_gdbarch_deprecated_extract_struct_value_address (struct gdbarch
#define DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS(regbuf) (gdbarch_deprecated_extract_struct_value_address (current_gdbarch, regbuf))
#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"
-#endif
-#if !defined (USE_STRUCT_CONVENTION)
-#define USE_STRUCT_CONVENTION(gcc_p, value_type) (gdbarch_use_struct_convention (current_gdbarch, gcc_p, value_type))
-#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)
@@ -1645,6 +1663,12 @@ extern void set_gdbarch_breakpoint_from_pc (struct gdbarch *gdbarch, gdbarch_bre
#define BREAKPOINT_FROM_PC(pcptr, lenptr) (gdbarch_breakpoint_from_pc (current_gdbarch, pcptr, lenptr))
#endif
+extern int gdbarch_adjust_breakpoint_address_p (struct gdbarch *gdbarch);
+
+typedef CORE_ADDR (gdbarch_adjust_breakpoint_address_ftype) (struct gdbarch *gdbarch, CORE_ADDR bpaddr);
+extern CORE_ADDR gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr);
+extern void set_gdbarch_adjust_breakpoint_address (struct gdbarch *gdbarch, gdbarch_adjust_breakpoint_address_ftype *adjust_breakpoint_address);
+
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);
@@ -1939,6 +1963,9 @@ typedef CORE_ADDR (gdbarch_frame_align_ftype) (struct gdbarch *gdbarch, CORE_ADD
extern CORE_ADDR gdbarch_frame_align (struct gdbarch *gdbarch, CORE_ADDR address);
extern void set_gdbarch_frame_align (struct gdbarch *gdbarch, gdbarch_frame_align_ftype *frame_align);
+/* DEPRECATED_REG_STRUCT_HAS_ADDR has been replaced by
+ stabs_argument_has_addr. */
+
#if defined (DEPRECATED_REG_STRUCT_HAS_ADDR)
/* Legacy for systems yet to multi-arch DEPRECATED_REG_STRUCT_HAS_ADDR */
#if !defined (DEPRECATED_REG_STRUCT_HAS_ADDR_P)
@@ -1964,6 +1991,10 @@ extern void set_gdbarch_deprecated_reg_struct_has_addr (struct gdbarch *gdbarch,
#define DEPRECATED_REG_STRUCT_HAS_ADDR(gcc_p, type) (gdbarch_deprecated_reg_struct_has_addr (current_gdbarch, gcc_p, type))
#endif
+typedef int (gdbarch_stabs_argument_has_addr_ftype) (struct gdbarch *gdbarch, struct type *type);
+extern int gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type);
+extern void set_gdbarch_stabs_argument_has_addr (struct gdbarch *gdbarch, gdbarch_stabs_argument_has_addr_ftype *stabs_argument_has_addr);
+
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)
@@ -2009,15 +2040,9 @@ extern void set_gdbarch_long_double_format (struct gdbarch *gdbarch, const struc
#define TARGET_LONG_DOUBLE_FORMAT (gdbarch_long_double_format (current_gdbarch))
#endif
-typedef CORE_ADDR (gdbarch_convert_from_func_ptr_addr_ftype) (CORE_ADDR addr);
-extern CORE_ADDR gdbarch_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr);
+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);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CONVERT_FROM_FUNC_PTR_ADDR)
-#error "Non multi-arch definition of CONVERT_FROM_FUNC_PTR_ADDR"
-#endif
-#if !defined (CONVERT_FROM_FUNC_PTR_ADDR)
-#define CONVERT_FROM_FUNC_PTR_ADDR(addr) (gdbarch_convert_from_func_ptr_addr (current_gdbarch, addr))
-#endif
/* On some machines there are bits in addresses which are not really
part of the address, but are used by the kernel, the hardware, etc.
@@ -2109,6 +2134,20 @@ extern void set_gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, gdbarch_s
#define SKIP_TRAMPOLINE_CODE(pc) (gdbarch_skip_trampoline_code (current_gdbarch, pc))
#endif
+/* 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. */
+
+typedef CORE_ADDR (gdbarch_skip_solib_resolver_ftype) (CORE_ADDR pc);
+extern CORE_ADDR gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, CORE_ADDR pc);
+extern void set_gdbarch_skip_solib_resolver (struct gdbarch *gdbarch, gdbarch_skip_solib_resolver_ftype *skip_solib_resolver);
+#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SKIP_SOLIB_RESOLVER)
+#error "Non multi-arch definition of SKIP_SOLIB_RESOLVER"
+#endif
+#if !defined (SKIP_SOLIB_RESOLVER)
+#define SKIP_SOLIB_RESOLVER(pc) (gdbarch_skip_solib_resolver (current_gdbarch, pc))
+#endif
+
/* 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. */
@@ -2360,6 +2399,15 @@ extern void set_gdbarch_fetch_pointer_argument (struct gdbarch *gdbarch, gdbarch
#define FETCH_POINTER_ARGUMENT(frame, argi, type) (gdbarch_fetch_pointer_argument (current_gdbarch, frame, argi, type))
#endif
+/* Return the appropriate register set for a core file section with
+ name SECT_NAME and size SECT_SIZE. */
+
+extern int gdbarch_regset_from_core_section_p (struct gdbarch *gdbarch);
+
+typedef const struct regset * (gdbarch_regset_from_core_section_ftype) (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size);
+extern const struct regset * gdbarch_regset_from_core_section (struct gdbarch *gdbarch, const char *sect_name, size_t sect_size);
+extern void set_gdbarch_regset_from_core_section (struct gdbarch *gdbarch, gdbarch_regset_from_core_section_ftype *regset_from_core_section);
+
extern struct gdbarch_tdep *gdbarch_tdep (struct gdbarch *gdbarch);
@@ -2507,6 +2555,27 @@ extern void *gdbarch_obstack_zalloc (struct gdbarch *gdbarch, long size);
extern int gdbarch_update_p (struct gdbarch_info info);
+/* Helper function. Find an architecture matching info.
+
+ INFO should be initialized using gdbarch_info_init, relevant fields
+ set, and then finished using gdbarch_info_fill.
+
+ Returns the corresponding architecture, or NULL if no matching
+ architecture was found. "current_gdbarch" is not updated. */
+
+extern struct gdbarch *gdbarch_find_by_info (struct gdbarch_info info);
+
+
+/* Helper function. Set the global "current_gdbarch" to "gdbarch".
+
+ FIXME: kettenis/20031124: Of the functions that follow, only
+ gdbarch_from_bfd is supposed to survive. The others will
+ dissappear since in the future GDB will (hopefully) be truly
+ multi-arch. However, for now we're still stuck with the concept of
+ a single active architecture. */
+
+extern void deprecated_current_gdbarch_select_hack (struct gdbarch *gdbarch);
+
/* Register per-architecture data-pointer.
@@ -2596,11 +2665,6 @@ extern void set_gdbarch_from_file (bfd *);
extern void initialize_current_architecture (void);
-/* For non-multiarched targets, do any initialization of the default
- gdbarch object necessary after the _initialize_MODULE functions
- have run. */
-extern void initialize_non_multiarch (void);
-
/* gdbarch trace variable */
extern int gdbarch_debug;
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 0884c3c..95db711 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -323,8 +323,9 @@ do
# You cannot specify both a zero INVALID_P and a POSTDEFAULT.
- # Variable declarations can refer to ``gdbarch'' which will
- # contain the current architecture. Care should be taken.
+ # Variable declarations can refer to ``current_gdbarch'' which
+ # will contain the current architecture. Care should be
+ # taken.
invalid_p ) : ;;
@@ -463,16 +464,14 @@ f:2:ECOFF_REG_TO_REGNUM:int:ecoff_reg_to_regnum:int ecoff_regnr:ecoff_regnr:::no
# 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
# Convert from an sdb register number to an internal gdb register number.
-# This should be defined in tm.h, if REGISTER_NAMES is not set up
-# to map one to one onto the sdb register numbers.
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
-# REGISTER_TYPE is a direct replacement for REGISTER_VIRTUAL_TYPE.
+# 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 REGISTER_VIRTUAL_TYPE.
-F:2:REGISTER_VIRTUAL_TYPE:struct type *:deprecated_register_virtual_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
@@ -488,12 +487,12 @@ F::DEPRECATED_REGISTER_BYTE:int:deprecated_register_byte:int reg_nr:reg_nr::gene
# sizes agree with the value computed from REGISTER_TYPE,
# DEPRECATED_REGISTER_RAW_SIZE can be deleted. See: maint print
# registers.
-F:2:REGISTER_RAW_SIZE:int:deprecated_register_raw_size:int reg_nr:reg_nr::generic_register_size:generic_register_size
+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:REGISTER_VIRTUAL_SIZE:int:deprecated_register_virtual_size:int reg_nr:reg_nr::generic_register_size:generic_register_size
+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
@@ -595,19 +594,33 @@ f:2:POINTER_TO_ADDRESS:CORE_ADDR:pointer_to_address:struct type *type, const voi
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:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0
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
-#
+
+# 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
+
+# The deprecated methods RETURN_VALUE_ON_STACK, EXTRACT_RETURN_VALUE,
+# STORE_RETURN_VALUE and USE_STRUCT_CONVENTION have all been folded
+# into RETURN_VALUE. For the moment do not try to fold in
+# EXTRACT_STRUCT_VALUE_ADDRESS as, dependant on the ABI, the debug
+# info, and the level of effort, it may well be possible to find the
+# address of a structure being return on the stack. Someone else can
+# make that change.
+
+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
+
F:2:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:struct regcache *regcache:regcache
F:2:DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:deprecated_extract_struct_value_address:char *regbuf:regbuf
-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
#
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
@@ -616,6 +629,7 @@ f:2:SKIP_PROLOGUE:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip::0:0
f:2:PROLOGUE_FRAMELESS_P:int:prologue_frameless_p:CORE_ADDR ip:ip::0:generic_prologue_frameless_p::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:-1
@@ -648,14 +662,17 @@ F:2:FRAME_NUM_ARGS:int:frame_num_args:struct frame_info *frame: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
+# 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
#
-v:2:TARGET_FLOAT_FORMAT:const struct floatformat *:float_format::::::default_float_format (gdbarch)::%s:(TARGET_FLOAT_FORMAT)->name
-v:2:TARGET_DOUBLE_FORMAT:const struct floatformat *:double_format::::::default_double_format (gdbarch)::%s:(TARGET_DOUBLE_FORMAT)->name
-v:2:TARGET_LONG_DOUBLE_FORMAT:const struct floatformat *:long_double_format::::::default_double_format (gdbarch)::%s:(TARGET_LONG_DOUBLE_FORMAT)->name
-f:2:CONVERT_FROM_FUNC_PTR_ADDR:CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR addr:addr:::core_addr_identity::0
+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
# 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
@@ -666,7 +683,7 @@ f:2:CONVERT_FROM_FUNC_PTR_ADDR:CORE_ADDR:convert_from_func_ptr_addr:CORE_ADDR ad
# 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
-# It is not at all clear why SMASH_TEXT_ADDRESS is not folded into
+# 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
# FIXME/cagney/2001-01-18: This should be split in two. A target method that indicates if
@@ -684,6 +701,10 @@ f::TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, struct disassemble_info *info:v
f:2:SKIP_TRAMPOLINE_CODE: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.
+f:2:SKIP_SOLIB_RESOLVER: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.
@@ -744,8 +765,12 @@ M:2:ADDRESS_CLASS_TYPE_FLAGS_TO_NAME:const char *:address_class_type_flags_to_na
M:2:ADDRESS_CLASS_NAME_TO_TYPE_FLAGS:int:address_class_name_to_type_flags:const char *name, int *type_flags_ptr:name, type_flags_ptr
# Is a register in a group
m:::int:register_reggroup_p:int regnum, struct reggroup *reggroup:regnum, reggroup:::default_register_reggroup_p::0
-# Fetch the pointer to the ith function argument.
+# 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
+
+# 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
EOF
}
@@ -850,7 +875,9 @@ struct objfile;
struct minimal_symbol;
struct regcache;
struct reggroup;
+struct regset;
struct disassemble_info;
+struct target_ops;
extern struct gdbarch *current_gdbarch;
@@ -1134,6 +1161,27 @@ extern void *gdbarch_obstack_zalloc (struct gdbarch *gdbarch, long size);
extern int gdbarch_update_p (struct gdbarch_info info);
+/* Helper function. Find an architecture matching info.
+
+ INFO should be initialized using gdbarch_info_init, relevant fields
+ set, and then finished using gdbarch_info_fill.
+
+ Returns the corresponding architecture, or NULL if no matching
+ architecture was found. "current_gdbarch" is not updated. */
+
+extern struct gdbarch *gdbarch_find_by_info (struct gdbarch_info info);
+
+
+/* Helper function. Set the global "current_gdbarch" to "gdbarch".
+
+ FIXME: kettenis/20031124: Of the functions that follow, only
+ gdbarch_from_bfd is supposed to survive. The others will
+ dissappear since in the future GDB will (hopefully) be truly
+ multi-arch. However, for now we're still stuck with the concept of
+ a single active architecture. */
+
+extern void deprecated_current_gdbarch_select_hack (struct gdbarch *gdbarch);
+
/* Register per-architecture data-pointer.
@@ -1223,11 +1271,6 @@ extern void set_gdbarch_from_file (bfd *);
extern void initialize_current_architecture (void);
-/* For non-multiarched targets, do any initialization of the default
- gdbarch object necessary after the _initialize_MODULE functions
- have run. */
-extern void initialize_non_multiarch (void);
-
/* gdbarch trace variable */
extern int gdbarch_debug;
@@ -1267,12 +1310,7 @@ cat <<EOF
/* Static function declarations */
-static void verify_gdbarch (struct gdbarch *gdbarch);
static void alloc_gdbarch_data (struct gdbarch *);
-static void init_gdbarch_swap (struct gdbarch *);
-static void clear_gdbarch_swap (struct gdbarch *);
-static void swapout_gdbarch_swap (struct gdbarch *);
-static void swapin_gdbarch_swap (struct gdbarch *);
/* Non-zero if we want to trace architecture code. */
@@ -1396,24 +1434,11 @@ cat <<EOF
};
struct gdbarch *current_gdbarch = &startup_gdbarch;
-
-/* Do any initialization needed for a non-multiarch configuration
- after the _initialize_MODULE functions have been run. */
-void
-initialize_non_multiarch (void)
-{
- alloc_gdbarch_data (&startup_gdbarch);
- /* Ensure that all swap areas are zeroed so that they again think
- they are starting from scratch. */
- clear_gdbarch_swap (&startup_gdbarch);
- init_gdbarch_swap (&startup_gdbarch);
-}
EOF
# Create a new gdbarch struct
-printf "\n"
-printf "\n"
cat <<EOF
+
/* Create a new \`\`struct gdbarch'' based on information provided by
\`\`struct gdbarch_info''. */
EOF
@@ -1504,13 +1529,19 @@ gdbarch_free (struct gdbarch *arch)
EOF
# verify a new architecture
-printf "\n"
-printf "\n"
-printf "/* Ensure that all values in a GDBARCH are reasonable. */\n"
-printf "\n"
cat <<EOF
+
+
+/* Ensure that all values in a GDBARCH are reasonable. */
+
+/* NOTE/WARNING: The parameter is called \`\`current_gdbarch'' so that it
+ just happens to match the global variable \`\`current_gdbarch''. That
+ way macros refering to that variable get the local and not the global
+ version - ulgh. Once everything is parameterised with gdbarch, this
+ will go away. */
+
static void
-verify_gdbarch (struct gdbarch *gdbarch)
+verify_gdbarch (struct gdbarch *current_gdbarch)
{
struct ui_file *log;
struct cleanup *cleanups;
@@ -1519,9 +1550,9 @@ verify_gdbarch (struct gdbarch *gdbarch)
log = mem_fileopen ();
cleanups = make_cleanup_ui_file_delete (log);
/* fundamental */
- if (gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
+ if (current_gdbarch->byte_order == BFD_ENDIAN_UNKNOWN)
fprintf_unfiltered (log, "\n\tbyte-order");
- if (gdbarch->bfd_arch_info == NULL)
+ if (current_gdbarch->bfd_arch_info == NULL)
fprintf_unfiltered (log, "\n\tbfd_arch_info");
/* Check those that need to be defined for the given multi-arch level. */
EOF
@@ -1539,15 +1570,15 @@ do
elif [ -n "${invalid_p}" -a -n "${postdefault}" ]
then
printf " if (${invalid_p})\n"
- printf " gdbarch->${function} = ${postdefault};\n"
+ printf " current_gdbarch->${function} = ${postdefault};\n"
elif [ -n "${predefault}" -a -n "${postdefault}" ]
then
- printf " if (gdbarch->${function} == ${predefault})\n"
- printf " gdbarch->${function} = ${postdefault};\n"
+ printf " if (current_gdbarch->${function} == ${predefault})\n"
+ printf " current_gdbarch->${function} = ${postdefault};\n"
elif [ -n "${postdefault}" ]
then
- printf " if (gdbarch->${function} == 0)\n"
- printf " gdbarch->${function} = ${postdefault};\n"
+ printf " if (current_gdbarch->${function} == 0)\n"
+ printf " current_gdbarch->${function} = ${postdefault};\n"
elif [ -n "${invalid_p}" ]
then
printf " if ((GDB_MULTI_ARCH ${gt_level})\n"
@@ -1556,7 +1587,7 @@ do
elif [ -n "${predefault}" ]
then
printf " if ((GDB_MULTI_ARCH ${gt_level})\n"
- printf " && (gdbarch->${function} == ${predefault}))\n"
+ printf " && (current_gdbarch->${function} == ${predefault}))\n"
printf " fprintf_unfiltered (log, \"\\\\n\\\\t${function}\");\n"
fi
fi
@@ -1585,7 +1616,7 @@ cat <<EOF
will go away. */
void
-gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
+gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
{
fprintf_unfiltered (file,
"gdbarch_dump: GDB_MULTI_ARCH = %d\\n",
@@ -1927,31 +1958,21 @@ register_gdbarch_swap (void *data,
}
static void
-clear_gdbarch_swap (struct gdbarch *gdbarch)
-{
- struct gdbarch_swap *curr;
- for (curr = gdbarch->swap;
- curr != NULL;
- curr = curr->next)
- {
- memset (curr->source->data, 0, curr->source->sizeof_data);
- }
-}
-
-static void
-init_gdbarch_swap (struct gdbarch *gdbarch)
+current_gdbarch_swap_init_hack (void)
{
struct gdbarch_swap_registration *rego;
- struct gdbarch_swap **curr = &gdbarch->swap;
+ struct gdbarch_swap **curr = &current_gdbarch->swap;
for (rego = gdbarch_swap_registry.registrations;
rego != NULL;
rego = rego->next)
{
if (rego->data != NULL)
{
- (*curr) = GDBARCH_OBSTACK_ZALLOC (gdbarch, struct gdbarch_swap);
+ (*curr) = GDBARCH_OBSTACK_ZALLOC (current_gdbarch,
+ struct gdbarch_swap);
(*curr)->source = rego;
- (*curr)->swap = gdbarch_obstack_zalloc (gdbarch, rego->sizeof_data);
+ (*curr)->swap = gdbarch_obstack_zalloc (current_gdbarch,
+ rego->sizeof_data);
(*curr)->next = NULL;
curr = &(*curr)->next;
}
@@ -1960,24 +1981,35 @@ init_gdbarch_swap (struct gdbarch *gdbarch)
}
}
-static void
-swapout_gdbarch_swap (struct gdbarch *gdbarch)
+static struct gdbarch *
+current_gdbarch_swap_out_hack (void)
{
+ struct gdbarch *old_gdbarch = current_gdbarch;
struct gdbarch_swap *curr;
- for (curr = gdbarch->swap;
+
+ gdb_assert (old_gdbarch != NULL);
+ for (curr = old_gdbarch->swap;
curr != NULL;
curr = curr->next)
- memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
+ {
+ memcpy (curr->swap, curr->source->data, curr->source->sizeof_data);
+ memset (curr->source->data, 0, curr->source->sizeof_data);
+ }
+ current_gdbarch = NULL;
+ return old_gdbarch;
}
static void
-swapin_gdbarch_swap (struct gdbarch *gdbarch)
+current_gdbarch_swap_in_hack (struct gdbarch *new_gdbarch)
{
struct gdbarch_swap *curr;
- for (curr = gdbarch->swap;
+
+ gdb_assert (current_gdbarch == NULL);
+ for (curr = new_gdbarch->swap;
curr != NULL;
curr = curr->next)
memcpy (curr->source->data, curr->swap, curr->source->sizeof_data);
+ current_gdbarch = new_gdbarch;
}
@@ -2100,50 +2132,24 @@ gdbarch_list_lookup_by_info (struct gdbarch_list *arches,
}
-/* Update the current architecture. Return ZERO if the update request
- failed. */
+/* Find an architecture that matches the specified INFO. Create a new
+ architecture if needed. Return that new architecture. Assumes
+ that there is no current architecture. */
-int
-gdbarch_update_p (struct gdbarch_info info)
+static struct gdbarch *
+find_arch_by_info (struct gdbarch *old_gdbarch, struct gdbarch_info info)
{
struct gdbarch *new_gdbarch;
- struct gdbarch *old_gdbarch;
struct gdbarch_registration *rego;
+ /* The existing architecture has been swapped out - all this code
+ works from a clean slate. */
+ gdb_assert (current_gdbarch == NULL);
+
/* Fill in missing parts of the INFO struct using a number of
- sources: \`\`set ...''; INFOabfd supplied; existing target. */
-
- /* \`\`(gdb) set architecture ...'' */
- if (info.bfd_arch_info == NULL
- && !TARGET_ARCHITECTURE_AUTO)
- info.bfd_arch_info = TARGET_ARCHITECTURE;
- if (info.bfd_arch_info == NULL
- && info.abfd != NULL
- && bfd_get_arch (info.abfd) != bfd_arch_unknown
- && bfd_get_arch (info.abfd) != bfd_arch_obscure)
- info.bfd_arch_info = bfd_get_arch_info (info.abfd);
- if (info.bfd_arch_info == NULL)
- info.bfd_arch_info = TARGET_ARCHITECTURE;
-
- /* \`\`(gdb) set byte-order ...'' */
- if (info.byte_order == BFD_ENDIAN_UNKNOWN
- && !TARGET_BYTE_ORDER_AUTO)
- info.byte_order = TARGET_BYTE_ORDER;
- /* From the INFO struct. */
- if (info.byte_order == BFD_ENDIAN_UNKNOWN
- && info.abfd != NULL)
- info.byte_order = (bfd_big_endian (info.abfd) ? BFD_ENDIAN_BIG
- : bfd_little_endian (info.abfd) ? BFD_ENDIAN_LITTLE
- : BFD_ENDIAN_UNKNOWN);
- /* From the current target. */
- if (info.byte_order == BFD_ENDIAN_UNKNOWN)
- info.byte_order = TARGET_BYTE_ORDER;
-
- /* \`\`(gdb) set osabi ...'' is handled by gdbarch_lookup_osabi. */
- if (info.osabi == GDB_OSABI_UNINITIALIZED)
- info.osabi = gdbarch_lookup_osabi (info.abfd);
- if (info.osabi == GDB_OSABI_UNINITIALIZED)
- info.osabi = current_gdbarch->osabi;
+ sources: "set ..."; INFOabfd supplied; and the existing
+ architecture. */
+ gdbarch_info_fill (old_gdbarch, &info);
/* Must have found some sort of architecture. */
gdb_assert (info.bfd_arch_info != NULL);
@@ -2151,28 +2157,28 @@ gdbarch_update_p (struct gdbarch_info info)
if (gdbarch_debug)
{
fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: info.bfd_arch_info %s\n",
+ "find_arch_by_info: info.bfd_arch_info %s\n",
(info.bfd_arch_info != NULL
? info.bfd_arch_info->printable_name
: "(null)"));
fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: info.byte_order %d (%s)\n",
+ "find_arch_by_info: info.byte_order %d (%s)\n",
info.byte_order,
(info.byte_order == BFD_ENDIAN_BIG ? "big"
: info.byte_order == BFD_ENDIAN_LITTLE ? "little"
: "default"));
fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: info.osabi %d (%s)\n",
+ "find_arch_by_info: info.osabi %d (%s)\n",
info.osabi, gdbarch_osabi_name (info.osabi));
fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: info.abfd 0x%lx\n",
+ "find_arch_by_info: info.abfd 0x%lx\n",
(long) info.abfd);
fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: info.tdep_info 0x%lx\n",
+ "find_arch_by_info: info.tdep_info 0x%lx\n",
(long) info.tdep_info);
}
- /* Find the target that knows about this architecture. */
+ /* Find the tdep code that knows about this architecture. */
for (rego = gdbarch_registry;
rego != NULL;
rego = rego->next)
@@ -2181,86 +2187,61 @@ gdbarch_update_p (struct gdbarch_info info)
if (rego == NULL)
{
if (gdbarch_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_update: No matching architecture\\n");
+ fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
+ "No matching architecture\n");
return 0;
}
- /* Swap the data belonging to the old target out setting the
- installed data to zero. This stops the ->init() function trying
- to refer to the previous architecture's global data structures. */
- swapout_gdbarch_swap (current_gdbarch);
- clear_gdbarch_swap (current_gdbarch);
-
- /* Save the previously selected architecture, setting the global to
- NULL. This stops ->init() trying to use the previous
- architecture's configuration. The previous architecture may not
- even be of the same architecture family. The most recent
- architecture of the same family is found at the head of the
- rego->arches list. */
- old_gdbarch = current_gdbarch;
- current_gdbarch = NULL;
-
- /* Ask the target for a replacement architecture. */
+ /* Ask the tdep code for an architecture that matches "info". */
new_gdbarch = rego->init (info, rego->arches);
- /* Did the target like it? No. Reject the change and revert to the
- old architecture. */
+ /* Did the tdep code like it? No. Reject the change and revert to
+ the old architecture. */
if (new_gdbarch == NULL)
{
if (gdbarch_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Target rejected architecture\\n");
- swapin_gdbarch_swap (old_gdbarch);
- current_gdbarch = old_gdbarch;
- return 0;
+ fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
+ "Target rejected architecture\n");
+ return NULL;
}
- /* Did the architecture change? No. Oops, put the old architecture
- back. */
- if (old_gdbarch == new_gdbarch)
+ /* Is this a pre-existing architecture (as determined by already
+ being initialized)? Move it to the front of the architecture
+ list (keeping the list sorted Most Recently Used). */
+ if (new_gdbarch->initialized_p)
{
+ struct gdbarch_list **list;
+ struct gdbarch_list *this;
if (gdbarch_debug)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_update: Architecture 0x%08lx (%s) unchanged\\n",
+ fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
+ "Previous architecture 0x%08lx (%s) selected\n",
(long) new_gdbarch,
new_gdbarch->bfd_arch_info->printable_name);
- swapin_gdbarch_swap (old_gdbarch);
- current_gdbarch = old_gdbarch;
- return 1;
+ /* Find the existing arch in the list. */
+ for (list = &rego->arches;
+ (*list) != NULL && (*list)->gdbarch != new_gdbarch;
+ list = &(*list)->next);
+ /* It had better be in the list of architectures. */
+ gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
+ /* Unlink THIS. */
+ this = (*list);
+ (*list) = this->next;
+ /* Insert THIS at the front. */
+ this->next = rego->arches;
+ rego->arches = this;
+ /* Return it. */
+ return new_gdbarch;
}
- /* Is this a pre-existing architecture? Yes. Move it to the front
- of the list of architectures (keeping the list sorted Most
- Recently Used) and then copy it in. */
- {
- struct gdbarch_list **list;
- for (list = &rego->arches;
- (*list) != NULL;
- list = &(*list)->next)
- {
- if ((*list)->gdbarch == new_gdbarch)
- {
- struct gdbarch_list *this;
- if (gdbarch_debug)
- fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: Previous architecture 0x%08lx (%s) selected\n",
- (long) new_gdbarch,
- new_gdbarch->bfd_arch_info->printable_name);
- /* Unlink this. */
- this = (*list);
- (*list) = this->next;
- /* Insert in the front. */
- this->next = rego->arches;
- rego->arches = this;
- /* Copy the new architecture in. */
- current_gdbarch = new_gdbarch;
- swapin_gdbarch_swap (new_gdbarch);
- architecture_changed_event ();
- return 1;
- }
- }
- }
-
- /* Prepend this new architecture to the architecture list (keep the
- list sorted Most Recently Used). */
+ /* It's a new architecture. */
+ if (gdbarch_debug)
+ fprintf_unfiltered (gdb_stdlog, "find_arch_by_info: "
+ "New architecture 0x%08lx (%s) selected\n",
+ (long) new_gdbarch,
+ new_gdbarch->bfd_arch_info->printable_name);
+
+ /* Insert the new architecture into the front of the architecture
+ list (keep the list sorted Most Recently Used). */
{
struct gdbarch_list *this = XMALLOC (struct gdbarch_list);
this->next = rego->arches;
@@ -2268,37 +2249,59 @@ gdbarch_update_p (struct gdbarch_info info)
rego->arches = this;
}
- /* Switch to this new architecture marking it initialized. */
- current_gdbarch = new_gdbarch;
- current_gdbarch->initialized_p = 1;
- if (gdbarch_debug)
- {
- fprintf_unfiltered (gdb_stdlog,
- "gdbarch_update: New architecture 0x%08lx (%s) selected\\n",
- (long) new_gdbarch,
- new_gdbarch->bfd_arch_info->printable_name);
- }
-
/* Check that the newly installed architecture is valid. Plug in
any post init values. */
new_gdbarch->dump_tdep = rego->dump_tdep;
verify_gdbarch (new_gdbarch);
+ new_gdbarch->initialized_p = 1;
- /* Initialize the per-architecture memory (swap) areas.
- CURRENT_GDBARCH must be update before these modules are
- called. */
- init_gdbarch_swap (new_gdbarch);
-
- /* Initialize the per-architecture data. CURRENT_GDBARCH
- must be updated before these modules are called. */
- architecture_changed_event ();
+ /* Initialize any per-architecture swap areas. This phase requires
+ a valid global CURRENT_GDBARCH. Set it momentarially, and then
+ swap the entire architecture out. */
+ current_gdbarch = new_gdbarch;
+ current_gdbarch_swap_init_hack ();
+ current_gdbarch_swap_out_hack ();
if (gdbarch_debug)
- gdbarch_dump (current_gdbarch, gdb_stdlog);
+ gdbarch_dump (new_gdbarch, gdb_stdlog);
- return 1;
+ return new_gdbarch;
}
+struct gdbarch *
+gdbarch_find_by_info (struct gdbarch_info info)
+{
+ /* Save the previously selected architecture, setting the global to
+ NULL. This stops things like gdbarch->init() trying to use the
+ previous architecture's configuration. The previous architecture
+ may not even be of the same architecture family. The most recent
+ architecture of the same family is found at the head of the
+ rego->arches list. */
+ struct gdbarch *old_gdbarch = current_gdbarch_swap_out_hack ();
+
+ /* Find the specified architecture. */
+ struct gdbarch *new_gdbarch = find_arch_by_info (old_gdbarch, info);
+
+ /* Restore the existing architecture. */
+ gdb_assert (current_gdbarch == NULL);
+ current_gdbarch_swap_in_hack (old_gdbarch);
+
+ return new_gdbarch;
+}
+
+/* Make the specified architecture current, swapping the existing one
+ out. */
+
+void
+deprecated_current_gdbarch_select_hack (struct gdbarch *new_gdbarch)
+{
+ gdb_assert (new_gdbarch != NULL);
+ gdb_assert (current_gdbarch != NULL);
+ gdb_assert (new_gdbarch->initialized_p);
+ current_gdbarch_swap_out_hack ();
+ current_gdbarch_swap_in_hack (new_gdbarch);
+ architecture_changed_event ();
+}
extern void _initialize_gdbarch (void);
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 42dab16..603c33f 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,20 @@
+2003-10-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * linux-low.c (linux_resume): Take a struct thread_resume *
+ argument.
+ (linux_wait): Update call.
+ (resume_ptr): New static variable.
+ (linux_continue_one_thread): Renamed from
+ linux_continue_one_process. Use resume_ptr.
+ (linux_resume): Use linux_continue_one_thread.
+ * server.c (handle_v_cont, handle_v_requests): New functions.
+ (myresume): New function.
+ (main): Handle 'v' case.
+ * target.h (struct thread_resume): New type.
+ (struct target_ops): Change argument of "resume" to struct
+ thread_resume *.
+ (myresume): Delete macro.
+
2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in (install-only): Create dest dir. Support DESTDIR.
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 55c187c..68b3f65 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -52,7 +52,7 @@ int using_threads;
static void linux_resume_one_process (struct inferior_list_entry *entry,
int step, int signal);
-static void linux_resume (int step, int signal);
+static void linux_resume (struct thread_resume *resume_info);
static void stop_all_processes (void);
static int linux_wait_for_event (struct thread_info *child);
@@ -652,7 +652,12 @@ retry:
/* No stepping, no signal - unless one is pending already, of course. */
if (child == NULL)
- linux_resume (0, 0);
+ {
+ struct thread_resume resume_info;
+ resume_info.thread = -1;
+ resume_info.step = resume_info.sig = resume_info.leave_stopped = 0;
+ linux_resume (&resume_info);
+ }
}
enable_async_io ();
@@ -868,33 +873,48 @@ linux_resume_one_process (struct inferior_list_entry *entry,
perror_with_name ("ptrace");
}
-/* This function is called once per process other than the first
- one. The first process we are told the signal to continue
- with, and whether to step or continue; for all others, any
- existing signals will be marked in status_pending_p to be
- reported momentarily, and we preserve the stepping flag. */
+static struct thread_resume *resume_ptr;
+
+/* This function is called once per thread. We look up the thread
+ in RESUME_PTR, which will tell us whether to resume, step, or leave
+ the thread stopped; and what signal, if any, it should be sent.
+ For threads which we aren't explicitly told otherwise, we preserve
+ the stepping flag; this is used for stepping over gdbserver-placed
+ breakpoints. If the thread has a status pending, it may not actually
+ be resumed. */
static void
-linux_continue_one_process (struct inferior_list_entry *entry)
+linux_continue_one_thread (struct inferior_list_entry *entry)
{
struct process_info *process;
+ struct thread_info *thread;
+ int ndx, step;
+
+ thread = (struct thread_info *) entry;
+ process = get_thread_process (thread);
+
+ ndx = 0;
+ while (resume_ptr[ndx].thread != -1 && resume_ptr[ndx].thread != entry->id)
+ ndx++;
+
+ if (resume_ptr[ndx].leave_stopped)
+ return;
+
+ if (resume_ptr[ndx].thread == -1)
+ step = process->stepping || resume_ptr[ndx].step;
+ else
+ step = resume_ptr[ndx].step;
- process = (struct process_info *) entry;
- linux_resume_one_process (entry, process->stepping, 0);
+ linux_resume_one_process (&process->head, step, resume_ptr[ndx].sig);
}
static void
-linux_resume (int step, int signal)
+linux_resume (struct thread_resume *resume_info)
{
- struct process_info *process;
-
- process = get_thread_process (current_inferior);
-
- /* If the current process has a status pending, this signal will
- be enqueued and sent later. */
- linux_resume_one_process (&process->head, step, signal);
+ /* Yes, this is quadratic. If it ever becomes a problem then it's
+ fairly easy to fix. Yes, the use of a global here is rather ugly. */
- if (cont_thread == 0 || cont_thread == -1)
- for_each_inferior (&all_processes, linux_continue_one_process);
+ resume_ptr = resume_info;
+ for_each_inferior (&all_threads, linux_continue_one_thread);
}
#ifdef HAVE_LINUX_USRREGS
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 81fde5b..dffff2e 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -125,6 +125,155 @@ handle_query (char *own_buf)
own_buf[0] = 0;
}
+/* Parse vCont packets. */
+void
+handle_v_cont (char *own_buf, char *status, unsigned char *signal)
+{
+ char *p, *q;
+ int n = 0, i = 0;
+ struct thread_resume *resume_info, default_action;
+
+ /* Count the number of semicolons in the packet. There should be one
+ for every action. */
+ p = &own_buf[5];
+ while (p)
+ {
+ n++;
+ p++;
+ p = strchr (p, ';');
+ }
+ /* Allocate room for one extra action, for the default remain-stopped
+ behavior; if no default action is in the list, we'll need the extra
+ slot. */
+ resume_info = malloc ((n + 1) * sizeof (resume_info[0]));
+
+ default_action.thread = -1;
+ default_action.leave_stopped = 1;
+ default_action.step = 0;
+ default_action.sig = 0;
+
+ p = &own_buf[5];
+ i = 0;
+ while (*p)
+ {
+ p++;
+
+ resume_info[i].leave_stopped = 0;
+
+ if (p[0] == 's' || p[0] == 'S')
+ resume_info[i].step = 1;
+ else if (p[0] == 'c' || p[0] == 'C')
+ resume_info[i].step = 0;
+ else
+ goto err;
+
+ if (p[0] == 'S' || p[0] == 'C')
+ {
+ int sig;
+ sig = strtol (p + 1, &q, 16);
+ if (p == q)
+ goto err;
+ p = q;
+
+ if (!target_signal_to_host_p (sig))
+ goto err;
+ resume_info[i].sig = target_signal_to_host (sig);
+ }
+ else
+ {
+ resume_info[i].sig = 0;
+ p = p + 1;
+ }
+
+ if (p[0] == 0)
+ {
+ resume_info[i].thread = -1;
+ default_action = resume_info[i];
+
+ /* Note: we don't increment i here, we'll overwrite this entry
+ the next time through. */
+ }
+ else if (p[0] == ':')
+ {
+ resume_info[i].thread = strtol (p + 1, &q, 16);
+ if (p == q)
+ goto err;
+ p = q;
+ if (p[0] != ';' && p[0] != 0)
+ goto err;
+
+ i++;
+ }
+ }
+
+ resume_info[i] = default_action;
+
+ /* Still used in occasional places in the backend. */
+ if (n == 1 && resume_info[0].thread != -1)
+ cont_thread = resume_info[0].thread;
+ else
+ cont_thread = -1;
+
+ (*the_target->resume) (resume_info);
+
+ free (resume_info);
+
+ *signal = mywait (status, 1);
+ prepare_resume_reply (own_buf, *status, *signal);
+ return;
+
+err:
+ /* No other way to report an error... */
+ strcpy (own_buf, "");
+ free (resume_info);
+ return;
+}
+
+/* Handle all of the extended 'v' packets. */
+void
+handle_v_requests (char *own_buf, char *status, unsigned char *signal)
+{
+ if (strncmp (own_buf, "vCont;", 6) == 0)
+ {
+ handle_v_cont (own_buf, status, signal);
+ return;
+ }
+
+ if (strncmp (own_buf, "vCont?", 6) == 0)
+ {
+ strcpy (own_buf, "vCont;c;C;s;S");
+ return;
+ }
+
+ /* Otherwise we didn't know what packet it was. Say we didn't
+ understand it. */
+ own_buf[0] = 0;
+ return;
+}
+
+void
+myresume (int step, int sig)
+{
+ struct thread_resume resume_info[2];
+ int n = 0;
+
+ if (step || sig || cont_thread > 0)
+ {
+ resume_info[0].thread
+ = ((struct inferior_list_entry *) current_inferior)->id;
+ resume_info[0].step = step;
+ resume_info[0].sig = sig;
+ resume_info[0].leave_stopped = 0;
+ n++;
+ }
+ resume_info[n].thread = -1;
+ resume_info[n].step = 0;
+ resume_info[n].sig = 0;
+ resume_info[n].leave_stopped = (cont_thread > 0);
+
+ (*the_target->resume) (resume_info);
+}
+
static int attached;
static void
@@ -383,6 +532,10 @@ main (int argc, char *argv[])
own_buf[0] = '\0';
break;
}
+ case 'v':
+ /* Extended (long) request. */
+ handle_v_requests (own_buf, &status, &signal);
+ break;
default:
/* It is a request we don't understand. Respond with an
empty packet so that gdb knows that we don't support this
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index 1c47a3ae..aa0a44a 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -24,6 +24,25 @@
#ifndef TARGET_H
#define TARGET_H
+/* This structure describes how to resume a particular thread (or
+ all threads) based on the client's request. If thread is -1, then
+ this entry applies to all threads. These are generally passed around
+ as an array, and terminated by a thread == -1 entry. */
+
+struct thread_resume
+{
+ int thread;
+
+ /* If non-zero, leave this thread stopped. */
+ int leave_stopped;
+
+ /* If non-zero, we want to single-step. */
+ int step;
+
+ /* If non-zero, send this signal when we resume. */
+ int sig;
+};
+
struct target_ops
{
/* Start a new process.
@@ -56,14 +75,9 @@ struct target_ops
int (*thread_alive) (int pid);
- /* Resume the inferior process.
-
- If STEP is non-zero, we want to single-step.
+ /* Resume the inferior process. */
- If SIGNAL is nonzero, send the process that signal as we resume it.
- */
-
- void (*resume) (int step, int signo);
+ void (*resume) (struct thread_resume *resume_info);
/* Wait for the inferior process to change state.
@@ -132,9 +146,6 @@ void set_target_ops (struct target_ops *);
#define mythread_alive(pid) \
(*the_target->thread_alive) (pid)
-#define myresume(step,signo) \
- (*the_target->resume) (step, signo)
-
#define fetch_inferior_registers(regno) \
(*the_target->fetch_registers) (regno)
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 9953e89..1b6620a 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -129,9 +129,6 @@ struct extra
static void add_name (struct extra *, const char *);
static void add_mangled_type (struct extra *, struct type *);
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE static void cfront_mangle_name (struct type *, int, int);
-#endif /* OBSOLETE CFront */
static void print_bit_vector (B_TYPE *, int);
static void print_arg_types (struct field *, int, int);
static void dump_fn_fieldlists (struct type *, int);
@@ -1478,194 +1475,6 @@ check_typedef (struct type *type)
return type;
}
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* New code added to support parsing of Cfront stabs strings */
-// OBSOLETE #define INIT_EXTRA { pextras->len=0; pextras->str[0]='\0'; }
-// OBSOLETE #define ADD_EXTRA(c) { pextras->str[pextras->len++]=c; }
-
-// OBSOLETE static void
-// OBSOLETE add_name (struct extra *pextras, char *n)
-// OBSOLETE {
-// OBSOLETE int nlen;
-
-// OBSOLETE if ((nlen = (n ? strlen (n) : 0)) == 0)
-// OBSOLETE return;
-// OBSOLETE sprintf (pextras->str + pextras->len, "%d%s", nlen, n);
-// OBSOLETE pextras->len = strlen (pextras->str);
-// OBSOLETE }
-
-// OBSOLETE static void
-// OBSOLETE add_mangled_type (struct extra *pextras, struct type *t)
-// OBSOLETE {
-// OBSOLETE enum type_code tcode;
-// OBSOLETE int tlen, tflags;
-// OBSOLETE char *tname;
-
-// OBSOLETE tcode = TYPE_CODE (t);
-// OBSOLETE tlen = TYPE_LENGTH (t);
-// OBSOLETE tflags = TYPE_FLAGS (t);
-// OBSOLETE tname = TYPE_NAME (t);
-// OBSOLETE /* args of "..." seem to get mangled as "e" */
-
-// OBSOLETE switch (tcode)
-// OBSOLETE {
-// OBSOLETE case TYPE_CODE_INT:
-// OBSOLETE if (tflags == 1)
-// OBSOLETE ADD_EXTRA ('U');
-// OBSOLETE switch (tlen)
-// OBSOLETE {
-// OBSOLETE case 1:
-// OBSOLETE ADD_EXTRA ('c');
-// OBSOLETE break;
-// OBSOLETE case 2:
-// OBSOLETE ADD_EXTRA ('s');
-// OBSOLETE break;
-// OBSOLETE case 4:
-// OBSOLETE {
-// OBSOLETE char *pname;
-// OBSOLETE if ((pname = strrchr (tname, 'l'), pname) && !strcmp (pname, "long"))
-// OBSOLETE {
-// OBSOLETE ADD_EXTRA ('l');
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE ADD_EXTRA ('i');
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE {
-// OBSOLETE complaint (&symfile_complaints, "Bad int type code length x%x",
-// OBSOLETE tlen);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE case TYPE_CODE_FLT:
-// OBSOLETE switch (tlen)
-// OBSOLETE {
-// OBSOLETE case 4:
-// OBSOLETE ADD_EXTRA ('f');
-// OBSOLETE break;
-// OBSOLETE case 8:
-// OBSOLETE ADD_EXTRA ('d');
-// OBSOLETE break;
-// OBSOLETE case 16:
-// OBSOLETE ADD_EXTRA ('r');
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE {
-// OBSOLETE complaint (&symfile_complaints, "Bad float type code length x%x",
-// OBSOLETE tlen);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE case TYPE_CODE_REF:
-// OBSOLETE ADD_EXTRA ('R');
-// OBSOLETE /* followed by what it's a ref to */
-// OBSOLETE break;
-// OBSOLETE case TYPE_CODE_PTR:
-// OBSOLETE ADD_EXTRA ('P');
-// OBSOLETE /* followed by what it's a ptr to */
-// OBSOLETE break;
-// OBSOLETE case TYPE_CODE_TYPEDEF:
-// OBSOLETE {
-// OBSOLETE complaint (&symfile_complaints,
-// OBSOLETE "Typedefs in overloaded functions not yet supported");
-// OBSOLETE }
-// OBSOLETE /* followed by type bytes & name */
-// OBSOLETE break;
-// OBSOLETE case TYPE_CODE_FUNC:
-// OBSOLETE ADD_EXTRA ('F');
-// OBSOLETE /* followed by func's arg '_' & ret types */
-// OBSOLETE break;
-// OBSOLETE case TYPE_CODE_VOID:
-// OBSOLETE ADD_EXTRA ('v');
-// OBSOLETE break;
-// OBSOLETE case TYPE_CODE_METHOD:
-// OBSOLETE ADD_EXTRA ('M');
-// OBSOLETE /* followed by name of class and func's arg '_' & ret types */
-// OBSOLETE add_name (pextras, tname);
-// OBSOLETE ADD_EXTRA ('F'); /* then mangle function */
-// OBSOLETE break;
-// OBSOLETE case TYPE_CODE_STRUCT: /* C struct */
-// OBSOLETE case TYPE_CODE_UNION: /* C union */
-// OBSOLETE case TYPE_CODE_ENUM: /* Enumeration type */
-// OBSOLETE /* followed by name of type */
-// OBSOLETE add_name (pextras, tname);
-// OBSOLETE break;
-
-// OBSOLETE /* errors possible types/not supported */
-// OBSOLETE case TYPE_CODE_CHAR:
-// OBSOLETE case TYPE_CODE_ARRAY: /* Array type */
-// OBSOLETE case TYPE_CODE_MEMBER: /* Member type */
-// OBSOLETE case TYPE_CODE_BOOL:
-// OBSOLETE case TYPE_CODE_COMPLEX: /* Complex float */
-// OBSOLETE case TYPE_CODE_UNDEF:
-// OBSOLETE case TYPE_CODE_SET: /* Pascal sets */
-// OBSOLETE case TYPE_CODE_RANGE:
-// OBSOLETE case TYPE_CODE_STRING:
-// OBSOLETE case TYPE_CODE_BITSTRING:
-// OBSOLETE case TYPE_CODE_ERROR:
-// OBSOLETE default:
-// OBSOLETE {
-// OBSOLETE complaint (&symfile_complaints, "Unknown type code x%x", tcode);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE if (TYPE_TARGET_TYPE (t))
-// OBSOLETE add_mangled_type (pextras, TYPE_TARGET_TYPE (t));
-// OBSOLETE }
-
-// OBSOLETE void
-// OBSOLETE cfront_mangle_name (struct type *type, int i, int j)
-// OBSOLETE {
-// OBSOLETE struct fn_field *f;
-// OBSOLETE char *mangled_name = gdb_mangle_name (type, i, j);
-
-// OBSOLETE f = TYPE_FN_FIELDLIST1 (type, i); /* moved from below */
-
-// OBSOLETE /* kludge to support cfront methods - gdb expects to find "F" for
-// OBSOLETE ARM_mangled names, so when we mangle, we have to add it here */
-// OBSOLETE if (ARM_DEMANGLING)
-// OBSOLETE {
-// OBSOLETE int k;
-// OBSOLETE char *arm_mangled_name;
-// OBSOLETE struct fn_field *method = &f[j];
-// OBSOLETE char *field_name = TYPE_FN_FIELDLIST_NAME (type, i);
-// OBSOLETE char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
-// OBSOLETE char *newname = type_name_no_tag (type);
-
-// OBSOLETE struct type *ftype = TYPE_FN_FIELD_TYPE (f, j);
-// OBSOLETE int nargs = TYPE_NFIELDS (ftype); /* number of args */
-// OBSOLETE struct extra extras, *pextras = &extras;
-// OBSOLETE INIT_EXTRA
-
-// OBSOLETE if (TYPE_FN_FIELD_STATIC_P (f, j)) /* j for sublist within this list */
-// OBSOLETE ADD_EXTRA ('S')
-// OBSOLETE ADD_EXTRA ('F')
-// OBSOLETE /* add args here! */
-// OBSOLETE if (nargs <= 1) /* no args besides this */
-// OBSOLETE ADD_EXTRA ('v')
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE for (k = 1; k < nargs; k++)
-// OBSOLETE {
-// OBSOLETE struct type *t;
-// OBSOLETE t = TYPE_FIELD_TYPE (ftype, k);
-// OBSOLETE add_mangled_type (pextras, t);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE ADD_EXTRA ('\0')
-// OBSOLETE printf ("add_mangled_type: %s\n", extras.str); /* FIXME */
-// OBSOLETE xasprintf (&arm_mangled_name, "%s%s", mangled_name, extras.str);
-// OBSOLETE xfree (mangled_name);
-// OBSOLETE mangled_name = arm_mangled_name;
-// OBSOLETE }
-// OBSOLETE }
-
-// OBSOLETE #undef ADD_EXTRA
-// OBSOLETE /* End of new code added to support parsing of Cfront stabs strings */
-#endif /* OBSOLETE CFront */
-
/* Parse a type expression in the string [P..P+LENGTH). If an error occurs,
silently return builtin_type_void. */
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index a75b169..a61d577 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -1024,7 +1024,7 @@ inf_validate_procs (struct inf *inf)
/* The current thread we're considering. */
struct proc *thread = inf->threads;
- bzero (matched, sizeof (matched));
+ memset (matched, 0, sizeof (matched));
while (thread)
{
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index 9989279..fc4df5d 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -468,7 +468,7 @@ fetch_register (int regno)
if (regno < FP0_REGNUM)
supply_register (regno, (char *) &a_tss + regno_mapping[regno].tss_ofs);
else if (i386_fp_regnum_p (regno) || i386_fpc_regnum_p (regno))
- i387_supply_fsave ((const char *) &npx, regno);
+ i387_supply_fsave (current_regcache, regno, &npx);
else
internal_error (__FILE__, __LINE__,
"Invalid register no. %d in fetch_register.", regno);
@@ -483,7 +483,7 @@ go32_fetch_registers (int regno)
{
for (regno = 0; regno < FP0_REGNUM; regno++)
fetch_register (regno);
- i387_supply_fsave ((const char *) &npx, -1);
+ i387_supply_fsave (current_regcache, -1, &npx);
}
}
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index a2fab9a..ec05f01 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -1,4 +1,4 @@
-/* Target-machine dependent code for Hitachi H8/300, for GDB.
+/* Target-machine dependent code for Renesas H8/300, for GDB.
Copyright 1988, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
@@ -49,7 +49,7 @@ enum
h8300h_reg_size = 4,
h8300_max_reg_size = 4,
};
-#define BINWORD (h8300hmode ? h8300h_reg_size : h8300_reg_size)
+#define BINWORD (h8300hmode && !h8300_normal_mode ? h8300h_reg_size : h8300_reg_size)
enum gdb_regnum
{
@@ -350,7 +350,7 @@ h8300_examine_prologue (CORE_ADDR ip, CORE_ADDR limit,
}
/* If the PC isn't valid, quit now. */
- if (ip == 0 || ip & (h8300hmode ? ~0xffffff : ~0xffff))
+ if (ip == 0 || ip & (h8300hmode && !h8300_normal_mode ? ~0xffffff : ~0xffff))
return 0;
next_ip = h8300_next_prologue_insn (ip, limit, &insn_word);
@@ -478,7 +478,7 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
{
CORE_ADDR func_addr, func_end;
- if (!get_frame_saved_regs (fi))
+ if (!deprecated_get_frame_saved_regs (fi))
{
frame_saved_regs_zalloc (fi);
@@ -492,7 +492,7 @@ h8300_frame_init_saved_regs (struct frame_info *fi)
? sal.end : get_frame_pc (fi);
/* This will fill in fields in fi. */
h8300_examine_prologue (func_addr, limit, get_frame_base (fi),
- get_frame_saved_regs (fi), fi);
+ deprecated_get_frame_saved_regs (fi), fi);
}
/* Else we're out of luck (can't debug completely stripped code).
FIXME. */
@@ -521,7 +521,7 @@ h8300_frame_chain (struct frame_info *thisframe)
E_PC_REGNUM);
return get_frame_base (thisframe);
}
- return get_frame_saved_regs (thisframe)[E_SP_REGNUM];
+ return deprecated_get_frame_saved_regs (thisframe)[E_SP_REGNUM];
}
/* Return the saved PC from this frame.
@@ -559,12 +559,6 @@ h8300_init_extra_frame_info (int fromleaf, struct frame_info *fi)
}
}
-/* Round N up or down to the nearest multiple of UNIT.
- Evaluate N only once, UNIT several times.
- UNIT must be a power of two. */
-#define round_up(n, unit) (((n) + (unit) - 1) & -(unit))
-#define round_down(n, unit) ((n) & -(unit))
-
/* Function: push_dummy_call
Setup the function arguments for calling a function in the inferior.
In this discussion, a `word' is 16 bits on the H8/300s, and 32 bits
@@ -641,12 +635,12 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int argument;
/* First, make sure the stack is properly aligned. */
- sp = round_down (sp, wordsize);
+ sp = align_down (sp, wordsize);
/* Now make sure there's space on the stack for the arguments. We
may over-allocate a little here, but that won't hurt anything. */
for (argument = 0; argument < nargs; argument++)
- stack_alloc += round_up (TYPE_LENGTH (VALUE_TYPE (args[argument])),
+ stack_alloc += align_up (TYPE_LENGTH (VALUE_TYPE (args[argument])),
wordsize);
sp -= stack_alloc;
@@ -665,7 +659,7 @@ h8300_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
char *contents = (char *) VALUE_CONTENTS (args[argument]);
/* Pad the argument appropriately. */
- int padded_len = round_up (len, wordsize);
+ int padded_len = align_up (len, wordsize);
char *padded = alloca (padded_len);
memset (padded, 0, padded_len);
@@ -749,11 +743,11 @@ h8300_pop_frame (void)
{
/* Don't forget E_SP_REGNUM is a frame_saved_regs struct is the
actual value we want, not the address of the value we want. */
- if (get_frame_saved_regs (frame)[regno] && regno != E_SP_REGNUM)
+ if (deprecated_get_frame_saved_regs (frame)[regno] && regno != E_SP_REGNUM)
write_register (regno,
read_memory_integer
- (get_frame_saved_regs (frame)[regno], BINWORD));
- else if (get_frame_saved_regs (frame)[regno] && regno == E_SP_REGNUM)
+ (deprecated_get_frame_saved_regs (frame)[regno], BINWORD));
+ else if (deprecated_get_frame_saved_regs (frame)[regno] && regno == E_SP_REGNUM)
write_register (regno, get_frame_base (frame) + 2 * BINWORD);
}
@@ -950,7 +944,7 @@ h8300_print_register (struct gdbarch *gdbarch, struct ui_file *file,
if (!name || !*name)
return;
- frame_read_signed_register (frame, regno, &rval);
+ rval = get_frame_register_signed (frame, regno);
fprintf_filtered (file, "%-14s ", name);
if (regno == E_PSEUDO_CCR_REGNUM || (regno == E_PSEUDO_EXR_REGNUM && h8300smode))
@@ -1226,8 +1220,18 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
set_gdbarch_stab_reg_to_regnum (gdbarch, h8300_dbg_reg_to_regnum);
set_gdbarch_register_name (gdbarch, h8300_register_name);
- set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
- set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ if(info.bfd_arch_info->mach != bfd_mach_h8300hn)
+ {
+ h8300_normal_mode = 0;
+ set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ }
+ else
+ {
+ h8300_normal_mode = 1;
+ set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
+ }
set_gdbarch_extract_return_value (gdbarch, h8300h_extract_return_value);
set_gdbarch_store_return_value (gdbarch, h8300h_store_return_value);
set_gdbarch_print_insn (gdbarch, print_insn_h8300h);
@@ -1244,8 +1248,18 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
set_gdbarch_stab_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
set_gdbarch_register_name (gdbarch, h8300s_register_name);
- set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
- set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ if(info.bfd_arch_info->mach != bfd_mach_h8300sn)
+ {
+ h8300_normal_mode = 0;
+ set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ }
+ else
+ {
+ h8300_normal_mode = 1;
+ set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
+ }
set_gdbarch_extract_return_value (gdbarch, h8300h_extract_return_value);
set_gdbarch_store_return_value (gdbarch, h8300h_store_return_value);
set_gdbarch_print_insn (gdbarch, print_insn_h8300s);
@@ -1262,8 +1276,18 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
set_gdbarch_stab_reg_to_regnum (gdbarch, h8300s_dbg_reg_to_regnum);
set_gdbarch_register_name (gdbarch, h8300sx_register_name);
- set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
- set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ if(info.bfd_arch_info->mach != bfd_mach_h8300sxn)
+ {
+ h8300_normal_mode = 0;
+ set_gdbarch_ptr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 4 * TARGET_CHAR_BIT);
+ }
+ else
+ {
+ h8300_normal_mode = 1;
+ set_gdbarch_ptr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
+ set_gdbarch_addr_bit (gdbarch, 2 * TARGET_CHAR_BIT);
+ }
set_gdbarch_extract_return_value (gdbarch, h8300h_extract_return_value);
set_gdbarch_store_return_value (gdbarch, h8300h_store_return_value);
set_gdbarch_print_insn (gdbarch, print_insn_h8300s);
@@ -1275,7 +1299,7 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* NOTE: cagney/2002-12-06: This can be deleted when this arch is
ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
+ set_gdbarch_deprecated_init_frame_pc (gdbarch, deprecated_init_frame_pc_default);
/*
* Basic register fields and methods.
diff --git a/gdb/h8500-tdep.c b/gdb/h8500-tdep.c
deleted file mode 100644
index f30fbd0..0000000
--- a/gdb/h8500-tdep.c
+++ /dev/null
@@ -1,739 +0,0 @@
-// OBSOLETE /* Target-dependent code for Hitachi H8/500, for GDB.
-// OBSOLETE
-// OBSOLETE Copyright 1993, 1994, 1995, 1998, 2000, 2001, 2002 Free Software
-// OBSOLETE 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 Contributed by Steve Chamberlain
-// OBSOLETE sac@cygnus.com
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #include "defs.h"
-// OBSOLETE #include "frame.h"
-// OBSOLETE #include "symtab.h"
-// OBSOLETE #include "gdbtypes.h"
-// OBSOLETE #include "gdbcmd.h"
-// OBSOLETE #include "value.h"
-// OBSOLETE #include "dis-asm.h"
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE #define UNSIGNED_SHORT(X) ((X) & 0xffff)
-// OBSOLETE
-// OBSOLETE static int code_size = 2;
-// OBSOLETE
-// OBSOLETE static int data_size = 2;
-// OBSOLETE
-// OBSOLETE /* Shape of an H8/500 frame :
-// OBSOLETE
-// OBSOLETE arg-n
-// OBSOLETE ..
-// OBSOLETE arg-2
-// OBSOLETE arg-1
-// OBSOLETE return address <2 or 4 bytes>
-// OBSOLETE old fp <2 bytes>
-// OBSOLETE auto-n
-// OBSOLETE ..
-// OBSOLETE auto-1
-// OBSOLETE saved registers
-// OBSOLETE
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* an easy to debug H8 stack frame looks like:
-// OBSOLETE 0x6df6 push r6
-// OBSOLETE 0x0d76 mov.w r7,r6
-// OBSOLETE 0x6dfn push reg
-// OBSOLETE 0x7905 nnnn mov.w #n,r5 or 0x1b87 subs #2,sp
-// OBSOLETE 0x1957 sub.w r5,sp
-// OBSOLETE
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #define IS_PUSH(x) (((x) & 0xff00)==0x6d00)
-// OBSOLETE #define IS_LINK_8(x) ((x) == 0x17)
-// OBSOLETE #define IS_LINK_16(x) ((x) == 0x1f)
-// OBSOLETE #define IS_MOVE_FP(x) ((x) == 0x0d76)
-// OBSOLETE #define IS_MOV_SP_FP(x) ((x) == 0x0d76)
-// OBSOLETE #define IS_SUB2_SP(x) ((x) == 0x1b87)
-// OBSOLETE #define IS_MOVK_R5(x) ((x) == 0x7905)
-// OBSOLETE #define IS_SUB_R5SP(x) ((x) == 0x1957)
-// OBSOLETE
-// OBSOLETE #define LINK_8 0x17
-// OBSOLETE #define LINK_16 0x1f
-// OBSOLETE
-// OBSOLETE int minimum_mode = 1;
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE h8500_skip_prologue (CORE_ADDR start_pc)
-// OBSOLETE {
-// OBSOLETE short int w;
-// OBSOLETE
-// OBSOLETE w = read_memory_integer (start_pc, 1);
-// OBSOLETE if (w == LINK_8)
-// OBSOLETE {
-// OBSOLETE start_pc += 2;
-// OBSOLETE w = read_memory_integer (start_pc, 1);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (w == LINK_16)
-// OBSOLETE {
-// OBSOLETE start_pc += 3;
-// OBSOLETE w = read_memory_integer (start_pc, 2);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return start_pc;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE h8500_addr_bits_remove (CORE_ADDR addr)
-// OBSOLETE {
-// OBSOLETE return ((addr) & 0xffffff);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Given a GDB frame, determine the address of the calling function's
-// OBSOLETE frame. This will be used to create a new GDB frame struct, and
-// OBSOLETE then INIT_EXTRA_FRAME_INFO and DEPRECATED_INIT_FRAME_PC will be
-// OBSOLETE called for the new frame.
-// OBSOLETE
-// OBSOLETE For us, the frame address is its stack pointer value, so we look up
-// OBSOLETE the function prologue to determine the caller's sp value, and return it. */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE h8500_frame_chain (struct frame_info *thisframe)
-// OBSOLETE {
-// OBSOLETE if (!inside_entry_file (thisframe->pc))
-// OBSOLETE return (read_memory_integer (get_frame_base (thisframe), PTR_SIZE));
-// OBSOLETE else
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Fetch the instruction at ADDR, returning 0 if ADDR is beyond LIM or
-// OBSOLETE is not the address of a valid instruction, the address of the next
-// OBSOLETE instruction beyond ADDR otherwise. *PWORD1 receives the first word
-// OBSOLETE of the instruction. */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE NEXT_PROLOGUE_INSN (CORE_ADDR addr, CORE_ADDR lim, char *pword1)
-// OBSOLETE {
-// OBSOLETE if (addr < lim + 8)
-// OBSOLETE {
-// OBSOLETE read_memory (addr, pword1, 1);
-// OBSOLETE read_memory (addr, pword1 + 1, 1);
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Examine the prologue of a function. `ip' points to the first
-// OBSOLETE instruction. `limit' is the limit of the prologue (e.g. the addr
-// OBSOLETE of the first linenumber, or perhaps the program counter if we're
-// OBSOLETE stepping through). `frame_sp' is the stack pointer value in use in
-// OBSOLETE this frame. `fsr' is a pointer to a frame_saved_regs structure
-// OBSOLETE into which we put info about the registers saved by this frame.
-// OBSOLETE `fi' is a struct frame_info pointer; we fill in various fields in
-// OBSOLETE it to reflect the offsets of the arg pointer and the locals
-// OBSOLETE pointer. */
-// OBSOLETE
-// OBSOLETE /* Return the saved PC from this frame. */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE frame_saved_pc (struct frame_info *frame)
-// OBSOLETE {
-// OBSOLETE return read_memory_integer (get_frame_base (frame) + 2, PTR_SIZE);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE h8500_pop_frame (void)
-// OBSOLETE {
-// OBSOLETE unsigned regnum;
-// OBSOLETE struct frame_saved_regs fsr;
-// OBSOLETE struct frame_info *frame = get_current_frame ();
-// OBSOLETE
-// OBSOLETE deprecated_get_frame_saved_regs (frame, &fsr);
-// OBSOLETE
-// OBSOLETE for (regnum = 0; regnum < 8; regnum++)
-// OBSOLETE {
-// OBSOLETE if (fsr.regs[regnum])
-// OBSOLETE write_register (regnum, read_memory_short (fsr.regs[regnum]));
-// OBSOLETE
-// OBSOLETE flush_cached_frames ();
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE h8500_print_register_hook (int regno)
-// OBSOLETE {
-// OBSOLETE if (regno == CCR_REGNUM)
-// OBSOLETE {
-// OBSOLETE /* CCR register */
-// OBSOLETE
-// OBSOLETE int C, Z, N, V;
-// OBSOLETE unsigned char b[2];
-// OBSOLETE unsigned char l;
-// OBSOLETE
-// OBSOLETE frame_register_read (deprecated_selected_frame, regno, b);
-// OBSOLETE l = b[1];
-// OBSOLETE printf_unfiltered ("\t");
-// OBSOLETE printf_unfiltered ("I-%d - ", (l & 0x80) != 0);
-// OBSOLETE N = (l & 0x8) != 0;
-// OBSOLETE Z = (l & 0x4) != 0;
-// OBSOLETE V = (l & 0x2) != 0;
-// OBSOLETE C = (l & 0x1) != 0;
-// OBSOLETE printf_unfiltered ("N-%d ", N);
-// OBSOLETE printf_unfiltered ("Z-%d ", Z);
-// OBSOLETE printf_unfiltered ("V-%d ", V);
-// OBSOLETE printf_unfiltered ("C-%d ", C);
-// OBSOLETE if ((C | Z) == 0)
-// OBSOLETE printf_unfiltered ("u> ");
-// OBSOLETE if ((C | Z) == 1)
-// OBSOLETE printf_unfiltered ("u<= ");
-// OBSOLETE if ((C == 0))
-// OBSOLETE printf_unfiltered ("u>= ");
-// OBSOLETE if (C == 1)
-// OBSOLETE printf_unfiltered ("u< ");
-// OBSOLETE if (Z == 0)
-// OBSOLETE printf_unfiltered ("!= ");
-// OBSOLETE if (Z == 1)
-// OBSOLETE printf_unfiltered ("== ");
-// OBSOLETE if ((N ^ V) == 0)
-// OBSOLETE printf_unfiltered (">= ");
-// OBSOLETE if ((N ^ V) == 1)
-// OBSOLETE printf_unfiltered ("< ");
-// OBSOLETE if ((Z | (N ^ V)) == 0)
-// OBSOLETE printf_unfiltered ("> ");
-// OBSOLETE if ((Z | (N ^ V)) == 1)
-// OBSOLETE printf_unfiltered ("<= ");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE h8500_print_registers_info (struct gdbarch *gdbarch,
-// OBSOLETE struct ui_file *file,
-// OBSOLETE struct frame_info *frame,
-// OBSOLETE int regnum, int print_all)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
-// OBSOLETE char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
-// OBSOLETE char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
-// OBSOLETE
-// OBSOLETE for (i = 0; i < numregs; i++)
-// OBSOLETE {
-// OBSOLETE /* Decide between printing all regs, non-float / vector regs, or
-// OBSOLETE specific reg. */
-// OBSOLETE if (regnum == -1)
-// OBSOLETE {
-// OBSOLETE if (!print_all)
-// OBSOLETE {
-// OBSOLETE if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
-// OBSOLETE continue;
-// OBSOLETE if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)))
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (i != regnum)
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* If the register name is empty, it is undefined for this
-// OBSOLETE processor, so don't display anything. */
-// OBSOLETE if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE fputs_filtered (REGISTER_NAME (i), file);
-// OBSOLETE print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file);
-// OBSOLETE
-// OBSOLETE /* Get the data in raw format. */
-// OBSOLETE if (! frame_register_read (frame, i, raw_buffer))
-// OBSOLETE {
-// OBSOLETE fprintf_filtered (file, "*value not available*\n");
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* FIXME: cagney/2002-08-03: This code shouldn't be necessary.
-// OBSOLETE The function frame_register_read() should have returned the
-// OBSOLETE pre-cooked register so no conversion is necessary. */
-// OBSOLETE /* Convert raw data to virtual format if necessary. */
-// OBSOLETE if (REGISTER_CONVERTIBLE (i))
-// OBSOLETE {
-// OBSOLETE REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
-// OBSOLETE raw_buffer, virtual_buffer);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE memcpy (virtual_buffer, raw_buffer,
-// OBSOLETE REGISTER_VIRTUAL_SIZE (i));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* If virtual format is floating, print it that way, and in raw
-// OBSOLETE hex. */
-// OBSOLETE if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
-// OBSOLETE {
-// OBSOLETE int j;
-// OBSOLETE
-// OBSOLETE val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-// OBSOLETE file, 0, 1, 0, Val_pretty_default);
-// OBSOLETE
-// OBSOLETE fprintf_filtered (file, "\t(raw 0x");
-// OBSOLETE for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
-// OBSOLETE {
-// OBSOLETE int idx;
-// OBSOLETE if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-// OBSOLETE idx = j;
-// OBSOLETE else
-// OBSOLETE idx = REGISTER_RAW_SIZE (i) - 1 - j;
-// OBSOLETE fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
-// OBSOLETE }
-// OBSOLETE fprintf_filtered (file, ")");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* Print the register in hex. */
-// OBSOLETE val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-// OBSOLETE file, 'x', 1, 0, Val_pretty_default);
-// OBSOLETE /* If not a vector register, print it also according to its
-// OBSOLETE natural format. */
-// OBSOLETE if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)) == 0)
-// OBSOLETE {
-// OBSOLETE fprintf_filtered (file, "\t");
-// OBSOLETE val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-// OBSOLETE file, 0, 1, 0, Val_pretty_default);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Some h8500 specific info. */
-// OBSOLETE h8500_print_register_hook (i);
-// OBSOLETE
-// OBSOLETE fprintf_filtered (file, "\n");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE h8500_do_registers_info (int regnum, int all)
-// OBSOLETE {
-// OBSOLETE h8500_print_registers_info (current_gdbarch, gdb_stdout, deprecated_selected_frame,
-// OBSOLETE regnum, all);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE h8500_register_size (int regno)
-// OBSOLETE {
-// OBSOLETE switch (regno)
-// OBSOLETE {
-// OBSOLETE case SEG_C_REGNUM:
-// OBSOLETE case SEG_D_REGNUM:
-// OBSOLETE case SEG_E_REGNUM:
-// OBSOLETE case SEG_T_REGNUM:
-// OBSOLETE return 1;
-// OBSOLETE case R0_REGNUM:
-// OBSOLETE case R1_REGNUM:
-// OBSOLETE case R2_REGNUM:
-// OBSOLETE case R3_REGNUM:
-// OBSOLETE case R4_REGNUM:
-// OBSOLETE case R5_REGNUM:
-// OBSOLETE case R6_REGNUM:
-// OBSOLETE case R7_REGNUM:
-// OBSOLETE case CCR_REGNUM:
-// OBSOLETE return 2;
-// OBSOLETE
-// OBSOLETE case PR0_REGNUM:
-// OBSOLETE case PR1_REGNUM:
-// OBSOLETE case PR2_REGNUM:
-// OBSOLETE case PR3_REGNUM:
-// OBSOLETE case PR4_REGNUM:
-// OBSOLETE case PR5_REGNUM:
-// OBSOLETE case PR6_REGNUM:
-// OBSOLETE case PR7_REGNUM:
-// OBSOLETE case PC_REGNUM:
-// OBSOLETE return 4;
-// OBSOLETE default:
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE struct type *
-// OBSOLETE h8500_register_virtual_type (int regno)
-// OBSOLETE {
-// OBSOLETE switch (regno)
-// OBSOLETE {
-// OBSOLETE case SEG_C_REGNUM:
-// OBSOLETE case SEG_E_REGNUM:
-// OBSOLETE case SEG_D_REGNUM:
-// OBSOLETE case SEG_T_REGNUM:
-// OBSOLETE return builtin_type_unsigned_char;
-// OBSOLETE case R0_REGNUM:
-// OBSOLETE case R1_REGNUM:
-// OBSOLETE case R2_REGNUM:
-// OBSOLETE case R3_REGNUM:
-// OBSOLETE case R4_REGNUM:
-// OBSOLETE case R5_REGNUM:
-// OBSOLETE case R6_REGNUM:
-// OBSOLETE case R7_REGNUM:
-// OBSOLETE case CCR_REGNUM:
-// OBSOLETE return builtin_type_unsigned_short;
-// OBSOLETE case PR0_REGNUM:
-// OBSOLETE case PR1_REGNUM:
-// OBSOLETE case PR2_REGNUM:
-// OBSOLETE case PR3_REGNUM:
-// OBSOLETE case PR4_REGNUM:
-// OBSOLETE case PR5_REGNUM:
-// OBSOLETE case PR6_REGNUM:
-// OBSOLETE case PR7_REGNUM:
-// OBSOLETE case PC_REGNUM:
-// OBSOLETE return builtin_type_unsigned_long;
-// OBSOLETE default:
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs,
-// OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO.
-// OBSOLETE This includes special registers such as pc and fp saved in special
-// OBSOLETE ways in the stack frame. sp is even more special:
-// OBSOLETE the address we return for it IS the sp for the next frame. */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE frame_find_saved_regs (struct frame_info *frame_info,
-// OBSOLETE struct frame_saved_regs *frame_saved_regs)
-// OBSOLETE {
-// OBSOLETE register int regnum;
-// OBSOLETE register int regmask;
-// OBSOLETE register CORE_ADDR next_addr;
-// OBSOLETE register CORE_ADDR pc;
-// OBSOLETE unsigned char thebyte;
-// OBSOLETE
-// OBSOLETE memset (frame_saved_regs, '\0', sizeof *frame_saved_regs);
-// OBSOLETE
-// OBSOLETE if ((frame_info)->pc >= (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM * 4 - 4
-// OBSOLETE && (frame_info)->pc <= (frame_info)->frame)
-// OBSOLETE {
-// OBSOLETE next_addr = (frame_info)->frame;
-// OBSOLETE pc = (frame_info)->frame - CALL_DUMMY_LENGTH - FP_REGNUM * 4 - 4;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE pc = get_pc_function_start ((frame_info)->pc);
-// OBSOLETE /* Verify we have a link a6 instruction next;
-// OBSOLETE if not we lose. If we win, find the address above the saved
-// OBSOLETE regs using the amount of storage from the link instruction.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE thebyte = read_memory_integer (pc, 1);
-// OBSOLETE if (0x1f == thebyte)
-// OBSOLETE next_addr = (frame_info)->frame + read_memory_integer (pc += 1, 2), pc += 2;
-// OBSOLETE else if (0x17 == thebyte)
-// OBSOLETE next_addr = (frame_info)->frame + read_memory_integer (pc += 1, 1), pc += 1;
-// OBSOLETE else
-// OBSOLETE goto lose;
-// OBSOLETE #if 0
-// OBSOLETE /* FIXME steve */
-// OBSOLETE /* If have an add:g.waddal #-n, sp next, adjust next_addr. */
-// OBSOLETE if ((0x0c0177777 & read_memory_integer (pc, 2)) == 0157774)
-// OBSOLETE next_addr += read_memory_integer (pc += 2, 4), pc += 4;
-// OBSOLETE #endif
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE thebyte = read_memory_integer (pc, 1);
-// OBSOLETE if (thebyte == 0x12)
-// OBSOLETE {
-// OBSOLETE /* Got stm */
-// OBSOLETE pc++;
-// OBSOLETE regmask = read_memory_integer (pc, 1);
-// OBSOLETE pc++;
-// OBSOLETE for (regnum = 0; regnum < 8; regnum++, regmask >>= 1)
-// OBSOLETE {
-// OBSOLETE if (regmask & 1)
-// OBSOLETE {
-// OBSOLETE (frame_saved_regs)->regs[regnum] = (next_addr += 2) - 2;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE thebyte = read_memory_integer (pc, 1);
-// OBSOLETE }
-// OBSOLETE /* Maybe got a load of pushes */
-// OBSOLETE while (thebyte == 0xbf)
-// OBSOLETE {
-// OBSOLETE pc++;
-// OBSOLETE regnum = read_memory_integer (pc, 1) & 0x7;
-// OBSOLETE pc++;
-// OBSOLETE (frame_saved_regs)->regs[regnum] = (next_addr += 2) - 2;
-// OBSOLETE thebyte = read_memory_integer (pc, 1);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE lose:;
-// OBSOLETE
-// OBSOLETE /* Remember the address of the frame pointer */
-// OBSOLETE (frame_saved_regs)->regs[FP_REGNUM] = (frame_info)->frame;
-// OBSOLETE
-// OBSOLETE /* This is where the old sp is hidden */
-// OBSOLETE (frame_saved_regs)->regs[SP_REGNUM] = (frame_info)->frame;
-// OBSOLETE
-// OBSOLETE /* And the PC - remember the pushed FP is always two bytes long */
-// OBSOLETE (frame_saved_regs)->regs[PC_REGNUM] = (frame_info)->frame + 2;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE saved_pc_after_call (void)
-// OBSOLETE {
-// OBSOLETE int x;
-// OBSOLETE int a = read_register (SP_REGNUM);
-// OBSOLETE
-// OBSOLETE x = read_memory_integer (a, code_size);
-// OBSOLETE if (code_size == 2)
-// OBSOLETE {
-// OBSOLETE /* Stick current code segement onto top */
-// OBSOLETE x &= 0xffff;
-// OBSOLETE x |= read_register (SEG_C_REGNUM) << 16;
-// OBSOLETE }
-// OBSOLETE x &= 0xffffff;
-// OBSOLETE return x;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE h8500_set_pointer_size (int newsize)
-// OBSOLETE {
-// OBSOLETE static int oldsize = 0;
-// OBSOLETE
-// OBSOLETE if (oldsize != newsize)
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("pointer size set to %d bits\n", newsize);
-// OBSOLETE oldsize = newsize;
-// OBSOLETE if (newsize == 32)
-// OBSOLETE {
-// OBSOLETE minimum_mode = 0;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE minimum_mode = 1;
-// OBSOLETE }
-// OBSOLETE _initialize_gdbtypes ();
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE big_command (char *arg, int from_tty)
-// OBSOLETE {
-// OBSOLETE h8500_set_pointer_size (32);
-// OBSOLETE code_size = 4;
-// OBSOLETE data_size = 4;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE medium_command (char *arg, int from_tty)
-// OBSOLETE {
-// OBSOLETE h8500_set_pointer_size (32);
-// OBSOLETE code_size = 4;
-// OBSOLETE data_size = 2;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE compact_command (char *arg, int from_tty)
-// OBSOLETE {
-// OBSOLETE h8500_set_pointer_size (32);
-// OBSOLETE code_size = 2;
-// OBSOLETE data_size = 4;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE small_command (char *arg, int from_tty)
-// OBSOLETE {
-// OBSOLETE h8500_set_pointer_size (16);
-// OBSOLETE code_size = 2;
-// OBSOLETE data_size = 2;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static struct cmd_list_element *setmemorylist;
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE set_memory (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("\"set memory\" must be followed by the name of a memory subcommand.\n");
-// OBSOLETE help_list (setmemorylist, "set memory ", -1, gdb_stdout);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* See if variable name is ppc or pr[0-7] */
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE h8500_is_trapped_internalvar (char *name)
-// OBSOLETE {
-// OBSOLETE if (name[0] != 'p')
-// OBSOLETE return 0;
-// OBSOLETE
-// OBSOLETE if (strcmp (name + 1, "pc") == 0)
-// OBSOLETE return 1;
-// OBSOLETE
-// OBSOLETE if (name[1] == 'r'
-// OBSOLETE && name[2] >= '0'
-// OBSOLETE && name[2] <= '7'
-// OBSOLETE && name[3] == '\000')
-// OBSOLETE return 1;
-// OBSOLETE else
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE struct value *
-// OBSOLETE h8500_value_of_trapped_internalvar (struct internalvar *var)
-// OBSOLETE {
-// OBSOLETE LONGEST regval;
-// OBSOLETE unsigned char regbuf[4];
-// OBSOLETE int page_regnum, regnum;
-// OBSOLETE
-// OBSOLETE regnum = var->name[2] == 'c' ? PC_REGNUM : var->name[2] - '0';
-// OBSOLETE
-// OBSOLETE switch (var->name[2])
-// OBSOLETE {
-// OBSOLETE case 'c':
-// OBSOLETE page_regnum = SEG_C_REGNUM;
-// OBSOLETE break;
-// OBSOLETE case '0':
-// OBSOLETE case '1':
-// OBSOLETE case '2':
-// OBSOLETE case '3':
-// OBSOLETE page_regnum = SEG_D_REGNUM;
-// OBSOLETE break;
-// OBSOLETE case '4':
-// OBSOLETE case '5':
-// OBSOLETE page_regnum = SEG_E_REGNUM;
-// OBSOLETE break;
-// OBSOLETE case '6':
-// OBSOLETE case '7':
-// OBSOLETE page_regnum = SEG_T_REGNUM;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE get_saved_register (regbuf, NULL, NULL, deprecated_selected_frame, page_regnum, NULL);
-// OBSOLETE regval = regbuf[0] << 16;
-// OBSOLETE
-// OBSOLETE get_saved_register (regbuf, NULL, NULL, deprecated_selected_frame, regnum, NULL);
-// OBSOLETE regval |= regbuf[0] << 8 | regbuf[1]; /* XXX host/target byte order */
-// OBSOLETE
-// OBSOLETE xfree (var->value); /* Free up old value */
-// OBSOLETE
-// OBSOLETE var->value = value_from_longest (builtin_type_unsigned_long, regval);
-// OBSOLETE release_value (var->value); /* Unchain new value */
-// OBSOLETE
-// OBSOLETE VALUE_LVAL (var->value) = lval_internalvar;
-// OBSOLETE VALUE_INTERNALVAR (var->value) = var;
-// OBSOLETE return var->value;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE h8500_set_trapped_internalvar (struct internalvar *var, struct value *newval,
-// OBSOLETE int bitpos, int bitsize, int offset)
-// OBSOLETE {
-// OBSOLETE char *page_regnum, *regnum;
-// OBSOLETE char expression[100];
-// OBSOLETE unsigned new_regval;
-// OBSOLETE struct type *type;
-// OBSOLETE enum type_code newval_type_code;
-// OBSOLETE
-// OBSOLETE type = check_typedef (VALUE_TYPE (newval));
-// OBSOLETE newval_type_code = TYPE_CODE (type);
-// OBSOLETE
-// OBSOLETE if ((newval_type_code != TYPE_CODE_INT
-// OBSOLETE && newval_type_code != TYPE_CODE_PTR)
-// OBSOLETE || TYPE_LENGTH (type) != sizeof (new_regval))
-// OBSOLETE error ("Illegal type (%s) for assignment to $%s\n",
-// OBSOLETE TYPE_NAME (VALUE_TYPE (newval)), var->name);
-// OBSOLETE
-// OBSOLETE new_regval = *(long *) VALUE_CONTENTS_RAW (newval);
-// OBSOLETE
-// OBSOLETE regnum = var->name + 1;
-// OBSOLETE
-// OBSOLETE switch (var->name[2])
-// OBSOLETE {
-// OBSOLETE case 'c':
-// OBSOLETE page_regnum = "cp";
-// OBSOLETE break;
-// OBSOLETE case '0':
-// OBSOLETE case '1':
-// OBSOLETE case '2':
-// OBSOLETE case '3':
-// OBSOLETE page_regnum = "dp";
-// OBSOLETE break;
-// OBSOLETE case '4':
-// OBSOLETE case '5':
-// OBSOLETE page_regnum = "ep";
-// OBSOLETE break;
-// OBSOLETE case '6':
-// OBSOLETE case '7':
-// OBSOLETE page_regnum = "tp";
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE sprintf (expression, "$%s=%d", page_regnum, new_regval >> 16);
-// OBSOLETE parse_and_eval (expression);
-// OBSOLETE
-// OBSOLETE sprintf (expression, "$%s=%d", regnum, new_regval & 0xffff);
-// OBSOLETE parse_and_eval (expression);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE h8500_read_sp (void)
-// OBSOLETE {
-// OBSOLETE return read_register (PR7_REGNUM);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE h8500_write_sp (CORE_ADDR v)
-// OBSOLETE {
-// OBSOLETE write_register (PR7_REGNUM, v);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE h8500_read_pc (ptid_t ptid)
-// OBSOLETE {
-// OBSOLETE return read_register (PC_REGNUM);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE h8500_write_pc (CORE_ADDR v, ptid_t ptid)
-// OBSOLETE {
-// OBSOLETE write_register (PC_REGNUM, v);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE h8500_read_fp (void)
-// OBSOLETE {
-// OBSOLETE return read_register (PR6_REGNUM);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE _initialize_h8500_tdep (void)
-// OBSOLETE {
-// OBSOLETE tm_print_insn = print_insn_h8500;
-// OBSOLETE
-// OBSOLETE add_prefix_cmd ("memory", no_class, set_memory,
-// OBSOLETE "set the memory model", &setmemorylist, "set memory ", 0,
-// OBSOLETE &setlist);
-// OBSOLETE
-// OBSOLETE add_cmd ("small", class_support, small_command,
-// OBSOLETE "Set small memory model. (16 bit code, 16 bit data)", &setmemorylist);
-// OBSOLETE
-// OBSOLETE add_cmd ("big", class_support, big_command,
-// OBSOLETE "Set big memory model. (32 bit code, 32 bit data)", &setmemorylist);
-// OBSOLETE
-// OBSOLETE add_cmd ("medium", class_support, medium_command,
-// OBSOLETE "Set medium memory model. (32 bit code, 16 bit data)", &setmemorylist);
-// OBSOLETE
-// OBSOLETE add_cmd ("compact", class_support, compact_command,
-// OBSOLETE "Set compact memory model. (16 bit code, 32 bit data)", &setmemorylist);
-// OBSOLETE
-// OBSOLETE }
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 62271ff..f9757c9 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -171,9 +171,6 @@ _initialize_hppa_hpux_tdep (void)
{
gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_HPUX_SOM,
hppa_hpux_som_init_abi);
- /* FIXME brobecker 2003-08-13: The machine number 25 corresponds to
- the hppa2.0w bfd arch_info. A #define should probably be defined
- in bfd, instead of using this hard-coded number. */
- gdbarch_register_osabi (bfd_arch_hppa, 25, GDB_OSABI_HPUX_ELF,
+ gdbarch_register_osabi (bfd_arch_hppa, bfd_mach_hppa20w, GDB_OSABI_HPUX_ELF,
hppa_hpux_elf_init_abi);
}
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
index cc1bb5e..7386e49 100644
--- a/gdb/hppa-tdep.c
+++ b/gdb/hppa-tdep.c
@@ -1090,7 +1090,7 @@ hppa_frame_saved_pc (struct frame_info *frame)
{
CORE_ADDR *saved_regs;
hppa_frame_init_saved_regs (get_next_frame (frame));
- saved_regs = get_frame_saved_regs (get_next_frame (frame));
+ saved_regs = deprecated_get_frame_saved_regs (get_next_frame (frame));
if (read_memory_integer (saved_regs[FLAGS_REGNUM],
TARGET_PTR_BIT / 8) & 0x2)
{
@@ -1130,7 +1130,7 @@ hppa_frame_saved_pc (struct frame_info *frame)
{
CORE_ADDR *saved_regs;
hppa_frame_init_saved_regs (get_next_frame (frame));
- saved_regs = get_frame_saved_regs (get_next_frame (frame));
+ saved_regs = deprecated_get_frame_saved_regs (get_next_frame (frame));
if (read_memory_integer (saved_regs[FLAGS_REGNUM],
TARGET_PTR_BIT / 8) & 0x2)
{
@@ -1404,7 +1404,7 @@ hppa_frame_chain (struct frame_info *frame)
in optimized code, GCC often doesn't actually save r3.
We'll discover this if we look at the prologue. */
hppa_frame_init_saved_regs (tmp_frame);
- saved_regs = get_frame_saved_regs (tmp_frame);
+ saved_regs = deprecated_get_frame_saved_regs (tmp_frame);
saved_regs_frame = tmp_frame;
/* If we have an address for r3, that's good. */
@@ -1455,7 +1455,7 @@ hppa_frame_chain (struct frame_info *frame)
if (tmp_frame != saved_regs_frame)
{
hppa_frame_init_saved_regs (tmp_frame);
- saved_regs = get_frame_saved_regs (tmp_frame);
+ saved_regs = deprecated_get_frame_saved_regs (tmp_frame);
}
/* Abominable hack. */
@@ -1493,7 +1493,7 @@ hppa_frame_chain (struct frame_info *frame)
if (tmp_frame != saved_regs_frame)
{
hppa_frame_init_saved_regs (tmp_frame);
- saved_regs = get_frame_saved_regs (tmp_frame);
+ saved_regs = deprecated_get_frame_saved_regs (tmp_frame);
}
/* Abominable hack. See above. */
@@ -1698,7 +1698,7 @@ hppa_pop_frame (void)
fp = get_frame_base (frame);
hppa_frame_init_saved_regs (frame);
- fsr = get_frame_saved_regs (frame);
+ fsr = deprecated_get_frame_saved_regs (frame);
#ifndef NO_PC_SPACE_QUEUE_RESTORE
if (fsr[IPSW_REGNUM]) /* Restoring a call dummy frame */
@@ -2067,6 +2067,9 @@ hppa_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
This function does the same stuff as value_being_returned in values.c, but
gets the value from the stack rather than from the buffer where all the
registers were saved when the function called completed. */
+/* FIXME: cagney/2003-09-27: This function is no longer needed. The
+ inferior function call code now directly handles the case described
+ above. */
struct value *
hppa_value_returned_from_stack (struct type *valtype, CORE_ADDR addr)
{
@@ -2372,7 +2375,7 @@ hppa_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs,
{
stub_symbol
= lookup_minimal_symbol_solib_trampoline
- (SYMBOL_LINKAGE_NAME (funsymbol), NULL, objfile);
+ (SYMBOL_LINKAGE_NAME (funsymbol), objfile);
if (!stub_symbol)
stub_symbol = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (funsymbol),
@@ -2979,13 +2982,13 @@ pa_print_fp_reg (int i)
frame_register_read (deprecated_selected_frame, i, raw_buffer);
/* Put it in the buffer. No conversions are ever necessary. */
- memcpy (virtual_buffer, raw_buffer, REGISTER_RAW_SIZE (i));
+ memcpy (virtual_buffer, raw_buffer, DEPRECATED_REGISTER_RAW_SIZE (i));
fputs_filtered (REGISTER_NAME (i), gdb_stdout);
print_spaces_filtered (8 - strlen (REGISTER_NAME (i)), gdb_stdout);
fputs_filtered ("(single precision) ", gdb_stdout);
- val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0, gdb_stdout, 0,
+ val_print (DEPRECATED_REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0, gdb_stdout, 0,
1, 0, Val_pretty_default);
printf_filtered ("\n");
@@ -2997,8 +3000,8 @@ pa_print_fp_reg (int i)
frame_register_read (deprecated_selected_frame, i + 1, raw_buffer);
/* Copy it into the appropriate part of the virtual buffer. */
- memcpy (virtual_buffer + REGISTER_RAW_SIZE (i), raw_buffer,
- REGISTER_RAW_SIZE (i));
+ memcpy (virtual_buffer + DEPRECATED_REGISTER_RAW_SIZE (i), raw_buffer,
+ DEPRECATED_REGISTER_RAW_SIZE (i));
/* Dump it as a double. */
fputs_filtered (REGISTER_NAME (i), gdb_stdout);
@@ -3025,7 +3028,7 @@ pa_strcat_fp_reg (int i, struct ui_file *stream, enum precision_type precision)
frame_register_read (deprecated_selected_frame, i, raw_buffer);
/* Put it in the buffer. No conversions are ever necessary. */
- memcpy (virtual_buffer, raw_buffer, REGISTER_RAW_SIZE (i));
+ memcpy (virtual_buffer, raw_buffer, DEPRECATED_REGISTER_RAW_SIZE (i));
if (precision == double_precision && (i % 2) == 0)
{
@@ -3036,7 +3039,8 @@ pa_strcat_fp_reg (int i, struct ui_file *stream, enum precision_type precision)
frame_register_read (deprecated_selected_frame, i + 1, raw_buf);
/* Copy it into the appropriate part of the virtual buffer. */
- memcpy (virtual_buffer + REGISTER_RAW_SIZE (i), raw_buf, REGISTER_RAW_SIZE (i));
+ memcpy (virtual_buffer + DEPRECATED_REGISTER_RAW_SIZE (i), raw_buf,
+ DEPRECATED_REGISTER_RAW_SIZE (i));
val_print (builtin_type_double, virtual_buffer, 0, 0, stream, 0,
1, 0, Val_pretty_default);
@@ -3044,7 +3048,7 @@ pa_strcat_fp_reg (int i, struct ui_file *stream, enum precision_type precision)
}
else
{
- val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0, stream, 0,
+ val_print (DEPRECATED_REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0, stream, 0,
1, 0, Val_pretty_default);
}
@@ -3090,8 +3094,9 @@ hppa_in_solib_call_trampoline (CORE_ADDR pc, char *name)
sec = SYMBOL_BFD_SECTION (minsym);
- if (sec->vma <= pc
- && sec->vma + sec->_cooked_size < pc)
+ 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
@@ -4247,9 +4252,9 @@ hppa_frame_find_saved_regs (struct frame_info *frame_info,
void
hppa_frame_init_saved_regs (struct frame_info *frame)
{
- if (get_frame_saved_regs (frame) == NULL)
+ if (deprecated_get_frame_saved_regs (frame) == NULL)
frame_saved_regs_zalloc (frame);
- hppa_frame_find_saved_regs (frame, get_frame_saved_regs (frame));
+ hppa_frame_find_saved_regs (frame, deprecated_get_frame_saved_regs (frame));
}
/* Exception handling support for the HP-UX ANSI C++ compiler.
@@ -5037,6 +5042,10 @@ hppa_extract_struct_value_address (char *regbuf)
the address size is equal to the size of an int* _on the host_...
One possible implementation that crossed my mind is to use
extract_address. */
+ /* FIXME: cagney/2003-09-27: This function can probably go. ELZ
+ writes: We cannot assume on the pa that r28 still contains the
+ address of the returned structure. Usually this will be
+ overwritten by the callee. */
return (*(int *)(regbuf + DEPRECATED_REGISTER_BYTE (28)));
}
@@ -5072,7 +5081,7 @@ hppa_fetch_pointer_argument (struct frame_info *frame, int argi,
struct type *type)
{
CORE_ADDR addr;
- frame_read_register (frame, R0_REGNUM + 26 - argi, &addr);
+ get_frame_register (frame, R0_REGNUM + 26 - argi, &addr);
return addr;
}
diff --git a/gdb/hppab-nat.c b/gdb/hppab-nat.c
index cbb481e..416db66 100644
--- a/gdb/hppab-nat.c
+++ b/gdb/hppab-nat.c
@@ -64,7 +64,7 @@ fetch_register (int regno)
offset = U_REGS_OFFSET;
regaddr = register_addr (regno, offset);
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
+ for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (int))
{
errno = 0;
*(int *) &buf[i] = ptrace (PT_RUREGS, PIDGET (inferior_ptid),
@@ -130,7 +130,7 @@ store_inferior_registers (int regno)
}
}
else
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
+ for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (int))
{
errno = 0;
ptrace (PT_WUREGS, PIDGET (inferior_ptid),
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index 5359949..ea4015a 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -34,14 +34,34 @@
#include "gdb_string.h"
#include <signal.h>
-extern CORE_ADDR text_end;
-
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);
+static CORE_ADDR text_end;
+
+void
+deprecated_hpux_text_end (struct target_ops *exec_ops)
+{
+ struct section_table *p;
+
+ /* Set text_end to the highest address of the end of any readonly
+ code section. */
+ /* FIXME: The comment above does not match the code. The code
+ checks for sections with are either code *or* readonly. */
+ text_end = (CORE_ADDR) 0;
+ for (p = exec_ops->to_sections; p < exec_ops->to_sections_end; p++)
+ if (bfd_get_section_flags (p->bfd, p->the_bfd_section)
+ & (SEC_CODE | SEC_READONLY))
+ {
+ if (text_end < p->endaddr)
+ text_end = p->endaddr;
+ }
+}
+
+
static void fetch_register (int);
void
@@ -78,7 +98,7 @@ store_inferior_registers (int regno)
return;
offset = 0;
- len = REGISTER_RAW_SIZE (regno);
+ len = DEPRECATED_REGISTER_RAW_SIZE (regno);
/* Requests for register zero actually want the save_state's
ss_flags member. As RM says: "Oh, what a hack!" */
@@ -89,10 +109,11 @@ store_inferior_registers (int regno)
len = sizeof (ss.ss_flags);
/* Note that ss_flags is always an int, no matter what
- 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 = REGISTER_RAW_SIZE (0) - len;
+ 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;
}
/* Floating-point registers come from the ss_fpblock area. */
@@ -195,7 +216,7 @@ fetch_register (int regno)
int i;
offset = 0;
- len = REGISTER_RAW_SIZE (regno);
+ len = DEPRECATED_REGISTER_RAW_SIZE (regno);
/* Requests for register zero actually want the save_state's
ss_flags member. As RM says: "Oh, what a hack!" */
@@ -206,10 +227,10 @@ fetch_register (int regno)
len = sizeof (ss.ss_flags);
/* Note that ss_flags is always an int, no matter what
- 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 = REGISTER_RAW_SIZE (0) - len;
+ 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;
memset (buf, 0, sizeof (buf));
}
diff --git a/gdb/hppam3-nat.c b/gdb/hppam3-nat.c
index a89fae9..cbee288 100644
--- a/gdb/hppam3-nat.c
+++ b/gdb/hppam3-nat.c
@@ -116,13 +116,13 @@ store_inferior_registers (int regno)
if (regno > 0 && regno < NUM_REGS)
{
memcpy (&state[regno], &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno));
+ DEPRECATED_REGISTER_RAW_SIZE (regno));
}
else
{
for (index = 0; index < NUM_REGS; index++)
memcpy (&state[index], &deprecated_registers[DEPRECATED_REGISTER_BYTE (index)],
- REGISTER_RAW_SIZE (index));
+ DEPRECATED_REGISTER_RAW_SIZE (index));
/* state[index] = deprecated_registers[DEPRECATED_REGISTER_BYTE (index)]; */
}
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c
index d66874b..242d3a3 100644
--- a/gdb/hpux-thread.c
+++ b/gdb/hpux-thread.c
@@ -131,7 +131,6 @@ find_tcb (ptid_t ptid)
/* Most target vector functions from here on actually just pass through to
inftarg.c, as they don't need to do anything specific for threads. */
-/* ARGSUSED */
static void
hpux_thread_open (char *arg, int from_tty)
{
@@ -292,13 +291,13 @@ hpux_thread_fetch_registers (int regno)
if (regno == FLAGS_REGNUM)
/* Flags must be 0 to avoid bogus value for SS_INSYSCALL */
- memset (buf, '\000', REGISTER_RAW_SIZE (regno));
+ memset (buf, '\000', DEPRECATED_REGISTER_RAW_SIZE (regno));
else if (regno == SP_REGNUM)
store_unsigned_integer (buf, sizeof sp, sp);
else if (regno == PC_REGNUM)
- read_memory (sp - 20, buf, REGISTER_RAW_SIZE (regno));
+ read_memory (sp - 20, buf, DEPRECATED_REGISTER_RAW_SIZE (regno));
else
- read_memory (sp + regmap[regno], buf, REGISTER_RAW_SIZE (regno));
+ read_memory (sp + regmap[regno], buf, DEPRECATED_REGISTER_RAW_SIZE (regno));
supply_register (regno, buf);
}
@@ -358,19 +357,19 @@ hpux_thread_store_registers (int regno)
{
write_memory ((CORE_ADDR) & tcb_ptr->static_ctx.sp,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno));
+ DEPRECATED_REGISTER_RAW_SIZE (regno));
tcb_ptr->static_ctx.sp = (cma__t_hppa_regs *)
(extract_unsigned_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno)) + 160);
+ DEPRECATED_REGISTER_RAW_SIZE (regno)) + 160);
}
else if (regno == PC_REGNUM)
write_memory (sp - 20,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno));
+ DEPRECATED_REGISTER_RAW_SIZE (regno));
else
write_memory (sp + regmap[regno],
&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno));
+ DEPRECATED_REGISTER_RAW_SIZE (regno));
}
}
diff --git a/gdb/i386-interix-nat.c b/gdb/i386-interix-nat.c
index 10e4d91..91b9be2 100644
--- a/gdb/i386-interix-nat.c
+++ b/gdb/i386-interix-nat.c
@@ -80,7 +80,7 @@ fill_gregset (gregset_t *gregsetp, int regno)
void
supply_fpregset (fpregset_t *fpregsetp)
{
- i387_supply_fsave ((const char *) fpregsetp, -1);
+ i387_supply_fsave (current_regcache, -1, fpregsetp);
}
/* Given a pointer to a floating point register set in (fpregset_t *)
diff --git a/gdb/i386-interix-tdep.c b/gdb/i386-interix-tdep.c
index 6902404..ea9f8c4 100644
--- a/gdb/i386-interix-tdep.c
+++ b/gdb/i386-interix-tdep.c
@@ -332,7 +332,6 @@ i386_interix_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
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_init_frame_pc (gdbarch, init_frame_pc_noop);
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");
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index e7a85fa..bb16143 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -1,6 +1,6 @@
/* Native-dependent code for GNU/Linux x86.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -320,7 +320,7 @@ static void store_regs (int tid, int regno) {}
void
supply_fpregset (elf_fpregset_t *fpregsetp)
{
- i387_supply_fsave ((const char *) fpregsetp, -1);
+ i387_supply_fsave (current_regcache, -1, fpregsetp);
dummy_sse_values ();
}
@@ -385,7 +385,7 @@ static void store_fpregs (int tid, int regno) {}
void
supply_fpxregset (elf_fpxregset_t *fpxregsetp)
{
- i387_supply_fxsave ((const char *) fpxregsetp, -1);
+ i387_supply_fxsave (current_regcache, -1, fpxregsetp);
}
/* Fill register REGNO (if it is a floating-point or SSE register) in
@@ -756,80 +756,6 @@ ps_get_thread_area (const struct ps_prochandle *ph,
}
-/* Interpreting register set info found in core files. */
-
-/* Provide registers to GDB from a core file.
-
- (We can't use the generic version of this function in
- core-regset.c, because GNU/Linux has *three* different kinds of
- register set notes. core-regset.c would have to call
- supply_fpxregset, which most platforms don't have.)
-
- CORE_REG_SECT points to an array of bytes, which are the contents
- of a `note' from a core file which BFD thinks might contain
- register contents. CORE_REG_SIZE is its size.
-
- WHICH says which register set corelow suspects this is:
- 0 --- the general-purpose register set, in elf_gregset_t format
- 2 --- the floating-point register set, in elf_fpregset_t format
- 3 --- the extended floating-point register set, in elf_fpxregset_t format
-
- REG_ADDR isn't used on GNU/Linux. */
-
-static void
-fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
- int which, CORE_ADDR reg_addr)
-{
- elf_gregset_t gregset;
- elf_fpregset_t fpregset;
-
- switch (which)
- {
- case 0:
- if (core_reg_size != sizeof (gregset))
- warning ("Wrong size gregset in core file.");
- else
- {
- memcpy (&gregset, core_reg_sect, sizeof (gregset));
- supply_gregset (&gregset);
- }
- break;
-
- case 2:
- if (core_reg_size != sizeof (fpregset))
- warning ("Wrong size fpregset in core file.");
- else
- {
- memcpy (&fpregset, core_reg_sect, sizeof (fpregset));
- supply_fpregset (&fpregset);
- }
- break;
-
-#ifdef HAVE_PTRACE_GETFPXREGS
- {
- elf_fpxregset_t fpxregset;
-
- case 3:
- if (core_reg_size != sizeof (fpxregset))
- warning ("Wrong size fpxregset in core file.");
- else
- {
- memcpy (&fpxregset, core_reg_sect, sizeof (fpxregset));
- supply_fpxregset (&fpxregset);
- }
- break;
- }
-#endif
-
- default:
- /* We've covered all the kinds of registers we know about here,
- so this must be something we wouldn't know what to do with
- anyway. Just ignore it. */
- break;
- }
-}
-
-
/* The instruction for a GNU/Linux system call is:
int $0x80
or 0xcd 0x80. */
@@ -923,22 +849,3 @@ child_post_startup_inferior (ptid_t ptid)
i386_cleanup_dregs ();
linux_child_post_startup_inferior (ptid);
}
-
-
-/* Register that we are able to handle GNU/Linux ELF core file
- formats. */
-
-static struct core_fns linux_elf_core_fns =
-{
- bfd_target_elf_flavour, /* core_flavour */
- default_check_format, /* check_format */
- default_core_sniffer, /* core_sniffer */
- fetch_core_registers, /* core_read_registers */
- NULL /* next */
-};
-
-void
-_initialize_i386_linux_nat (void)
-{
- add_core_fns (&linux_elf_core_fns);
-}
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 6d284f1..48caf4d 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -25,19 +25,15 @@
#include "value.h"
#include "regcache.h"
#include "inferior.h"
+#include "osabi.h"
#include "reggroups.h"
+#include "solib-svr4.h"
-/* For i386_linux_skip_solib_resolver. */
-#include "symtab.h"
-#include "symfile.h"
-#include "objfiles.h"
-
-#include "solib-svr4.h" /* For struct link_map_offsets. */
-
-#include "osabi.h"
+#include "gdb_string.h"
#include "i386-tdep.h"
#include "i386-linux-tdep.h"
+#include "glibc-tdep.h"
/* Return the name of register REG. */
@@ -312,89 +308,10 @@ i386_linux_write_pc (CORE_ADDR pc, ptid_t ptid)
/* Calling functions in shared libraries. */
-/* Find the minimal symbol named NAME, and return both the minsym
- struct and its objfile. This probably ought to be in minsym.c, but
- everything there is trying to deal with things like C++ and
- SOFUN_ADDRESS_MAYBE_TURQUOISE, ... Since this is so simple, it may
- be considered too special-purpose for general consumption. */
-
-static struct minimal_symbol *
-find_minsym_and_objfile (char *name, struct objfile **objfilep)
-{
- struct objfile *objfile;
-
- ALL_OBJFILES (objfile)
- {
- struct minimal_symbol *msym;
-
- ALL_OBJFILE_MSYMBOLS (objfile, msym)
- {
- if (SYMBOL_LINKAGE_NAME (msym)
- && strcmp (SYMBOL_LINKAGE_NAME (msym), name) == 0)
- {
- *objfilep = objfile;
- return msym;
- }
- }
- }
-
- return 0;
-}
-
-static CORE_ADDR
-skip_gnu_resolver (CORE_ADDR pc)
-{
- /* The GNU dynamic linker is part of the GNU C library, so many
- GNU/Linux distributions use it. (All ELF versions, as far as I
- know.) An unresolved PLT entry points to "_dl_runtime_resolve",
- which calls "fixup" to patch the PLT, and then passes control to
- the function.
-
- We look for the symbol `_dl_runtime_resolve', and find `fixup' in
- the same objfile. If we are at the entry point of `fixup', then
- we set a breakpoint at the return address (at the top of the
- stack), and continue.
-
- It's kind of gross to do all these checks every time we're
- called, since they don't change once the executable has gotten
- started. But this is only a temporary hack --- upcoming versions
- of GNU/Linux will provide a portable, efficient interface for
- debugging programs that use shared libraries. */
-
- struct objfile *objfile;
- struct minimal_symbol *resolver
- = find_minsym_and_objfile ("_dl_runtime_resolve", &objfile);
-
- if (resolver)
- {
- struct minimal_symbol *fixup
- = lookup_minimal_symbol ("fixup", NULL, objfile);
-
- if (fixup && SYMBOL_VALUE_ADDRESS (fixup) == pc)
- return frame_pc_unwind (get_current_frame ());
- }
-
- return 0;
-}
-
-/* See the comments for SKIP_SOLIB_RESOLVER at the top of infrun.c.
- This function:
- 1) decides whether a PLT has sent us into the linker to resolve
- a function reference, and
- 2) if so, tells us where to set a temporary breakpoint that will
- trigger when the dynamic linker is done. */
-
CORE_ADDR
i386_linux_skip_solib_resolver (CORE_ADDR pc)
{
- CORE_ADDR result;
-
- /* Plug in functions for other kinds of resolvers here. */
- result = skip_gnu_resolver (pc);
- if (result)
- return result;
-
- return 0;
+ return glibc_skip_solib_resolver (pc);
}
/* Fetch (and possibly build) an appropriate link_map_offsets
@@ -439,8 +356,52 @@ i386_linux_svr4_fetch_link_map_offsets (void)
}
+/* The register sets used in GNU/Linux ELF core-dumps are identical to
+ the register sets in `struct user' that are used for a.out
+ core-dumps. These are also used by ptrace(2). The corresponding
+ types are `elf_gregset_t' for the general-purpose registers (with
+ `elf_greg_t' the type of a single GP register) and `elf_fpregset_t'
+ for the floating-point registers.
+
+ Those types used to be available under the names `gregset_t' and
+ `fpregset_t' too, and GDB used those names in the past. But those
+ names are now used for the register sets used in the `mcontext_t'
+ type, which have a different size and layout. */
+
+/* Mapping between the general-purpose registers in `struct user'
+ format and GDB's register cache layout. */
+
+/* From <sys/reg.h>. */
+static int i386_linux_gregset_reg_offset[] =
+{
+ 6 * 4, /* %eax */
+ 1 * 4, /* %ecx */
+ 2 * 4, /* %edx */
+ 0 * 4, /* %ebx */
+ 15 * 4, /* %esp */
+ 5 * 4, /* %ebp */
+ 3 * 4, /* %esi */
+ 4 * 4, /* %edi */
+ 12 * 4, /* %eip */
+ 14 * 4, /* %eflags */
+ 13 * 4, /* %cs */
+ 16 * 4, /* %ss */
+ 7 * 4, /* %ds */
+ 8 * 4, /* %es */
+ 9 * 4, /* %fs */
+ 10 * 4, /* %gs */
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1,
+ 11 * 4 /* "orig_eax" */
+};
+
+/* Mapping between the general-purpose registers in `struct
+ sigcontext' format and GDB's register cache layout. */
+
/* From <asm/sigcontext.h>. */
-static int i386_linux_sc_reg_offset[I386_NUM_GREGS] =
+static int i386_linux_sc_reg_offset[] =
{
11 * 4, /* %eax */
10 * 4, /* %ecx */
@@ -468,23 +429,23 @@ i386_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* GNU/Linux uses ELF. */
i386_elf_init_abi (info, gdbarch);
- /* We support the SSE registers on GNU/Linux. */
- tdep->num_xmm_regs = I386_NUM_XREGS - 1;
- /* set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS); */
-
/* Since we have the extra "orig_eax" register on GNU/Linux, we have
to adjust a few things. */
set_gdbarch_write_pc (gdbarch, i386_linux_write_pc);
- set_gdbarch_num_regs (gdbarch, I386_SSE_NUM_REGS + 1);
+ set_gdbarch_num_regs (gdbarch, I386_LINUX_NUM_REGS);
set_gdbarch_register_name (gdbarch, i386_linux_register_name);
set_gdbarch_register_reggroup_p (gdbarch, i386_linux_register_reggroup_p);
+ tdep->gregset_reg_offset = i386_linux_gregset_reg_offset;
+ tdep->gregset_num_regs = ARRAY_SIZE (i386_linux_gregset_reg_offset);
+ tdep->sizeof_gregset = 17 * 4;
+
tdep->jb_pc_offset = 20; /* From <bits/setjmp.h>. */
tdep->sigcontext_addr = i386_linux_sigcontext_addr;
tdep->sc_reg_offset = i386_linux_sc_reg_offset;
- tdep->sc_num_regs = I386_NUM_GREGS;
+ 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
diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c
index 2a912a1..a80c7a4 100644
--- a/gdb/i386-nto-tdep.c
+++ b/gdb/i386-nto-tdep.c
@@ -87,9 +87,9 @@ static void
i386nto_supply_fpregset (char *fpregs)
{
if (nto_cpuinfo_valid && nto_cpuinfo_flags | X86_CPU_FXSR)
- i387_supply_fxsave (fpregs, -1);
+ i387_supply_fxsave (current_regcache, -1, fpregs);
else
- i387_supply_fsave (fpregs, -1);
+ i387_supply_fsave (current_regcache, -1, fpregs);
}
static void
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index dd19e24..69db1fa 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -37,6 +37,7 @@
#include "osabi.h"
#include "regcache.h"
#include "reggroups.h"
+#include "regset.h"
#include "symfile.h"
#include "symtab.h"
#include "target.h"
@@ -67,8 +68,7 @@ static char *i386_register_names[] =
"mxcsr"
};
-static const int i386_num_register_names =
- (sizeof (i386_register_names) / sizeof (*i386_register_names));
+static const int i386_num_register_names = ARRAY_SIZE (i386_register_names);
/* MMX registers. */
@@ -78,48 +78,77 @@ static char *i386_mmx_names[] =
"mm4", "mm5", "mm6", "mm7"
};
-static const int i386_num_mmx_regs =
- (sizeof (i386_mmx_names) / sizeof (i386_mmx_names[0]));
-
-#define MM0_REGNUM NUM_REGS
+static const int i386_num_mmx_regs = ARRAY_SIZE (i386_mmx_names);
static int
-i386_mmx_regnum_p (int regnum)
+i386_mmx_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- return (regnum >= MM0_REGNUM
- && regnum < MM0_REGNUM + i386_num_mmx_regs);
+ int mm0_regnum = gdbarch_tdep (gdbarch)->mm0_regnum;
+
+ if (mm0_regnum < 0)
+ return 0;
+
+ return (regnum >= mm0_regnum && regnum < mm0_regnum + i386_num_mmx_regs);
}
-/* FP register? */
+/* SSE register? */
-int
-i386_fp_regnum_p (int regnum)
+static int
+i386_sse_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- return (regnum < NUM_REGS
- && (FP0_REGNUM && FP0_REGNUM <= regnum && regnum < FPC_REGNUM));
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+#define I387_ST0_REGNUM tdep->st0_regnum
+#define I387_NUM_XMM_REGS tdep->num_xmm_regs
+
+ if (I387_NUM_XMM_REGS == 0)
+ return 0;
+
+ return (I387_XMM0_REGNUM <= regnum && regnum < I387_MXCSR_REGNUM);
+
+#undef I387_ST0_REGNUM
+#undef I387_NUM_XMM_REGS
}
-int
-i386_fpc_regnum_p (int regnum)
+static int
+i386_mxcsr_regnum_p (struct gdbarch *gdbarch, int regnum)
{
- return (regnum < NUM_REGS
- && (FPC_REGNUM <= regnum && regnum < XMM0_REGNUM));
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+
+#define I387_ST0_REGNUM tdep->st0_regnum
+#define I387_NUM_XMM_REGS tdep->num_xmm_regs
+
+ if (I387_NUM_XMM_REGS == 0)
+ return 0;
+
+ return (regnum == I387_MXCSR_REGNUM);
+
+#undef I387_ST0_REGNUM
+#undef I387_NUM_XMM_REGS
}
-/* SSE register? */
+#define I387_ST0_REGNUM (gdbarch_tdep (current_gdbarch)->st0_regnum)
+#define I387_MM0_REGNUM (gdbarch_tdep (current_gdbarch)->mm0_regnum)
+#define I387_NUM_XMM_REGS (gdbarch_tdep (current_gdbarch)->num_xmm_regs)
+
+/* FP register? */
int
-i386_sse_regnum_p (int regnum)
+i386_fp_regnum_p (int regnum)
{
- return (regnum < NUM_REGS
- && (XMM0_REGNUM <= regnum && regnum < MXCSR_REGNUM));
+ if (I387_ST0_REGNUM < 0)
+ return 0;
+
+ return (I387_ST0_REGNUM <= regnum && regnum < I387_FCTRL_REGNUM);
}
int
-i386_mxcsr_regnum_p (int regnum)
+i386_fpc_regnum_p (int regnum)
{
- return (regnum < NUM_REGS
- && regnum == MXCSR_REGNUM);
+ if (I387_ST0_REGNUM < 0)
+ return 0;
+
+ return (I387_FCTRL_REGNUM <= regnum && regnum < I387_XMM0_REGNUM);
}
/* Return the name of register REG. */
@@ -127,8 +156,8 @@ i386_mxcsr_regnum_p (int regnum)
const char *
i386_register_name (int reg)
{
- if (i386_mmx_regnum_p (reg))
- return i386_mmx_names[reg - MM0_REGNUM];
+ if (i386_mmx_regnum_p (current_gdbarch, reg))
+ return i386_mmx_names[reg - I387_MM0_REGNUM];
if (reg >= 0 && reg < i386_num_register_names)
return i386_register_names[reg];
@@ -151,17 +180,17 @@ i386_stab_reg_to_regnum (int reg)
else if (reg >= 12 && reg <= 19)
{
/* Floating-point registers. */
- return reg - 12 + FP0_REGNUM;
+ return reg - 12 + I387_ST0_REGNUM;
}
else if (reg >= 21 && reg <= 28)
{
/* SSE registers. */
- return reg - 21 + XMM0_REGNUM;
+ return reg - 21 + I387_XMM0_REGNUM;
}
else if (reg >= 29 && reg <= 36)
{
/* MMX registers. */
- return reg - 29 + MM0_REGNUM;
+ return reg - 29 + I387_MM0_REGNUM;
}
/* This will hopefully provoke a warning. */
@@ -184,7 +213,7 @@ i386_dwarf_reg_to_regnum (int reg)
else if (reg >= 11 && reg <= 18)
{
/* Floating-point registers. */
- return reg - 11 + FP0_REGNUM;
+ return reg - 11 + I387_ST0_REGNUM;
}
else if (reg >= 21)
{
@@ -195,6 +224,10 @@ i386_dwarf_reg_to_regnum (int reg)
/* This will hopefully provoke a warning. */
return NUM_REGS + NUM_PSEUDO_REGS;
}
+
+#undef I387_ST0_REGNUM
+#undef I387_MM0_REGNUM
+#undef I387_NUM_XMM_REGS
/* This is the variable that is set with "set disassembly-flavor", and
@@ -466,12 +499,14 @@ i386_analyze_frame_setup (CORE_ADDR pc, CORE_ADDR current_pc,
xorl %ebx, %ebx
xorl %ecx, %ecx
xorl %edx, %edx
+ xorl %eax, %eax
and the equivalent
subl %ebx, %ebx
subl %ecx, %ecx
subl %edx, %edx
+ subl %eax, %eax
Make sure we only skip these instructions if we later see the
`movl %esp, %ebp' that actually sets up the frame. */
@@ -483,6 +518,7 @@ i386_analyze_frame_setup (CORE_ADDR pc, CORE_ADDR current_pc,
case 0xdb: /* %ebx */
case 0xc9: /* %ecx */
case 0xd2: /* %edx */
+ case 0xc0: /* %eax */
skip += 2;
break;
default:
@@ -1123,6 +1159,7 @@ static void
i386_extract_return_value (struct type *type, struct regcache *regcache,
void *dst)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
bfd_byte *valbuf = dst;
int len = TYPE_LENGTH (type);
char buf[I386_MAX_REGISTER_SIZE];
@@ -1136,7 +1173,7 @@ i386_extract_return_value (struct type *type, struct regcache *regcache,
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
- if (FP0_REGNUM < 0)
+ if (tdep->st0_regnum < 0)
{
warning ("Cannot find floating-point return value.");
memset (valbuf, 0, len);
@@ -1180,8 +1217,13 @@ static void
i386_store_return_value (struct type *type, struct regcache *regcache,
const void *valbuf)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
int len = TYPE_LENGTH (type);
+ /* Define I387_ST0_REGNUM such that we use the proper definitions
+ for the architecture. */
+#define I387_ST0_REGNUM I386_ST0_REGNUM
+
if (TYPE_CODE (type) == TYPE_CODE_STRUCT
&& TYPE_NFIELDS (type) == 1)
{
@@ -1192,9 +1234,9 @@ i386_store_return_value (struct type *type, struct regcache *regcache,
if (TYPE_CODE (type) == TYPE_CODE_FLT)
{
ULONGEST fstat;
- char buf[FPU_REG_RAW_SIZE];
+ char buf[I386_MAX_REGISTER_SIZE];
- if (FP0_REGNUM < 0)
+ if (tdep->st0_regnum < 0)
{
warning ("Cannot set floating-point return value.");
return;
@@ -1215,14 +1257,14 @@ i386_store_return_value (struct type *type, struct regcache *regcache,
actual value doesn't really matter, but 7 is what a normal
function return would end up with if the program started out
with a freshly initialized FPU. */
- regcache_raw_read_unsigned (regcache, FSTAT_REGNUM, &fstat);
+ regcache_raw_read_unsigned (regcache, I387_FSTAT_REGNUM, &fstat);
fstat |= (7 << 11);
- regcache_raw_write_unsigned (regcache, FSTAT_REGNUM, fstat);
+ regcache_raw_write_unsigned (regcache, I387_FSTAT_REGNUM, fstat);
/* Mark %st(1) through %st(7) as empty. Since we set the top of
the floating-point register stack to 7, the appropriate value
for the tag word is 0x3fff. */
- regcache_raw_write_unsigned (regcache, FTAG_REGNUM, 0x3fff);
+ regcache_raw_write_unsigned (regcache, I387_FTAG_REGNUM, 0x3fff);
}
else
{
@@ -1241,6 +1283,8 @@ i386_store_return_value (struct type *type, struct regcache *regcache,
internal_error (__FILE__, __LINE__,
"Cannot store return value of %d bytes long.", len);
}
+
+#undef I387_ST0_REGNUM
}
/* Extract from REGCACHE, which contains the (raw) register state, the
@@ -1302,10 +1346,10 @@ i386_register_type (struct gdbarch *gdbarch, int regnum)
if (i386_fp_regnum_p (regnum))
return builtin_type_i387_ext;
- if (i386_sse_regnum_p (regnum))
+ if (i386_sse_regnum_p (gdbarch, regnum))
return builtin_type_vec128i;
- if (i386_mmx_regnum_p (regnum))
+ if (i386_mmx_regnum_p (gdbarch, regnum))
return builtin_type_vec64i;
return builtin_type_int;
@@ -1317,24 +1361,30 @@ i386_register_type (struct gdbarch *gdbarch, int regnum)
static int
i386_mmx_regnum_to_fp_regnum (struct regcache *regcache, int regnum)
{
- int mmxi;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
+ int mmxreg, fpreg;
ULONGEST fstat;
int tos;
- int fpi;
- mmxi = regnum - MM0_REGNUM;
- regcache_raw_read_unsigned (regcache, FSTAT_REGNUM, &fstat);
+ /* Define I387_ST0_REGNUM such that we use the proper definitions
+ for REGCACHE's architecture. */
+#define I387_ST0_REGNUM tdep->st0_regnum
+
+ mmxreg = regnum - tdep->mm0_regnum;
+ regcache_raw_read_unsigned (regcache, I387_FSTAT_REGNUM, &fstat);
tos = (fstat >> 11) & 0x7;
- fpi = (mmxi + tos) % 8;
+ fpreg = (mmxreg + tos) % 8;
- return (FP0_REGNUM + fpi);
+ return (I387_ST0_REGNUM + fpreg);
+
+#undef I387_ST0_REGNUM
}
static void
i386_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
int regnum, void *buf)
{
- if (i386_mmx_regnum_p (regnum))
+ if (i386_mmx_regnum_p (gdbarch, regnum))
{
char mmx_buf[MAX_REGISTER_SIZE];
int fpnum = i386_mmx_regnum_to_fp_regnum (regcache, regnum);
@@ -1351,7 +1401,7 @@ static void
i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int regnum, const void *buf)
{
- if (i386_mmx_regnum_p (regnum))
+ if (i386_mmx_regnum_p (gdbarch, regnum))
{
char mmx_buf[MAX_REGISTER_SIZE];
int fpnum = i386_mmx_regnum_to_fp_regnum (regcache, regnum);
@@ -1368,14 +1418,6 @@ i386_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
}
-/* These registers don't have pervasive standard uses. Move them to
- i386-tdep.h if necessary. */
-
-#define I386_EBX_REGNUM 3 /* %ebx */
-#define I386_ECX_REGNUM 1 /* %ecx */
-#define I386_ESI_REGNUM 6 /* %esi */
-#define I386_EDI_REGNUM 7 /* %edi */
-
/* Return the register number of the register allocated by GCC after
REGNUM, or -1 if there is no such register. */
@@ -1502,7 +1544,84 @@ 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. */
+
+static 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 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_supply (regcache, i, regs + tdep->gregset_reg_offset[i]);
+ }
+}
+
+/* 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. */
+
+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;
+
+ if (len == I387_SIZEOF_FXSAVE)
+ {
+ i387_supply_fxsave (regcache, regnum, fpregs);
+ return;
+ }
+
+ gdb_assert (len == tdep->sizeof_fpregset);
+ i387_supply_fsave (regcache, regnum, fpregs);
+}
+
+/* Return the appropriate register set for the core section identified
+ by SECT_NAME and SECT_SIZE. */
+
+const struct regset *
+i386_regset_from_core_section (struct gdbarch *gdbarch,
+ const char *sect_name, size_t sect_size)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (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;
+ }
+ return tdep->gregset;
+ }
+
+ if ((strcmp (sect_name, ".reg2") == 0 && sect_size == tdep->sizeof_fpregset)
+ || (strcmp (sect_name, ".reg-xfp") == 0
+ && 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;
+ }
+ return tdep->fpregset;
+ }
+
+ return NULL;
+}
+
#ifdef STATIC_TRANSFORM_NAME
/* SunPRO encodes the static variables. This is not related to C++
@@ -1710,11 +1829,11 @@ int
i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
struct reggroup *group)
{
- int sse_regnum_p = (i386_sse_regnum_p (regnum)
- || i386_mxcsr_regnum_p (regnum));
+ int sse_regnum_p = (i386_sse_regnum_p (gdbarch, regnum)
+ || i386_mxcsr_regnum_p (gdbarch, regnum));
int fp_regnum_p = (i386_fp_regnum_p (regnum)
|| i386_fpc_regnum_p (regnum));
- int mmx_regnum_p = (i386_mmx_regnum_p (regnum));
+ int mmx_regnum_p = (i386_mmx_regnum_p (gdbarch, regnum));
if (group == i386_mmx_reggroup)
return mmx_regnum_p;
@@ -1757,22 +1876,38 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
tdep = XMALLOC (struct gdbarch_tdep);
gdbarch = gdbarch_alloc (&info, tdep);
- /* The i386 default settings now include the SSE registers.
- I386_NUM_XREGS includes mxcsr, and we don't want to count
- this as one of the xmm regs -- which is why we subtract one.
-
- Note: kevinb/2003-07-14: Whatever Mark's concerns are about the
- FPU registers in the FIXME below apply to the SSE registers as well.
- The only problem that I see is that these registers will show up
- in "info all-registers" even on CPUs where they don't exist. IMO,
- however, if it's a choice between printing them always (even when
- they don't exist) or never showing them to the user (even when they
- do exist), I prefer the former over the latter. Ideally, of course,
- we'd somehow autodetect that we have them (or not) and display them
- when we have them and suppress them when we don't.
-
- FIXME: kettenis/20020614: They do include the FPU registers for
- now, which probably is not quite right. */
+ /* General-purpose registers. */
+ tdep->gregset = NULL;
+ tdep->gregset_reg_offset = NULL;
+ tdep->gregset_num_regs = I386_NUM_GREGS;
+ tdep->sizeof_gregset = 0;
+
+ /* Floating-point registers. */
+ tdep->fpregset = NULL;
+ 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
+ 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
+ should try to autodetect whether they are available, such that we
+ can prevent "info all-registers" from displaying registers that
+ aren't available.
+
+ NOTE: kevinb/2003-07-13: ... if it's a choice between printing
+ [the SSE registers] always (even when they don't exist) or never
+ showing them to the user (even when they do exist), I prefer the
+ former over the latter. */
+
+ 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
+ of raw registers. */
+ tdep->mm0_regnum = 0;
+
+ /* I386_NUM_XREGS includes %mxcsr, so substract one. */
tdep->num_xmm_regs = I386_NUM_XREGS - 1;
tdep->jb_pc_offset = -1;
@@ -1876,6 +2011,18 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
frame_unwind_append_sniffer (gdbarch, i386_sigtramp_frame_sniffer);
frame_unwind_append_sniffer (gdbarch, i386_frame_sniffer);
+ /* If we have a register mapping, enable the generic core file
+ support, unless it has already been enabled. */
+ if (tdep->gregset_reg_offset
+ && !gdbarch_regset_from_core_section_p (gdbarch))
+ set_gdbarch_regset_from_core_section (gdbarch,
+ i386_regset_from_core_section);
+
+ /* Unless support for MMX has been disabled, make %mm0 the first
+ pseudo-register. */
+ if (tdep->mm0_regnum == 0)
+ tdep->mm0_regnum = gdbarch_num_regs (gdbarch);
+
return gdbarch;
}
diff --git a/gdb/i386-tdep.h b/gdb/i386-tdep.h
index 7412b8e..2c48979 100644
--- a/gdb/i386-tdep.h
+++ b/gdb/i386-tdep.h
@@ -1,4 +1,5 @@
-/* Target-dependent code for GDB, the GNU debugger.
+/* Target-dependent code for the i386.
+
Copyright 2001, 2002, 2003
Free Software Foundation, Inc.
@@ -22,9 +23,10 @@
#ifndef I386_TDEP_H
#define I386_TDEP_H
-struct reggroup;
-struct gdbarch;
struct frame_info;
+struct gdbarch;
+struct reggroup;
+struct regset;
/* GDB's i386 target supports both the 32-bit Intel Architecture
(IA-32) and the 64-bit AMD x86-64 architecture. Internally it uses
@@ -55,6 +57,25 @@ enum struct_return
/* i386 architecture specific information. */
struct gdbarch_tdep
{
+ /* General-purpose registers. */
+ struct regset *gregset;
+ int *gregset_reg_offset;
+ int gregset_num_regs;
+ size_t sizeof_gregset;
+
+ /* Floating-point registers. */
+ struct regset *fpregset;
+ size_t sizeof_fpregset;
+
+ /* Register number for %st(0). The register numbers for the other
+ registers follow from this one. Set this to -1 to indicate the
+ absence of an FPU. */
+ int st0_regnum;
+
+ /* Register number for %mm0. Set this to -1 to indicate the absence
+ of MMX support. */
+ int mm0_regnum;
+
/* Number of SSE registers. */
int num_xmm_regs;
@@ -83,8 +104,6 @@ struct gdbarch_tdep
/* Floating-point registers. */
-#define FPU_REG_RAW_SIZE 10
-
/* All FPU control regusters (except for FIOFF and FOOFF) are 16-bit
(at most) in the FPU, but are zero-extended to 32 bits in GDB's
register cache. */
@@ -131,26 +150,22 @@ extern int i386_fpc_regnum_p (int regnum);
#define MXCSR_REGNUM \
(XMM0_REGNUM + gdbarch_tdep (current_gdbarch)->num_xmm_regs)
-/* Return non-zero if REGNUM matches the SSE register and the SSE
- register set is active. */
-extern int i386_sse_regnum_p (int regnum);
-extern int i386_mxcsr_regnum_p (int regnum);
-
-/* FIXME: kettenis/2001-11-24: Obsolete macro's. */
-#define FCS_REGNUM FISEG_REGNUM
-#define FCOFF_REGNUM FIOFF_REGNUM
-#define FDS_REGNUM FOSEG_REGNUM
-#define FDOFF_REGNUM FOOFF_REGNUM
-
/* Register numbers of various important registers. */
-#define I386_EAX_REGNUM 0 /* %eax */
-#define I386_EDX_REGNUM 2 /* %edx */
-#define I386_ESP_REGNUM 4 /* %esp */
-#define I386_EBP_REGNUM 5 /* %ebp */
-#define I386_EIP_REGNUM 8 /* %eip */
-#define I386_EFLAGS_REGNUM 9 /* %eflags */
-#define I386_ST0_REGNUM 16 /* %st(0) */
+enum i386_regnum
+{
+ I386_EAX_REGNUM, /* %eax */
+ I386_ECX_REGNUM, /* %ecx */
+ I386_EDX_REGNUM, /* %edx */
+ I386_EBX_REGNUM, /* %ebx */
+ I386_ESP_REGNUM, /* %esp */
+ I386_EBP_REGNUM, /* %ebp */
+ I386_ESI_REGNUM, /* %esi */
+ I386_EDI_REGNUM, /* %edi */
+ I386_EIP_REGNUM, /* %eip */
+ I386_EFLAGS_REGNUM, /* %eflags */
+ I386_ST0_REGNUM = 16, /* %st(0) */
+};
#define I386_NUM_GREGS 16
#define I386_NUM_FREGS 16
@@ -173,6 +188,12 @@ extern char const *i386_register_name (int reg);
extern int i386_register_reggroup_p (struct gdbarch *gdbarch, int regnum,
struct reggroup *group);
+/* Return the appropriate register set for the core section identified
+ by SECT_NAME and SECT_SIZE. */
+extern const struct regset *
+ i386_regset_from_core_section (struct gdbarch *gdbarch,
+ const char *sect_name, size_t sect_size);
+
/* Initialize a basic ELF architecture variant. */
extern void i386_elf_init_abi (struct gdbarch_info, struct gdbarch *);
@@ -194,4 +215,3 @@ extern int i386obsd_sc_reg_offset[];
extern int i386bsd_sc_reg_offset[];
#endif /* i386-tdep.h */
-
diff --git a/gdb/i386b-nat.c b/gdb/i386b-nat.c
index 3c8a17c..7c2a7d8 100644
--- a/gdb/i386b-nat.c
+++ b/gdb/i386b-nat.c
@@ -23,7 +23,7 @@
#include <machine/reg.h>
-/* this table must line up with REGISTER_NAMES in tm-i386.h */
+/* This table must line up with REGISTER_NAME in "i386-tdep.c". */
/* symbols like 'tEAX' come from <machine/reg.h> */
static int tregmap[] =
{
diff --git a/gdb/i386bsd-nat.c b/gdb/i386bsd-nat.c
index d81dc66..9383a1d 100644
--- a/gdb/i386bsd-nat.c
+++ b/gdb/i386bsd-nat.c
@@ -157,7 +157,7 @@ fill_gregset (gregset_t *gregsetp, int regno)
void
supply_fpregset (fpregset_t *fpregsetp)
{
- i387_supply_fsave ((const char *) fpregsetp, -1);
+ i387_supply_fsave (current_regcache, -1, fpregsetp);
}
/* Fill register REGNO (if it is a floating-point register) in
@@ -200,7 +200,7 @@ fetch_inferior_registers (int regno)
(PTRACE_ARG3_TYPE) xmmregs, 0) == 0)
{
have_ptrace_xmmregs = 1;
- i387_supply_fxsave (xmmregs, -1);
+ i387_supply_fxsave (current_regcache, -1, xmmregs);
}
else
{
@@ -208,14 +208,14 @@ fetch_inferior_registers (int regno)
(PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating point status");
- i387_supply_fsave ((const char *) &fpregs, -1);
+ i387_supply_fsave (current_regcache, -1, &fpregs);
}
#else
if (ptrace (PT_GETFPREGS, PIDGET (inferior_ptid),
(PTRACE_ARG3_TYPE) &fpregs, 0) == -1)
perror_with_name ("Couldn't get floating point status");
- i387_supply_fsave ((const char *) &fpregs, -1);
+ i387_supply_fsave (current_regcache, -1, &fpregs);
#endif
}
}
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index 94d6860..80739cf 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -1,4 +1,5 @@
/* Target-dependent code for i386 BSD's.
+
Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -86,7 +87,7 @@ i386bsd_aout_in_solib_call_trampoline (CORE_ADDR pc, char *name)
/* Traditional BSD (4.3 BSD, still used for BSDI and 386BSD). */
/* From <machine/signal.h>. */
-int i386bsd_sc_reg_offset[I386_NUM_GREGS] =
+int i386bsd_sc_reg_offset[] =
{
-1, /* %eax */
-1, /* %ecx */
@@ -127,104 +128,7 @@ i386bsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sigtramp_end = 0xfdbfe000;
tdep->sigcontext_addr = i386bsd_sigcontext_addr;
tdep->sc_reg_offset = i386bsd_sc_reg_offset;
- tdep->sc_num_regs = I386_NUM_GREGS;
-}
-
-/* FreeBSD 3.0-RELEASE or later. */
-
-CORE_ADDR i386fbsd_sigtramp_start = 0xbfbfdf20;
-CORE_ADDR i386fbsd_sigtramp_end = 0xbfbfdff0;
-
-/* From <machine/signal.h>. */
-int i386fbsd_sc_reg_offset[I386_NUM_GREGS] =
-{
- 8 + 14 * 4, /* %eax */
- 8 + 13 * 4, /* %ecx */
- 8 + 12 * 4, /* %edx */
- 8 + 11 * 4, /* %ebx */
- 8 + 0 * 4, /* %esp */
- 8 + 1 * 4, /* %ebp */
- 8 + 10 * 4, /* %esi */
- 8 + 9 * 4, /* %edi */
- 8 + 3 * 4, /* %eip */
- 8 + 4 * 4, /* %eflags */
- 8 + 7 * 4, /* %cs */
- 8 + 8 * 4, /* %ss */
- 8 + 6 * 4, /* %ds */
- 8 + 5 * 4, /* %es */
- 8 + 15 * 4, /* %fs */
- 8 + 16 * 4 /* %gs */
-};
-
-static void
-i386fbsdaout_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
- /* Obviously FreeBSD is BSD-based. */
- i386bsd_init_abi (info, gdbarch);
-
- /* FreeBSD uses -freg-struct-return by default. */
- tdep->struct_return = reg_struct_return;
-
- /* FreeBSD uses a different memory layout. */
- tdep->sigtramp_start = i386fbsd_sigtramp_start;
- tdep->sigtramp_end = i386fbsd_sigtramp_end;
-
- /* FreeBSD has a more complete `struct sigcontext'. */
- tdep->sc_reg_offset = i386fbsd_sc_reg_offset;
- tdep->sc_num_regs = I386_NUM_GREGS;
-}
-
-static void
-i386fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
- /* It's almost identical to FreeBSD a.out. */
- i386fbsdaout_init_abi (info, gdbarch);
-
- /* Except that it uses ELF. */
- i386_elf_init_abi (info, gdbarch);
-
- /* FreeBSD ELF uses SVR4-style shared libraries. */
- set_gdbarch_in_solib_call_trampoline (gdbarch,
- generic_in_solib_call_trampoline);
-}
-
-/* FreeBSD 4.0-RELEASE or later. */
-
-/* From <machine/signal.h>. */
-int i386fbsd4_sc_reg_offset[I386_NUM_GREGS] =
-{
- 20 + 11 * 4, /* %eax */
- 20 + 10 * 4, /* %ecx */
- 20 + 9 * 4, /* %edx */
- 20 + 8 * 4, /* %ebx */
- 20 + 17 * 4, /* %esp */
- 20 + 6 * 4, /* %ebp */
- 20 + 5 * 4, /* %esi */
- 20 + 4 * 4, /* %edi */
- 20 + 14 * 4, /* %eip */
- 20 + 16 * 4, /* %eflags */
- 20 + 15 * 4, /* %cs */
- 20 + 18 * 4, /* %ss */
- 20 + 3 * 4, /* %ds */
- 20 + 2 * 4, /* %es */
- 20 + 1 * 4, /* %fs */
- 20 + 0 * 4 /* %gs */
-};
-
-static void
-i386fbsd4_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
-
- /* Inherit stuff from older releases. We assume that FreeBSD
- 4.0-RELEASE always uses ELF. */
- i386fbsd_init_abi (info, gdbarch);
-
- /* FreeBSD 4.0 introduced a new `struct sigcontext'. */
- tdep->sc_reg_offset = i386fbsd4_sc_reg_offset;
- tdep->sc_num_regs = I386_NUM_GREGS;
+ tdep->sc_num_regs = ARRAY_SIZE (i386bsd_sc_reg_offset);
}
@@ -249,9 +153,4 @@ _initialize_i386bsd_tdep (void)
{
gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_aout_flavour,
i386bsd_aout_osabi_sniffer);
-
- gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_FREEBSD_AOUT,
- i386fbsdaout_init_abi);
- gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_FREEBSD_ELF,
- i386fbsd4_init_abi);
}
diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c
index 3a6c797..7533f09 100644
--- a/gdb/i386gnu-nat.c
+++ b/gdb/i386gnu-nat.c
@@ -89,7 +89,7 @@ fetch_fpregs (struct proc *thread)
}
/* Supply the floating-point registers. */
- i387_supply_fsave (state.hw_state, -1);
+ i387_supply_fsave (current_regcache, -1, state.hw_state);
}
#ifdef HAVE_SYS_PROCFS_H
@@ -106,7 +106,7 @@ supply_gregset (gdb_gregset_t *gregs)
void
supply_fpregset (gdb_fpregset_t *fpregs)
{
- i387_supply_fsave ((const char *) fpregs, -1);
+ i387_supply_fsave (current_regcache, -1, fpregs);
}
#endif
@@ -242,7 +242,7 @@ gnu_store_registers (int regno)
if ((thread->fetched_regs & (1 << check_regno))
&& memcpy (REG_ADDR (&old_state, check_regno),
REG_ADDR (state, check_regno),
- REGISTER_RAW_SIZE (check_regno)))
+ DEPRECATED_REGISTER_RAW_SIZE (check_regno)))
/* Register CHECK_REGNO has changed! Ack! */
{
warning ("Register %s changed after the thread was aborted",
@@ -257,7 +257,7 @@ gnu_store_registers (int regno)
#define fill(state, regno) \
memcpy (REG_ADDR(state, regno), &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)], \
- REGISTER_RAW_SIZE (regno))
+ DEPRECATED_REGISTER_RAW_SIZE (regno))
if (regno == -1)
{
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index 9e8d973..dae0a1d 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -89,7 +89,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
i386nbsd_supply_reg (regs, -1);
/* Floating point registers. */
- i387_supply_fsave (fsave, -1);
+ i387_supply_fsave (current_regcache, -1, fsave);
}
static void
@@ -109,7 +109,7 @@ fetch_elfcore_registers (char *core_reg_sect, unsigned core_reg_size,
if (core_reg_size != 108)
warning ("Wrong size FP register set in core file.");
else
- i387_supply_fsave (core_reg_sect, -1);
+ i387_supply_fsave (current_regcache, -1, core_reg_sect);
break;
case 3: /* "Extended" floating point registers. This is gdb-speak
@@ -117,7 +117,7 @@ fetch_elfcore_registers (char *core_reg_sect, unsigned core_reg_size,
if (core_reg_size != 512)
warning ("Wrong size XMM register set in core file.");
else
- i387_supply_fxsave (core_reg_sect, -1);
+ i387_supply_fxsave (current_regcache, -1, core_reg_sect);
break;
default:
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
index 8cfaa24..a7e9441 100644
--- a/gdb/i386obsd-tdep.c
+++ b/gdb/i386obsd-tdep.c
@@ -66,7 +66,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
i386obsd_supply_reg (regs, -1);
/* Floating point registers. */
- i387_supply_fsave (fsave, -1);
+ i387_supply_fsave (current_regcache, -1, fsave);
}
static struct core_fns i386obsd_core_fns =
diff --git a/gdb/i386v4-nat.c b/gdb/i386v4-nat.c
index c680dac..188f01b 100644
--- a/gdb/i386v4-nat.c
+++ b/gdb/i386v4-nat.c
@@ -139,7 +139,7 @@ supply_fpregset (fpregset_t *fpregsetp)
if (FP0_REGNUM == 0)
return;
- i387_supply_fsave ((const char *) fpregsetp, -1);
+ i387_supply_fsave (current_regcache, -1, fpregsetp);
}
/* Fill register REGNO (if it is a floating-point register) in
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 6feb392..ff369f9 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -205,6 +205,7 @@ void
i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, const char *args)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (frame));
char buf[4];
ULONGEST fctrl;
ULONGEST fstat;
@@ -217,20 +218,26 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
int fpreg;
int top;
- fctrl = get_frame_register_unsigned (frame, FCTRL_REGNUM);
- fstat = get_frame_register_unsigned (frame, FSTAT_REGNUM);
- ftag = get_frame_register_unsigned (frame, FTAG_REGNUM);
- fiseg = get_frame_register_unsigned (frame, FISEG_REGNUM);
- fioff = get_frame_register_unsigned (frame, FIOFF_REGNUM);
- foseg = get_frame_register_unsigned (frame, FOSEG_REGNUM);
- fooff = get_frame_register_unsigned (frame, FOOFF_REGNUM);
- fop = get_frame_register_unsigned (frame, FOP_REGNUM);
+ gdb_assert (gdbarch == get_frame_arch (frame));
+
+ /* Define I387_ST0_REGNUM such that we use the proper definitions
+ for FRAME's architecture. */
+#define I387_ST0_REGNUM tdep->st0_regnum
+
+ fctrl = get_frame_register_unsigned (frame, I387_FCTRL_REGNUM);
+ fstat = get_frame_register_unsigned (frame, I387_FSTAT_REGNUM);
+ ftag = get_frame_register_unsigned (frame, I387_FTAG_REGNUM);
+ fiseg = get_frame_register_unsigned (frame, I387_FISEG_REGNUM);
+ fioff = get_frame_register_unsigned (frame, I387_FIOFF_REGNUM);
+ foseg = get_frame_register_unsigned (frame, I387_FOSEG_REGNUM);
+ fooff = get_frame_register_unsigned (frame, I387_FOOFF_REGNUM);
+ fop = get_frame_register_unsigned (frame, I387_FOP_REGNUM);
top = ((fstat >> 11) & 7);
for (fpreg = 7; fpreg >= 0; fpreg--)
{
- unsigned char raw[FPU_REG_RAW_SIZE];
+ unsigned char raw[I386_MAX_REGISTER_SIZE];
int tag = (ftag >> (fpreg * 2)) & 3;
int i;
@@ -252,7 +259,7 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
break;
}
- get_frame_register (frame, (fpreg + 8 - top) % 8 + FP0_REGNUM, raw);
+ get_frame_register (frame, (fpreg + 8 - top) % 8 + I387_ST0_REGNUM, raw);
fputs_filtered ("0x", file);
for (i = 9; i >= 0; i--)
@@ -278,6 +285,8 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
fprintf_filtered (file, "%s\n", local_hex_string_custom (fooff, "08"));
fprintf_filtered (file, "Opcode: %s\n",
local_hex_string_custom (fop ? (fop | 0xd800) : 0, "04"));
+
+#undef I387_ST0_REGNUM
}
@@ -331,70 +340,87 @@ i387_value_to_register (struct frame_info *frame, int regnum,
put_frame_register (frame, regnum, to);
}
+
/* Handle FSAVE and FXSAVE formats. */
+/* FIXME: kettenis/20030927: The functions below should accept a
+ `regcache' argument, but I don't want to change the function
+ signature just yet. There's some band-aid in the functions below
+ in the form of the `regcache' local variables. This will ease the
+ transition later on. */
+
/* At fsave_offset[REGNUM] you'll find the offset to the location in
the data structure used by the "fsave" instruction where GDB
register REGNUM is stored. */
static int fsave_offset[] =
{
- 28 + 0 * FPU_REG_RAW_SIZE, /* FP0_REGNUM through ... */
- 28 + 1 * FPU_REG_RAW_SIZE,
- 28 + 2 * FPU_REG_RAW_SIZE,
- 28 + 3 * FPU_REG_RAW_SIZE,
- 28 + 4 * FPU_REG_RAW_SIZE,
- 28 + 5 * FPU_REG_RAW_SIZE,
- 28 + 6 * FPU_REG_RAW_SIZE,
- 28 + 7 * FPU_REG_RAW_SIZE, /* ... FP7_REGNUM. */
- 0, /* FCTRL_REGNUM (16 bits). */
- 4, /* FSTAT_REGNUM (16 bits). */
- 8, /* FTAG_REGNUM (16 bits). */
- 16, /* FISEG_REGNUM (16 bits). */
- 12, /* FIOFF_REGNUM. */
- 24, /* FOSEG_REGNUM. */
- 20, /* FOOFF_REGNUM. */
- 18 /* FOP_REGNUM (bottom 11 bits). */
+ 28 + 0 * 10, /* %st(0) ... */
+ 28 + 1 * 10,
+ 28 + 2 * 10,
+ 28 + 3 * 10,
+ 28 + 4 * 10,
+ 28 + 5 * 10,
+ 28 + 6 * 10,
+ 28 + 7 * 10, /* ... %st(7). */
+ 0, /* `fctrl' (16 bits). */
+ 4, /* `fstat' (16 bits). */
+ 8, /* `ftag' (16 bits). */
+ 16, /* `fiseg' (16 bits). */
+ 12, /* `fioff'. */
+ 24, /* `foseg' (16 bits). */
+ 20, /* `fooff'. */
+ 18 /* `fop' (bottom 11 bits). */
};
-#define FSAVE_ADDR(fsave, regnum) (fsave + fsave_offset[regnum - FP0_REGNUM])
+#define FSAVE_ADDR(fsave, regnum) \
+ (fsave + fsave_offset[regnum - I387_ST0_REGNUM])
-/* Fill register REGNUM in GDB's register cache with the appropriate
- value from *FSAVE. This function masks off any of the reserved
- bits in *FSAVE. */
+/* Fill register REGNUM in REGCACHE with the appropriate value from
+ *FSAVE. This function masks off any of the reserved bits in
+ *FSAVE. */
void
-i387_supply_fsave (const char *fsave, int regnum)
+i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
+ const char *regs = fsave;
int i;
- for (i = FP0_REGNUM; i < XMM0_REGNUM; i++)
+ 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 tdep->st0_regnum
+
+ for (i = I387_ST0_REGNUM; i < I387_XMM0_REGNUM; i++)
if (regnum == -1 || regnum == i)
{
if (fsave == NULL)
{
- supply_register (i, NULL);
- return;
+ regcache_raw_supply (regcache, i, NULL);
+ continue;
}
/* Most of the FPU control registers occupy only 16 bits in the
fsave area. Give those a special treatment. */
- if (i >= FPC_REGNUM
- && i != FIOFF_REGNUM && i != FOOFF_REGNUM)
+ if (i >= I387_FCTRL_REGNUM
+ && i != I387_FIOFF_REGNUM && i != I387_FOOFF_REGNUM)
{
unsigned char val[4];
- memcpy (val, FSAVE_ADDR (fsave, i), 2);
+ memcpy (val, FSAVE_ADDR (regs, i), 2);
val[2] = val[3] = 0;
- if (i == FOP_REGNUM)
+ if (i == I387_FOP_REGNUM)
val[1] &= ((1 << 3) - 1);
- supply_register (i, val);
+ regcache_raw_supply (regcache, i, val);
}
else
- supply_register (i, FSAVE_ADDR (fsave, i));
+ regcache_raw_supply (regcache, i, FSAVE_ADDR (regs, i));
}
+#undef I387_ST0_REGNUM
}
/* Fill register REGNUM (if it is a floating-point register) in *FSAVE
@@ -403,34 +429,44 @@ i387_supply_fsave (const char *fsave, int regnum)
bits in *FSAVE. */
void
-i387_fill_fsave (char *fsave, int regnum)
+i387_fill_fsave (void *fsave, int regnum)
{
+ struct regcache *regcache = current_regcache;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ char *regs = fsave;
int i;
- for (i = FP0_REGNUM; i < XMM0_REGNUM; i++)
+ 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 tdep->st0_regnum
+
+ for (i = I387_ST0_REGNUM; i < I387_XMM0_REGNUM; i++)
if (regnum == -1 || regnum == i)
{
/* Most of the FPU control registers occupy only 16 bits in
the fsave area. Give those a special treatment. */
- if (i >= FPC_REGNUM
- && i != FIOFF_REGNUM && i != FOOFF_REGNUM)
+ if (i >= I387_FCTRL_REGNUM
+ && i != I387_FIOFF_REGNUM && i != I387_FOOFF_REGNUM)
{
unsigned char buf[4];
- regcache_collect (i, buf);
+ regcache_raw_collect (regcache, i, buf);
- if (i == FOP_REGNUM)
+ if (i == I387_FOP_REGNUM)
{
/* The opcode occupies only 11 bits. Make sure we
don't touch the other bits. */
buf[1] &= ((1 << 3) - 1);
- buf[1] |= ((FSAVE_ADDR (fsave, i))[1] & ~((1 << 3) - 1));
+ buf[1] |= ((FSAVE_ADDR (regs, i))[1] & ~((1 << 3) - 1));
}
- memcpy (FSAVE_ADDR (fsave, i), buf, 2);
+ memcpy (FSAVE_ADDR (regs, i), buf, 2);
}
else
- regcache_collect (i, FSAVE_ADDR (fsave, i));
+ regcache_raw_collect (regcache, i, FSAVE_ADDR (regs, i));
}
+#undef I387_ST0_REGNUM
}
@@ -440,23 +476,23 @@ i387_fill_fsave (char *fsave, int regnum)
static int fxsave_offset[] =
{
- 32, /* FP0_REGNUM through ... */
+ 32, /* %st(0) through ... */
48,
64,
80,
96,
112,
128,
- 144, /* ... FP7_REGNUM (80 bits each). */
- 0, /* FCTRL_REGNUM (16 bits). */
- 2, /* FSTAT_REGNUM (16 bits). */
- 4, /* FTAG_REGNUM (16 bits). */
- 12, /* FISEG_REGNUM (16 bits). */
- 8, /* FIOFF_REGNUM. */
- 20, /* FOSEG_REGNUM (16 bits). */
- 16, /* FOOFF_REGNUM. */
- 6, /* FOP_REGNUM (bottom 11 bits). */
- 160 + 0 * 16, /* XMM0_REGNUM through ... */
+ 144, /* ... %st(7) (80 bits each). */
+ 0, /* `fctrl' (16 bits). */
+ 2, /* `fstat' (16 bits). */
+ 4, /* `ftag' (16 bits). */
+ 12, /* `fiseg' (16 bits). */
+ 8, /* `fioff'. */
+ 20, /* `foseg' (16 bits). */
+ 16, /* `fooff'. */
+ 6, /* `fop' (bottom 11 bits). */
+ 160 + 0 * 16, /* %xmm0 through ... */
160 + 1 * 16,
160 + 2 * 16,
160 + 3 * 16,
@@ -471,56 +507,63 @@ static int fxsave_offset[] =
160 + 12 * 16,
160 + 13 * 16,
160 + 14 * 16,
- 160 + 15 * 16, /* ... XMM15_REGNUM (128 bits each). */
- 24 /* MXCSR_REGNUM. */
+ 160 + 15 * 16, /* ... %xmm15 (128 bits each). */
};
-/* FIXME: kettenis/20030430: We made an unfortunate choice in putting
- %mxcsr after the SSE registers %xmm0-%xmm7 instead of before, since
- it makes supporting the registers %xmm8-%xmm15 on x86-64 a bit
- involved. Hack around it by explicitly overriding the offset for
- %mxcsr here. */
-
#define FXSAVE_ADDR(fxsave, regnum) \
- ((regnum == MXCSR_REGNUM) ? (fxsave + 24) : \
- (fxsave + fxsave_offset[regnum - FP0_REGNUM]))
+ (fxsave + fxsave_offset[regnum - I387_ST0_REGNUM])
+
+/* We made an unfortunate choice in putting %mxcsr after the SSE
+ registers %xmm0-%xmm7 instead of before, since it makes supporting
+ the registers %xmm8-%xmm15 on AMD64 a bit involved. Therefore we
+ don't include the offset for %mxcsr here above. */
+
+#define FXSAVE_MXCSR_ADDR(fxsave) (fxsave + 24)
static int i387_tag (const unsigned char *raw);
-/* Fill register REGNUM in GDB's register cache with the appropriate
+/* Fill register REGNUM in REGCACHE with the appropriate
floating-point or SSE register value from *FXSAVE. This function
masks off any of the reserved bits in *FXSAVE. */
void
-i387_supply_fxsave (const char *fxsave, int regnum)
+i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave)
{
- int i, last_regnum = MXCSR_REGNUM;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (get_regcache_arch (regcache));
+ const char *regs = fxsave;
+ int i;
+
+ gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
+ gdb_assert (tdep->num_xmm_regs > 0);
- if (gdbarch_tdep (current_gdbarch)->num_xmm_regs == 0)
- last_regnum = FOP_REGNUM;
+ /* Define I387_ST0_REGNUM and I387_NUM_XMM_REGS such that we use the
+ proper definitions for REGCACHE's architecture. */
- for (i = FP0_REGNUM; i <= last_regnum; i++)
+#define I387_ST0_REGNUM tdep->st0_regnum
+#define I387_NUM_XMM_REGS tdep->num_xmm_regs
+
+ for (i = I387_ST0_REGNUM; i < I387_MXCSR_REGNUM; i++)
if (regnum == -1 || regnum == i)
{
- if (fxsave == NULL)
+ if (regs == NULL)
{
- supply_register (i, NULL);
+ regcache_raw_supply (regcache, i, NULL);
continue;
}
/* Most of the FPU control registers occupy only 16 bits in
the fxsave area. Give those a special treatment. */
- if (i >= FPC_REGNUM && i < XMM0_REGNUM
- && i != FIOFF_REGNUM && i != FOOFF_REGNUM)
+ if (i >= I387_FCTRL_REGNUM && i < I387_XMM0_REGNUM
+ && i != I387_FIOFF_REGNUM && i != I387_FOOFF_REGNUM)
{
unsigned char val[4];
- memcpy (val, FXSAVE_ADDR (fxsave, i), 2);
+ memcpy (val, FXSAVE_ADDR (regs, i), 2);
val[2] = val[3] = 0;
- if (i == FOP_REGNUM)
+ if (i == I387_FOP_REGNUM)
val[1] &= ((1 << 3) - 1);
- else if (i== FTAG_REGNUM)
+ else if (i== I387_FTAG_REGNUM)
{
/* The fxsave area contains a simplified version of
the tag word. We have to look at the actual 80-bit
@@ -530,7 +573,8 @@ i387_supply_fxsave (const char *fxsave, int regnum)
int fpreg;
int top;
- top = (((FXSAVE_ADDR (fxsave, FSTAT_REGNUM))[1] >> 3) & 0x7);
+ top = ((FXSAVE_ADDR (regs, I387_FSTAT_REGNUM))[1] >> 3);
+ top &= 0x7;
for (fpreg = 7; fpreg >= 0; fpreg--)
{
@@ -538,8 +582,8 @@ i387_supply_fxsave (const char *fxsave, int regnum)
if (val[0] & (1 << fpreg))
{
- int regnum = (fpreg + 8 - top) % 8 + FP0_REGNUM;
- tag = i387_tag (FXSAVE_ADDR (fxsave, regnum));
+ int regnum = (fpreg + 8 - top) % 8 + I387_ST0_REGNUM;
+ tag = i387_tag (FXSAVE_ADDR (regs, regnum));
}
else
tag = 3; /* Empty */
@@ -549,11 +593,23 @@ i387_supply_fxsave (const char *fxsave, int regnum)
val[0] = ftag & 0xff;
val[1] = (ftag >> 8) & 0xff;
}
- supply_register (i, val);
+ regcache_raw_supply (regcache, i, val);
}
else
- supply_register (i, FXSAVE_ADDR (fxsave, i));
+ regcache_raw_supply (regcache, i, FXSAVE_ADDR (regs, i));
}
+
+ if (regnum == I387_MXCSR_REGNUM || regnum == -1)
+ {
+ if (regs == NULL)
+ regcache_raw_supply (regcache, I387_MXCSR_REGNUM, NULL);
+ else
+ regcache_raw_supply (regcache, I387_MXCSR_REGNUM,
+ FXSAVE_MXCSR_ADDR (regs));
+ }
+
+#undef I387_ST0_REGNUM
+#undef I387_NUM_XMM_REGS
}
/* Fill register REGNUM (if it is a floating-point or SSE register) in
@@ -562,33 +618,42 @@ i387_supply_fxsave (const char *fxsave, int regnum)
reserved bits in *FXSAVE. */
void
-i387_fill_fxsave (char *fxsave, int regnum)
+i387_fill_fxsave (void *fxsave, int regnum)
{
- int i, last_regnum = MXCSR_REGNUM;
+ struct regcache *regcache = current_regcache;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+ char *regs = fxsave;
+ int i;
+
+ gdb_assert (tdep->st0_regnum >= I386_ST0_REGNUM);
+ gdb_assert (tdep->num_xmm_regs > 0);
- if (gdbarch_tdep (current_gdbarch)->num_xmm_regs == 0)
- last_regnum = FOP_REGNUM;
+ /* Define I387_ST0_REGNUM and I387_NUM_XMM_REGS such that we use the
+ proper definitions for REGCACHE's architecture. */
- for (i = FP0_REGNUM; i <= last_regnum; i++)
+#define I387_ST0_REGNUM tdep->st0_regnum
+#define I387_NUM_XMM_REGS tdep->num_xmm_regs
+
+ for (i = I387_ST0_REGNUM; i < I387_MXCSR_REGNUM; i++)
if (regnum == -1 || regnum == i)
{
/* Most of the FPU control registers occupy only 16 bits in
the fxsave area. Give those a special treatment. */
- if (i >= FPC_REGNUM && i < XMM0_REGNUM
- && i != FIOFF_REGNUM && i != FOOFF_REGNUM)
+ if (i >= I387_FCTRL_REGNUM && i < I387_XMM0_REGNUM
+ && i != I387_FIOFF_REGNUM && i != I387_FOOFF_REGNUM)
{
unsigned char buf[4];
- regcache_collect (i, buf);
+ regcache_raw_collect (regcache, i, buf);
- if (i == FOP_REGNUM)
+ if (i == I387_FOP_REGNUM)
{
/* The opcode occupies only 11 bits. Make sure we
don't touch the other bits. */
buf[1] &= ((1 << 3) - 1);
- buf[1] |= ((FXSAVE_ADDR (fxsave, i))[1] & ~((1 << 3) - 1));
+ buf[1] |= ((FXSAVE_ADDR (regs, i))[1] & ~((1 << 3) - 1));
}
- else if (i == FTAG_REGNUM)
+ else if (i == I387_FTAG_REGNUM)
{
/* Converting back is much easier. */
@@ -607,11 +672,18 @@ i387_fill_fxsave (char *fxsave, int regnum)
buf[0] |= (1 << fpreg);
}
}
- memcpy (FXSAVE_ADDR (fxsave, i), buf, 2);
+ memcpy (FXSAVE_ADDR (regs, i), buf, 2);
}
else
- regcache_collect (i, FXSAVE_ADDR (fxsave, i));
+ regcache_raw_collect (regcache, i, FXSAVE_ADDR (regs, i));
}
+
+ if (regnum == I387_MXCSR_REGNUM || regnum == -1)
+ regcache_raw_collect (regcache, I387_MXCSR_REGNUM,
+ FXSAVE_MXCSR_ADDR (regs));
+
+#undef I387_ST0_REGNUM
+#undef I387_NUM_XMM_REGS
}
/* Recreate the FTW (tag word) valid bits from the 80-bit FP data in
diff --git a/gdb/i387-tdep.h b/gdb/i387-tdep.h
index 654b4a5..377e17a 100644
--- a/gdb/i387-tdep.h
+++ b/gdb/i387-tdep.h
@@ -23,9 +23,31 @@
#define I387_TDEP_H
struct gdbarch;
-struct ui_file;
struct frame_info;
+struct regcache;
struct type;
+struct ui_file;
+
+/* Because the number of general-purpose registers is different for
+ AMD64, the floating-point registers and SSE registers get shifted.
+ The following definitions are intended to help writing code that
+ needs the register numbers of floating-point registers and SSE
+ registers. In order to use these, one should provide a definition
+ for I387_ST0_REGNUM, and possibly I387_NUM_XMM_REGS, preferably by
+ using a local "#define" in the body of the function that uses this.
+ Please "#undef" them before the end of the function. */
+
+#define I387_FCTRL_REGNUM (I387_ST0_REGNUM + 8)
+#define I387_FSTAT_REGNUM (I387_FCTRL_REGNUM + 1)
+#define I387_FTAG_REGNUM (I387_FCTRL_REGNUM + 2)
+#define I387_FISEG_REGNUM (I387_FCTRL_REGNUM + 3)
+#define I387_FIOFF_REGNUM (I387_FCTRL_REGNUM + 4)
+#define I387_FOSEG_REGNUM (I387_FCTRL_REGNUM + 5)
+#define I387_FOOFF_REGNUM (I387_FCTRL_REGNUM + 6)
+#define I387_FOP_REGNUM (I387_FCTRL_REGNUM + 7)
+#define I387_XMM0_REGNUM (I387_ST0_REGNUM + 16)
+#define I387_MXCSR_REGNUM (I387_XMM0_REGNUM + I387_NUM_XMM_REGS)
+
/* Print out the i387 floating point state. */
@@ -52,30 +74,32 @@ extern void i387_value_to_register (struct frame_info *frame, int regnum,
#define I387_SIZEOF_FSAVE 108
#define I387_SIZEOF_FXSAVE 512
-/* Fill register REGNUM in GDB's register cache with the appropriate
- value from *FSAVE. This function masks off any of the reserved
- bits in *FSAVE. */
+/* Fill register REGNUM in REGCACHE with the appropriate value from
+ *FSAVE. This function masks off any of the reserved bits in
+ *FSAVE. */
-extern void i387_supply_fsave (const char *fsave, int regnum);
+extern void i387_supply_fsave (struct regcache *regcache, int regnum,
+ const void *fsave);
/* Fill register REGNUM (if it is a floating-point register) in *FSAVE
with the value in GDB's register cache. If REGNUM is -1, do this
for all registers. This function doesn't touch any of the reserved
bits in *FSAVE. */
-extern void i387_fill_fsave (char *fsave, int regnum);
+extern void i387_fill_fsave (void *fsave, int regnum);
-/* Fill register REGNUM in GDB's register cache with the appropriate
+/* Fill register REGNUM in REGCACHE with the appropriate
floating-point or SSE register value from *FXSAVE. This function
masks off any of the reserved bits in *FXSAVE. */
-extern void i387_supply_fxsave (const char *fxsave, int regnum);
+extern void i387_supply_fxsave (struct regcache *regcache, int regnum,
+ const void *fxsave);
/* Fill register REGNUM (if it is a floating-point or SSE register) in
*FXSAVE with the value in GDB's register cache. If REGNUM is -1, do
this for all registers. This function doesn't touch any of the
reserved bits in *FXSAVE. */
-extern void i387_fill_fxsave (char *fxsave, int regnum);
+extern void i387_fill_fxsave (void *fxsave, int regnum);
#endif /* i387-tdep.h */
diff --git a/gdb/ia64-aix-nat.c b/gdb/ia64-aix-nat.c
index ee3dc16..61f34e1 100644
--- a/gdb/ia64-aix-nat.c
+++ b/gdb/ia64-aix-nat.c
@@ -87,7 +87,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_)], \
- REGISTER_RAW_SIZE (_regi_))
+ DEPRECATED_REGISTER_RAW_SIZE (_regi_))
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
{
@@ -110,10 +110,10 @@ fill_gregset (prgregset_t *gregsetp, int regno)
{
memcpy (&(gregsetp->__bspstore),
&deprecated_registers[DEPRECATED_REGISTER_BYTE (IA64_BSP_REGNUM)],
- REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (IA64_BSPSTORE_REGNUM)],
&deprecated_registers[DEPRECATED_REGISTER_BYTE (IA64_BSP_REGNUM)],
- REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (IA64_BSP_REGNUM));
}
#if 0
@@ -156,7 +156,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, REGISTER_RAW_SIZE (regi));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regi));
}
}
}
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index ebaad7c..a2ca8fa 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -403,7 +403,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_)], \
- REGISTER_RAW_SIZE (_regi_))
+ DEPRECATED_REGISTER_RAW_SIZE (_regi_))
for (regi = IA64_GR0_REGNUM; regi <= IA64_GR31_REGNUM; regi++)
{
@@ -469,7 +469,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, REGISTER_RAW_SIZE (regi));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regi));
}
}
}
diff --git a/gdb/ia64-linux-tdep.c b/gdb/ia64-linux-tdep.c
index 97f8814..25902c5 100644
--- a/gdb/ia64-linux-tdep.c
+++ b/gdb/ia64-linux-tdep.c
@@ -21,6 +21,7 @@
#include "defs.h"
#include "arch-utils.h"
+#include "gdbcore.h"
/* The sigtramp code is in a non-readable (executable-only) region
of memory called the ``gate page''. The addresses in question
@@ -47,40 +48,47 @@ ia64_linux_in_sigtramp (CORE_ADDR pc, char *func_name)
CORE_ADDR
ia64_linux_sigcontext_register_address (CORE_ADDR sp, int regno)
{
+ char buf[8];
+ CORE_ADDR sigcontext_addr = 0;
+
+ /* The address of the sigcontext area is found at offset 16 in the sigframe. */
+ read_memory (sp + 16, buf, 8);
+ sigcontext_addr = extract_unsigned_integer (buf, 8);
+
if (IA64_GR0_REGNUM <= regno && regno <= IA64_GR31_REGNUM)
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 200 + 8 * (regno - IA64_GR0_REGNUM);
+ return sigcontext_addr + 200 + 8 * (regno - IA64_GR0_REGNUM);
else if (IA64_BR0_REGNUM <= regno && regno <= IA64_BR7_REGNUM)
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 136 + 8 * (regno - IA64_BR0_REGNUM);
+ return sigcontext_addr + 136 + 8 * (regno - IA64_BR0_REGNUM);
else if (IA64_FR0_REGNUM <= regno && regno <= IA64_FR127_REGNUM)
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 464 + 16 * (regno - IA64_FR0_REGNUM);
+ return sigcontext_addr + 464 + 16 * (regno - IA64_FR0_REGNUM);
else
switch (regno)
{
case IA64_IP_REGNUM :
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 40;
+ return sigcontext_addr + 40;
case IA64_CFM_REGNUM :
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 48;
+ return sigcontext_addr + 48;
case IA64_PSR_REGNUM :
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 56; /* user mask only */
+ return sigcontext_addr + 56; /* user mask only */
/* sc_ar_rsc is provided, from which we could compute bspstore, but
I don't think it's worth it. Anyway, if we want it, it's at offset
64 */
case IA64_BSP_REGNUM :
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 72;
+ return sigcontext_addr + 72;
case IA64_RNAT_REGNUM :
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 80;
+ return sigcontext_addr + 80;
case IA64_CCV_REGNUM :
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 88;
+ return sigcontext_addr + 88;
case IA64_UNAT_REGNUM :
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 96;
+ return sigcontext_addr + 96;
case IA64_FPSR_REGNUM :
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 104;
+ return sigcontext_addr + 104;
case IA64_PFS_REGNUM :
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 112;
+ return sigcontext_addr + 112;
case IA64_LC_REGNUM :
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 120;
+ return sigcontext_addr + 120;
case IA64_PR_REGNUM :
- return sp + IA64_LINUX_SIGCONTEXT_OFFSET + 128;
+ return sigcontext_addr + 128;
default :
return 0;
}
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index 79c645d..4d0f8a8 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -108,7 +108,7 @@ static int fp_regnum = IA64_VFP_REGNUM;
static int lr_regnum = IA64_VRAP_REGNUM;
/* NOTE: we treat the register stack registers r32-r127 as pseudo-registers because
- they are in memory and must be calculated via the bsp register. */
+ they may not be accessible via the ptrace register get/set interfaces. */
enum pseudo_regs { FIRST_PSEUDO_REGNUM = NUM_IA64_RAW_REGS, VBOF_REGNUM = IA64_NAT127_REGNUM + 1, V32_REGNUM,
V127_REGNUM = V32_REGNUM + 95,
VP0_REGNUM, VP16_REGNUM = VP0_REGNUM + 16, VP63_REGNUM = VP0_REGNUM + 63, LAST_PSEUDO_REGNUM };
@@ -232,6 +232,7 @@ struct ia64_frame_cache
CORE_ADDR saved_sp; /* stack pointer for frame */
CORE_ADDR bsp; /* points at r32 for the current frame */
CORE_ADDR cfm; /* cfm value for current frame */
+ CORE_ADDR prev_cfm; /* cfm value for previous frame */
int frameless;
int sof; /* Size of frame (decoded from cfm value) */
int sol; /* Size of locals (decoded from cfm value) */
@@ -255,9 +256,6 @@ struct ia64_frame_cache
struct gdbarch_tdep
{
- int os_ident; /* From the ELF header, one of the ELFOSABI_
- constants: ELFOSABI_LINUX, ELFOSABI_AIX,
- etc. */
CORE_ADDR (*sigcontext_register_address) (CORE_ADDR, int);
/* OS specific function which, given a frame address
and register number, returns the offset to the
@@ -316,10 +314,16 @@ ia64_dwarf_reg_to_regnum (int reg)
return reg;
}
+static int
+floatformat_valid (const struct floatformat *fmt, const char *from)
+{
+ return 1;
+}
+
const struct floatformat floatformat_ia64_ext =
{
floatformat_little, 82, 0, 1, 17, 65535, 0x1ffff, 18, 64,
- floatformat_intbit_yes
+ floatformat_intbit_yes, "floatformat_ia64_ext", floatformat_valid
};
@@ -343,7 +347,7 @@ read_sigcontext_register (struct frame_info *frame, int regnum)
regaddr = SIGCONTEXT_REGISTER_ADDRESS (get_frame_base (frame), regnum);
if (regaddr)
- return read_memory_integer (regaddr, REGISTER_RAW_SIZE (regnum));
+ return read_memory_integer (regaddr, register_size (current_gdbarch, regnum));
else
internal_error (__FILE__, __LINE__,
"read_sigcontext_register: Register %d not in struct sigcontext", regnum);
@@ -716,10 +720,10 @@ ia64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
{
ULONGEST reg_addr = rse_address_add (bsp, (regnum - V32_REGNUM));
reg = read_memory_integer ((CORE_ADDR)reg_addr, 8);
- store_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum), reg);
+ store_unsigned_integer (buf, register_size (current_gdbarch, regnum), reg);
}
else
- store_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum), 0);
+ store_unsigned_integer (buf, register_size (current_gdbarch, regnum), 0);
}
else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT31_REGNUM)
{
@@ -727,7 +731,7 @@ ia64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
ULONGEST unat;
regcache_cooked_read_unsigned (regcache, IA64_UNAT_REGNUM, &unat);
unatN_val = (unat & (1LL << (regnum - IA64_NAT0_REGNUM))) != 0;
- store_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum), unatN_val);
+ store_unsigned_integer (buf, register_size (current_gdbarch, regnum), unatN_val);
}
else if (IA64_NAT32_REGNUM <= regnum && regnum <= IA64_NAT127_REGNUM)
{
@@ -762,7 +766,7 @@ ia64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
natN_val = (nat_collection >> nat_bit) & 1;
}
- store_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum), natN_val);
+ store_unsigned_integer (buf, register_size (current_gdbarch, regnum), natN_val);
}
else if (regnum == VBOF_REGNUM)
{
@@ -777,7 +781,7 @@ ia64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
/* The bsp points at the end of the register frame so we
subtract the size of frame from it to get beginning of frame. */
vbsp = rse_address_add (bsp, -(cfm & 0x7f));
- store_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum), vbsp);
+ store_unsigned_integer (buf, register_size (current_gdbarch, regnum), vbsp);
}
else if (VP0_REGNUM <= regnum && regnum <= VP63_REGNUM)
{
@@ -799,10 +803,10 @@ ia64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
+ ((regnum - VP16_REGNUM) + rrb_pr) % 48;
}
prN_val = (pr & (1LL << (regnum - VP0_REGNUM))) != 0;
- store_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum), prN_val);
+ store_unsigned_integer (buf, register_size (current_gdbarch, regnum), prN_val);
}
else
- memset (buf, 0, REGISTER_RAW_SIZE (regnum));
+ memset (buf, 0, register_size (current_gdbarch, regnum));
}
static void
@@ -829,7 +833,7 @@ ia64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
{
ULONGEST unatN_val, unat, unatN_mask;
regcache_cooked_read_unsigned (regcache, IA64_UNAT_REGNUM, &unat);
- unatN_val = extract_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum));
+ unatN_val = extract_unsigned_integer (buf, register_size (current_gdbarch, regnum));
unatN_mask = (1LL << (regnum - IA64_NAT0_REGNUM));
if (unatN_val == 0)
unat &= ~unatN_mask;
@@ -853,7 +857,7 @@ ia64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
if ((cfm & 0x7f) > regnum - V32_REGNUM)
gr_addr = rse_address_add (bsp, (regnum - V32_REGNUM));
- natN_val = extract_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum));
+ natN_val = extract_unsigned_integer (buf, register_size (current_gdbarch, regnum));
if (gr_addr != 0 && (natN_val == 0 || natN_val == 1))
{
@@ -882,7 +886,7 @@ ia64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
nat_collection |= natN_mask;
else
nat_collection &= ~natN_mask;
- store_unsigned_integer (nat_buf, REGISTER_RAW_SIZE (regnum), nat_collection);
+ store_unsigned_integer (nat_buf, register_size (current_gdbarch, regnum), nat_collection);
write_memory (nat_addr, nat_buf, 8);
}
}
@@ -907,7 +911,7 @@ ia64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
regnum = VP16_REGNUM
+ ((regnum - VP16_REGNUM) + rrb_pr) % 48;
}
- prN_val = extract_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum));
+ prN_val = extract_unsigned_integer (buf, register_size (current_gdbarch, regnum));
prN_mask = (1LL << (regnum - VP0_REGNUM));
if (prN_val == 0)
pr &= ~prN_mask;
@@ -1030,6 +1034,7 @@ ia64_alloc_frame_cache (void)
cache->base = 0;
cache->pc = 0;
cache->cfm = 0;
+ cache->prev_cfm = 0;
cache->sof = 0;
cache->sol = 0;
cache->sor = 0;
@@ -1450,9 +1455,20 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *next_frame,
/* For the previous argument registers we require the previous bof.
If we can't find the previous cfm, then we can do nothing. */
+ cfm = 0;
if (cache->saved_regs[IA64_CFM_REGNUM] != 0)
{
cfm = read_memory_integer (cache->saved_regs[IA64_CFM_REGNUM], 8);
+ }
+ else if (cfm_reg != 0)
+ {
+ frame_unwind_register (next_frame, cfm_reg, buf);
+ cfm = extract_unsigned_integer (buf, 8);
+ }
+ cache->prev_cfm = cfm;
+
+ if (cfm != 0)
+ {
sor = ((cfm >> 14) & 0xf) * 8;
sof = (cfm & 0x7f);
sol = (cfm >> 7) & 0x7f;
@@ -1564,7 +1580,11 @@ ia64_frame_this_id (struct frame_info *next_frame, void **this_cache,
if (cache->base == 0)
return;
- (*this_id) = frame_id_build (cache->base, cache->pc);
+ (*this_id) = frame_id_build_special (cache->base, cache->pc, cache->bsp);
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog,
+ "regular frame id: code %lx, stack %lx, special %lx, next_frame %p\n",
+ this_id->code_addr, this_id->stack_addr, cache->bsp, next_frame);
}
static void
@@ -1593,12 +1613,12 @@ ia64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
if (!valuep)
valuep = dummy_valp;
- memset (valuep, 0, REGISTER_RAW_SIZE (regnum));
+ memset (valuep, 0, register_size (current_gdbarch, regnum));
if (regnum == SP_REGNUM)
{
/* Handle SP values for all frames but the topmost. */
- store_unsigned_integer (valuep, REGISTER_RAW_SIZE (regnum),
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum),
cache->base);
}
else if (regnum == IA64_BSP_REGNUM)
@@ -1613,7 +1633,7 @@ ia64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
/* We want to calculate the previous bsp as the end of the previous register stack frame.
This corresponds to what the hardware bsp register will be if we pop the frame
back which is why we might have been called. We know the beginning of the current
- frame is cache->bsp - cache->sof. This value in the previous frame points to
+ frame is cache->bsp - cache->sof. This value in the previous frame points to
the start of the output registers. We can calculate the end of that frame by adding
the size of output (sof (size of frame) - sol (size of locals)). */
ia64_frame_prev_register (next_frame, this_cache, IA64_CFM_REGNUM,
@@ -1623,23 +1643,25 @@ ia64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
bsp = rse_address_add (cache->bsp, -(cache->sof));
prev_bsp = rse_address_add (bsp, (prev_cfm & 0x7f) - ((prev_cfm >> 7) & 0x7f));
- store_unsigned_integer (valuep, REGISTER_RAW_SIZE (regnum),
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum),
prev_bsp);
}
else if (regnum == IA64_CFM_REGNUM)
{
- CORE_ADDR addr = 0;
-
- if (cache->frameless)
+ CORE_ADDR addr = cache->saved_regs[IA64_CFM_REGNUM];
+
+ if (addr != 0)
{
- CORE_ADDR cfm = 0;
- frame_unwind_register (next_frame, IA64_PFS_REGNUM, valuep);
+ *lvalp = lval_memory;
+ *addrp = addr;
+ read_memory (addr, valuep, register_size (current_gdbarch, regnum));
}
- else
+ else if (cache->prev_cfm)
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum), cache->prev_cfm);
+ else if (cache->frameless)
{
- addr = cache->saved_regs[IA64_CFM_REGNUM];
- if (addr != 0)
- read_memory (addr, valuep, REGISTER_RAW_SIZE (regnum));
+ CORE_ADDR cfm = 0;
+ frame_unwind_register (next_frame, IA64_PFS_REGNUM, valuep);
}
}
else if (regnum == IA64_VFP_REGNUM)
@@ -1649,7 +1671,7 @@ ia64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
above. If the function lacks one of these frame pointers, we can
still provide a value since we know the size of the frame. */
CORE_ADDR vfp = cache->base;
- store_unsigned_integer (valuep, REGISTER_RAW_SIZE (IA64_VFP_REGNUM), vfp);
+ store_unsigned_integer (valuep, register_size (current_gdbarch, IA64_VFP_REGNUM), vfp);
}
else if (VP0_REGNUM <= regnum && regnum <= VP63_REGNUM)
{
@@ -1673,7 +1695,7 @@ ia64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
}
prN_val = extract_bit_field ((unsigned char *) pr_valuep,
regnum - VP0_REGNUM, 1);
- store_unsigned_integer (valuep, REGISTER_RAW_SIZE (regnum), prN_val);
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum), prN_val);
}
else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT31_REGNUM)
{
@@ -1687,7 +1709,7 @@ ia64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
&unat_optim, &unat_lval, &unat_addr, &unat_realnum, unat_valuep);
unatN_val = extract_bit_field ((unsigned char *) unat_valuep,
regnum - IA64_NAT0_REGNUM, 1);
- store_unsigned_integer (valuep, REGISTER_RAW_SIZE (regnum),
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum),
unatN_val);
}
else if (IA64_NAT32_REGNUM <= regnum && regnum <= IA64_NAT127_REGNUM)
@@ -1722,58 +1744,73 @@ ia64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
natval = (nat_collection >> nat_bit) & 1;
}
- store_unsigned_integer (valuep, REGISTER_RAW_SIZE (regnum), natval);
+ store_unsigned_integer (valuep, register_size (current_gdbarch, regnum), natval);
}
else if (regnum == IA64_IP_REGNUM)
{
CORE_ADDR pc = 0;
+ CORE_ADDR addr = cache->saved_regs[IA64_VRAP_REGNUM];
- if (cache->frameless)
+ if (addr != 0)
{
- frame_unwind_register (next_frame, IA64_BR0_REGNUM, buf);
+ *lvalp = lval_memory;
+ *addrp = addr;
+ read_memory (addr, buf, register_size (current_gdbarch, IA64_IP_REGNUM));
pc = extract_unsigned_integer (buf, 8);
}
- else
+ else if (cache->frameless)
{
- CORE_ADDR addr = cache->saved_regs[IA64_VRAP_REGNUM];
- if (addr != 0)
- {
- read_memory (addr, buf, REGISTER_RAW_SIZE (IA64_IP_REGNUM));
- pc = extract_unsigned_integer (buf, 8);
- }
+ frame_unwind_register (next_frame, IA64_BR0_REGNUM, buf);
+ pc = extract_unsigned_integer (buf, 8);
}
pc &= ~0xf;
store_unsigned_integer (valuep, 8, pc);
}
else if (regnum == IA64_PSR_REGNUM)
{
+ /* We don't know how to get the complete previous PSR, but we need it for
+ the slot information when we unwind the pc (pc is formed of IP register
+ plus slot information from PSR). To get the previous slot information,
+ we mask it off the return address. */
ULONGEST slot_num = 0;
CORE_ADDR pc= 0;
CORE_ADDR psr = 0;
+ CORE_ADDR addr = cache->saved_regs[IA64_VRAP_REGNUM];
frame_unwind_register (next_frame, IA64_PSR_REGNUM, buf);
psr = extract_unsigned_integer (buf, 8);
- if (cache->frameless)
+ if (addr != 0)
{
- CORE_ADDR pc;
- frame_unwind_register (next_frame, IA64_BR0_REGNUM, buf);
+ *lvalp = lval_memory;
+ *addrp = addr;
+ read_memory (addr, buf, register_size (current_gdbarch, IA64_IP_REGNUM));
pc = extract_unsigned_integer (buf, 8);
}
- else
+ else if (cache->frameless)
{
- CORE_ADDR addr = cache->saved_regs[IA64_VRAP_REGNUM];
- if (addr != 0)
- {
- read_memory (addr, buf, REGISTER_RAW_SIZE (IA64_IP_REGNUM));
- pc = extract_unsigned_integer (buf, 8);
- }
+ CORE_ADDR pc;
+ frame_unwind_register (next_frame, IA64_BR0_REGNUM, buf);
+ pc = extract_unsigned_integer (buf, 8);
}
psr &= ~(3LL << 41);
slot_num = pc & 0x3LL;
psr |= (CORE_ADDR)slot_num << 41;
store_unsigned_integer (valuep, 8, psr);
}
+ else if (regnum == IA64_BR0_REGNUM)
+ {
+ CORE_ADDR br0 = 0;
+ CORE_ADDR addr = cache->saved_regs[IA64_BR0_REGNUM];
+ if (addr != 0)
+ {
+ *lvalp = lval_memory;
+ *addrp = addr;
+ read_memory (addr, buf, register_size (current_gdbarch, IA64_BR0_REGNUM));
+ br0 = extract_unsigned_integer (buf, 8);
+ }
+ store_unsigned_integer (valuep, 8, br0);
+ }
else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM) ||
(regnum >= V32_REGNUM && regnum <= V127_REGNUM))
{
@@ -1785,7 +1822,7 @@ ia64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
{
*lvalp = lval_memory;
*addrp = addr;
- read_memory (addr, valuep, REGISTER_RAW_SIZE (regnum));
+ read_memory (addr, valuep, register_size (current_gdbarch, regnum));
}
else if (cache->frameless)
{
@@ -1809,7 +1846,7 @@ ia64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
addr = rse_address_add (prev_bof, (regnum - IA64_GR32_REGNUM));
*lvalp = lval_memory;
*addrp = addr;
- read_memory (addr, valuep, REGISTER_RAW_SIZE (regnum));
+ read_memory (addr, valuep, register_size (current_gdbarch, regnum));
}
}
else
@@ -1833,12 +1870,18 @@ ia64_frame_prev_register (struct frame_info *next_frame, void **this_cache,
{
*lvalp = lval_memory;
*addrp = addr;
- read_memory (addr, valuep, REGISTER_RAW_SIZE (regnum));
+ read_memory (addr, valuep, register_size (current_gdbarch, regnum));
}
/* Otherwise, punt and get the current value of the register. */
else
frame_unwind_register (next_frame, regnum, valuep);
}
+
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog,
+ "regular prev register <%d> <%s> is %lx\n", regnum,
+ (((unsigned) regnum <= IA64_NAT127_REGNUM)
+ ? ia64_register_names[regnum] : "r??"), extract_unsigned_integer (valuep, 8));
}
static const struct frame_unwind ia64_frame_unwind =
@@ -1869,10 +1912,8 @@ ia64_sigtramp_frame_init_saved_regs (struct ia64_frame_cache *cache)
SIGCONTEXT_REGISTER_ADDRESS (cache->base, IA64_CFM_REGNUM);
cache->saved_regs[IA64_PSR_REGNUM] =
SIGCONTEXT_REGISTER_ADDRESS (cache->base, IA64_PSR_REGNUM);
-#if 0
cache->saved_regs[IA64_BSP_REGNUM] =
- SIGCONTEXT_REGISTER_ADDRESS (frame->frame, IA64_BSP_REGNUM);
-#endif
+ SIGCONTEXT_REGISTER_ADDRESS (cache->base, IA64_BSP_REGNUM);
cache->saved_regs[IA64_RNAT_REGNUM] =
SIGCONTEXT_REGISTER_ADDRESS (cache->base, IA64_RNAT_REGNUM);
cache->saved_regs[IA64_CCV_REGNUM] =
@@ -1886,9 +1927,8 @@ ia64_sigtramp_frame_init_saved_regs (struct ia64_frame_cache *cache)
cache->saved_regs[IA64_LC_REGNUM] =
SIGCONTEXT_REGISTER_ADDRESS (cache->base, IA64_LC_REGNUM);
for (regno = IA64_GR1_REGNUM; regno <= IA64_GR31_REGNUM; regno++)
- if (regno != sp_regnum)
- cache->saved_regs[regno] =
- SIGCONTEXT_REGISTER_ADDRESS (cache->base, regno);
+ cache->saved_regs[regno] =
+ SIGCONTEXT_REGISTER_ADDRESS (cache->base, regno);
for (regno = IA64_BR0_REGNUM; regno <= IA64_BR7_REGNUM; regno++)
cache->saved_regs[regno] =
SIGCONTEXT_REGISTER_ADDRESS (cache->base, regno);
@@ -1912,7 +1952,16 @@ ia64_sigtramp_frame_cache (struct frame_info *next_frame, void **this_cache)
cache = ia64_alloc_frame_cache ();
frame_unwind_register (next_frame, sp_regnum, buf);
- cache->base = extract_unsigned_integer (buf, 8) + cache->mem_stack_frame_size;
+ /* Note that frame size is hard-coded below. We cannot calculate it
+ via prologue examination. */
+ cache->base = extract_unsigned_integer (buf, 8) + 16;
+
+ frame_unwind_register (next_frame, IA64_BSP_REGNUM, buf);
+ cache->bsp = extract_unsigned_integer (buf, 8);
+
+ frame_unwind_register (next_frame, IA64_CFM_REGNUM, buf);
+ cache->cfm = extract_unsigned_integer (buf, 8);
+ cache->sof = cache->cfm & 0x7f;
ia64_sigtramp_frame_init_saved_regs (cache);
@@ -1927,7 +1976,11 @@ ia64_sigtramp_frame_this_id (struct frame_info *next_frame,
struct ia64_frame_cache *cache =
ia64_sigtramp_frame_cache (next_frame, this_cache);
- (*this_id) = frame_id_build (cache->base, frame_pc_unwind (next_frame));
+ (*this_id) = frame_id_build_special (cache->base, frame_pc_unwind (next_frame), cache->bsp);
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog,
+ "sigtramp frame id: code %lx, stack %lx, special %lx, next_frame %p\n",
+ this_id->code_addr, this_id->stack_addr, cache->bsp, next_frame);
}
static void
@@ -1937,11 +1990,75 @@ ia64_sigtramp_frame_prev_register (struct frame_info *next_frame,
enum lval_type *lvalp, CORE_ADDR *addrp,
int *realnump, void *valuep)
{
- /* Make sure we've initialized the cache. */
- ia64_sigtramp_frame_cache (next_frame, this_cache);
+ char dummy_valp[MAX_REGISTER_SIZE];
+ char buf[MAX_REGISTER_SIZE];
- ia64_frame_prev_register (next_frame, this_cache, regnum,
- optimizedp, lvalp, addrp, realnump, valuep);
+ struct ia64_frame_cache *cache =
+ ia64_sigtramp_frame_cache (next_frame, this_cache);
+
+ gdb_assert (regnum >= 0);
+
+ if (!target_has_registers)
+ error ("No registers.");
+
+ *optimizedp = 0;
+ *addrp = 0;
+ *lvalp = not_lval;
+ *realnump = -1;
+
+ /* Rather than check each time if valuep is non-null, supply a dummy buffer
+ when valuep is not supplied. */
+ if (!valuep)
+ valuep = dummy_valp;
+
+ memset (valuep, 0, register_size (current_gdbarch, regnum));
+
+ if (regnum == IA64_IP_REGNUM)
+ {
+ CORE_ADDR pc = 0;
+ CORE_ADDR addr = cache->saved_regs[IA64_VRAP_REGNUM];
+
+ if (addr != 0)
+ {
+ *lvalp = lval_memory;
+ *addrp = addr;
+ read_memory (addr, buf, register_size (current_gdbarch, IA64_IP_REGNUM));
+ pc = extract_unsigned_integer (buf, 8);
+ }
+ pc &= ~0xf;
+ store_unsigned_integer (valuep, 8, pc);
+ }
+ else if ((regnum >= IA64_GR32_REGNUM && regnum <= IA64_GR127_REGNUM) ||
+ (regnum >= V32_REGNUM && regnum <= V127_REGNUM))
+ {
+ CORE_ADDR addr = 0;
+ if (regnum >= V32_REGNUM)
+ regnum = IA64_GR32_REGNUM + (regnum - V32_REGNUM);
+ addr = cache->saved_regs[regnum];
+ if (addr != 0)
+ {
+ *lvalp = lval_memory;
+ *addrp = addr;
+ read_memory (addr, valuep, register_size (current_gdbarch, regnum));
+ }
+ }
+ else
+ {
+ /* All other registers not listed above. */
+ CORE_ADDR addr = cache->saved_regs[regnum];
+ if (addr != 0)
+ {
+ *lvalp = lval_memory;
+ *addrp = addr;
+ read_memory (addr, valuep, register_size (current_gdbarch, regnum));
+ }
+ }
+
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog,
+ "sigtramp prev register <%s> is %lx\n",
+ (((unsigned) regnum <= IA64_NAT127_REGNUM)
+ ? ia64_register_names[regnum] : "r??"), extract_unsigned_integer (valuep, 8));
}
static const struct frame_unwind ia64_sigtramp_frame_unwind =
@@ -2293,7 +2410,8 @@ find_func_descr (CORE_ADDR faddr, CORE_ADDR *fdaptr)
so the user can see the function address rather than just the
function descriptor. */
static CORE_ADDR
-ia64_convert_from_func_ptr_addr (CORE_ADDR addr)
+ia64_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr,
+ struct target_ops *targ)
{
struct obj_section *s;
@@ -2473,12 +2591,20 @@ static struct frame_id
ia64_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
char buf[8];
- CORE_ADDR sp;
+ CORE_ADDR sp, bsp;
frame_unwind_register (next_frame, sp_regnum, buf);
sp = extract_unsigned_integer (buf, 8);
- return frame_id_build (sp, frame_pc_unwind (next_frame));
+ frame_unwind_register (next_frame, IA64_BSP_REGNUM, buf);
+ bsp = extract_unsigned_integer (buf, 8);
+
+ if (gdbarch_debug >= 1)
+ fprintf_unfiltered (gdb_stdlog,
+ "dummy frame id: code %lx, stack %lx, special %lx\n",
+ frame_pc_unwind (next_frame), sp, bsp);
+
+ return frame_id_build_special (sp, frame_pc_unwind (next_frame), bsp);
}
static CORE_ADDR
@@ -2579,47 +2705,21 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
struct gdbarch *gdbarch;
struct gdbarch_tdep *tdep;
- int os_ident;
- if (info.abfd != NULL
- && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour)
- {
- os_ident = elf_elfheader (info.abfd)->e_ident[EI_OSABI];
-
- /* If os_ident is 0, it is not necessarily the case that we're
- on a SYSV system. (ELFOSABI_NONE is defined to be 0.)
- GNU/Linux uses a note section to record OS/ABI info, but
- leaves e_ident[EI_OSABI] zero. So we have to check for note
- sections too. */
- if (os_ident == 0)
- {
- bfd_map_over_sections (info.abfd,
- process_note_abi_tag_sections,
- &os_ident);
- }
- }
- else
- os_ident = -1;
-
- for (arches = gdbarch_list_lookup_by_info (arches, &info);
- arches != NULL;
- arches = gdbarch_list_lookup_by_info (arches->next, &info))
- {
- tdep = gdbarch_tdep (arches->gdbarch);
- if (tdep &&tdep->os_ident == os_ident)
- return arches->gdbarch;
- }
+ /* If there is already a candidate, use it. */
+ arches = gdbarch_list_lookup_by_info (arches, &info);
+ if (arches != NULL)
+ return arches->gdbarch;
tdep = xmalloc (sizeof (struct gdbarch_tdep));
gdbarch = gdbarch_alloc (&info, tdep);
- tdep->os_ident = os_ident;
/* Set the method of obtaining the sigcontext addresses at which
registers are saved. The method of checking to see if
native_find_global_pointer is nonzero to indicate that we're
on AIX is kind of hokey, but I can't think of a better way
to do it. */
- if (os_ident == ELFOSABI_LINUX)
+ if (info.osabi == GDB_OSABI_LINUX)
tdep->sigcontext_register_address = ia64_linux_sigcontext_register_address;
else if (native_find_global_pointer != 0)
tdep->sigcontext_register_address = ia64_aix_sigcontext_register_address;
@@ -2633,7 +2733,7 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
generic_elf_find_global_pointer. This arrangement should (in
theory) allow us to cross debug GNU/Linux binaries from an AIX
machine. */
- if (os_ident == ELFOSABI_LINUX)
+ if (info.osabi == GDB_OSABI_LINUX)
tdep->find_global_pointer = generic_elf_find_global_pointer;
else if (native_find_global_pointer != 0)
tdep->find_global_pointer = native_find_global_pointer;
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 926eaf3..7695c6a 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -182,7 +182,9 @@ find_function_addr (struct value *function, struct type **retval_type)
if (TYPE_CODE (ftype) == TYPE_CODE_FUNC
|| TYPE_CODE (ftype) == TYPE_CODE_METHOD)
{
- funaddr = CONVERT_FROM_FUNC_PTR_ADDR (funaddr);
+ funaddr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ funaddr,
+ &current_target);
value_type = TYPE_TARGET_TYPE (ftype);
}
else
@@ -562,7 +564,9 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
dummy_addr = DEPRECATED_CALL_DUMMY_ADDRESS ();
/* Make certain that the address points at real code, and not a
function descriptor. */
- dummy_addr = CONVERT_FROM_FUNC_PTR_ADDR (dummy_addr);
+ dummy_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ dummy_addr,
+ &current_target);
/* A call dummy always consists of just a single breakpoint, so
it's address is the same as the address of the dummy. */
bp_addr = dummy_addr;
@@ -583,7 +587,9 @@ call_function_by_hand (struct value *function, int nargs, struct value **args)
dummy_addr = entry_point_address ();
/* Make certain that the address points at real code, and not
a function descriptor. */
- dummy_addr = CONVERT_FROM_FUNC_PTR_ADDR (dummy_addr);
+ dummy_addr = gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ dummy_addr,
+ &current_target);
/* A call dummy always consists of just a single breakpoint,
so it's address is the same as the address of the dummy. */
bp_addr = dummy_addr;
@@ -903,7 +909,7 @@ You must use a pointer to function type variable. Command ignored.", arg_name);
else
{
/* The assumption here is that push_dummy_call() returned the
- stack part of the frame ID. Unfortunatly, many older
+ 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
@@ -1076,30 +1082,34 @@ the function call).", name);
address of the returned structure. Usually this will be
overwritten by the callee. I don't know about other
architectures, so I defined this macro */
-#ifdef VALUE_RETURNED_FROM_STACK
+ /* FIXME: cagney/2003-09-27: This is no longer needed. The problem
+ is now handled directly be by the code below. */
+#ifdef DEPRECATED_VALUE_RETURNED_FROM_STACK
if (struct_return)
{
do_cleanups (retbuf_cleanup);
- return VALUE_RETURNED_FROM_STACK (value_type, struct_addr);
+ return DEPRECATED_VALUE_RETURNED_FROM_STACK (value_type, struct_addr);
}
#endif
- /* NOTE: cagney/2002-09-10: Only when the stack has been correctly
- aligned (using frame_align()) do we can trust STRUCT_ADDR and
- fetch the return value direct from the stack. This lack of trust
- comes about because legacy targets have a nasty habit of
- silently, and local to PUSH_ARGUMENTS(), moving STRUCT_ADDR. For
- such targets, just hope that value_being_returned() can find the
- adjusted value. */
- if (struct_return && gdbarch_frame_align_p (current_gdbarch))
+ 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
+ (PUSH_DUMMY_CALL precursor) would silently move the location
+ of the struct return value making STRUCT_ADDR bogus. If
+ 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
{
- struct value *retval = value_being_returned (value_type, retbuf,
- struct_return);
+ /* The non-register case was handled above. */
+ struct value *retval = register_value_being_returned (value_type,
+ retbuf);
do_cleanups (retbuf_cleanup);
return retval;
}
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index eee0b73..a7e0e15 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -44,6 +44,7 @@
#include "reggroups.h"
#include "block.h"
#include <ctype.h>
+#include "gdb_assert.h"
/* Functions exported for general use, in inferior.h: */
@@ -261,7 +262,6 @@ notice_args_read (char *args, int from_tty, struct cmd_list_element *c)
/* Compute command-line string given argument vector. This does the
same shell processing as fork_inferior. */
-/* ARGSUSED */
char *
construct_inferior_arguments (struct gdbarch *gdbarch, int argc, char **argv)
{
@@ -370,7 +370,6 @@ strip_bg_char (char **args)
return 0;
}
-/* ARGSUSED */
void
tty_command (char *file, int from_tty)
{
@@ -543,7 +542,6 @@ continue_command (char *proc_count_exp, int from_tty)
/* Step until outside of current statement. */
-/* ARGSUSED */
static void
step_command (char *count_string, int from_tty)
{
@@ -552,7 +550,6 @@ step_command (char *count_string, int from_tty)
/* Likewise, but skip over subroutine calls as if single instructions. */
-/* ARGSUSED */
static void
next_command (char *count_string, int from_tty)
{
@@ -561,14 +558,12 @@ next_command (char *count_string, int from_tty)
/* Likewise, but step only one instruction. */
-/* ARGSUSED */
void
stepi_command (char *count_string, int from_tty)
{
step_1 (0, 1, count_string);
}
-/* ARGSUSED */
void
nexti_command (char *count_string, int from_tty)
{
@@ -958,7 +953,6 @@ signal_command (char *signum_exp, int from_tty)
we set. This may involve changes to wait_for_inferior and the
proceed status code. */
-/* ARGSUSED */
static void
until_next_command (int from_tty)
{
@@ -1077,7 +1071,7 @@ print_return_value (int structure_return, struct type *value_type)
if (!structure_return)
{
- value = value_being_returned (value_type, stop_registers, structure_return);
+ value = register_value_being_returned (value_type, stop_registers);
stb = ui_out_stream_new (uiout);
ui_out_text (uiout, "Value returned is ");
ui_out_field_fmt (uiout, "gdb-result-var", "$%d", record_latest_value (value));
@@ -1086,19 +1080,62 @@ print_return_value (int structure_return, struct type *value_type)
ui_out_field_stream (uiout, "return-value", stb);
ui_out_text (uiout, "\n");
}
- else
+ /* 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. */
+#ifdef DEPRECATED_VALUE_RETURNED_FROM_STACK
+#define DEPRECATED_VALUE_RETURNED_FROM_STACK_P 1
+#else
+#define DEPRECATED_VALUE_RETURNED_FROM_STACK_P 0
+#endif
+ else if (gdbarch_return_value_p (current_gdbarch)
+ || DEPRECATED_VALUE_RETURNED_FROM_STACK_P)
+ /* 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. */
{
- /* 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 */
-#ifdef VALUE_RETURNED_FROM_STACK
- value = 0;
+ 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");
-#else
- value = value_being_returned (value_type, stop_registers, structure_return);
+ return;
+ }
+ else
+ {
+ if (EXTRACT_STRUCT_VALUE_ADDRESS_P ())
+ {
+ CORE_ADDR addr = EXTRACT_STRUCT_VALUE_ADDRESS (stop_registers);
+ if (!addr)
+ error ("Function return value unknown.");
+ value = value_at (value_type, addr, NULL);
+ }
+ else if (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ())
+ {
+ char *buf = deprecated_grub_regcache_for_registers (stop_registers);
+ CORE_ADDR addr = DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (buf);
+ 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));
+ }
stb = ui_out_stream_new (uiout);
ui_out_text (uiout, "Value returned is ");
ui_out_field_fmt (uiout, "gdb-result-var", "$%d", record_latest_value (value));
@@ -1106,7 +1143,6 @@ print_return_value (int structure_return, struct type *value_type)
value_print (value, stb->stream, 0, Val_no_prettyprint);
ui_out_field_stream (uiout, "return-value", stb);
ui_out_text (uiout, "\n");
-#endif
}
}
@@ -1284,7 +1320,6 @@ finish_command (char *arg, int from_tty)
}
}
-/* ARGSUSED */
static void
program_info (char *args, int from_tty)
{
@@ -1446,7 +1481,6 @@ unset_environment_command (char *var, int from_tty)
static const char path_var_name[] = "PATH";
-/* ARGSUSED */
static void
path_info (char *args, int from_tty)
{
@@ -1476,9 +1510,6 @@ path_command (char *dirname, int from_tty)
}
-#ifdef REGISTER_NAMES
-char *gdb_register_names[] = REGISTER_NAMES;
-#endif
/* Print out the machine register regnum. If regnum is -1, print all
registers (print_all == 1) or all non-float and non-vector
registers (print_all == 0).
@@ -1557,7 +1588,7 @@ default_print_registers_info (struct gdbarch *gdbarch,
else
{
memcpy (virtual_buffer, raw_buffer,
- REGISTER_VIRTUAL_SIZE (i));
+ DEPRECATED_REGISTER_VIRTUAL_SIZE (i));
}
/* If virtual format is floating, print it that way, and in raw
@@ -1570,13 +1601,13 @@ default_print_registers_info (struct gdbarch *gdbarch,
file, 0, 1, 0, Val_pretty_default);
fprintf_filtered (file, "\t(raw 0x");
- for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
+ for (j = 0; j < DEPRECATED_REGISTER_RAW_SIZE (i); j++)
{
int idx;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
idx = j;
else
- idx = REGISTER_RAW_SIZE (i) - 1 - j;
+ idx = DEPRECATED_REGISTER_RAW_SIZE (i) - 1 - j;
fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
}
fprintf_filtered (file, ")");
@@ -1907,7 +1938,6 @@ interrupt_target_command (char *args, int from_tty)
}
}
-/* ARGSUSED */
static void
print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
struct frame_info *frame, const char *args)
@@ -1944,7 +1974,6 @@ float_info (char *args, int from_tty)
print_float_info (current_gdbarch, gdb_stdout, deprecated_selected_frame, args);
}
-/* ARGSUSED */
static void
unset_command (char *args, int from_tty)
{
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 60191f2..b36dcd4 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -472,29 +472,6 @@ extern int deprecated_pc_in_call_dummy_at_entry_point (CORE_ADDR pc,
CORE_ADDR sp,
CORE_ADDR frame_address);
-/* It's often not enough for our clients to know whether the PC is merely
- somewhere within the call dummy. They may need to know whether the
- call dummy has actually completed. (For example, wait_for_inferior
- wants to know when it should truly stop because the call dummy has
- completed. If we're single-stepping because of slow watchpoints,
- then we may find ourselves stopped at the entry of the call dummy,
- and want to continue stepping until we reach the end.)
-
- Note that this macro is intended for targets (like HP-UX) which
- require more than a single breakpoint in their call dummies, and
- therefore cannot use the DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET
- mechanism.
-
- If a target does define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET,
- then this default implementation of CALL_DUMMY_HAS_COMPLETED is
- sufficient. Else, a target may wish to supply an implementation
- that works in the presense of multiple breakpoints in its call
- dummy. */
-#if !defined(CALL_DUMMY_HAS_COMPLETED)
-#define CALL_DUMMY_HAS_COMPLETED(pc, sp, frame_address) \
- DEPRECATED_PC_IN_CALL_DUMMY((pc), (sp), (frame_address))
-#endif
-
/* 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 b860af7..55f6ab5 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -412,14 +412,12 @@ terminal_ours_1 (int output_only)
}
}
-/* ARGSUSED */
void
term_info (char *arg, int from_tty)
{
target_terminal_info (arg, from_tty);
}
-/* ARGSUSED */
void
child_terminal_info (char *args, int from_tty)
{
@@ -572,7 +570,6 @@ new_tty (void)
/* Kill the inferior process. Make us have no inferior. */
-/* ARGSUSED */
static void
kill_command (char *arg, int from_tty)
{
@@ -604,7 +601,6 @@ kill_command (char *arg, int from_tty)
/* Call set_sigint_trap when you need to pass a signal on to an attached
process when handling SIGINT */
-/* ARGSUSED */
static void
pass_signal (int signo)
{
diff --git a/gdb/infptrace.c b/gdb/infptrace.c
index 1286b75..ef86f90 100644
--- a/gdb/infptrace.c
+++ b/gdb/infptrace.c
@@ -366,7 +366,7 @@ fetch_register (int regno)
if (CANNOT_FETCH_REGISTER (regno))
{
- memset (buf, '\0', REGISTER_RAW_SIZE (regno)); /* Supply zeroes */
+ memset (buf, '\0', DEPRECATED_REGISTER_RAW_SIZE (regno)); /* Supply zeroes */
supply_register (regno, buf);
return;
}
@@ -378,7 +378,7 @@ fetch_register (int regno)
offset = U_REGS_OFFSET;
regaddr = register_addr (regno, offset);
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+ for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
*(PTRACE_XFER_TYPE *) & buf[i] = ptrace (PT_READ_U, tid,
@@ -445,7 +445,7 @@ store_register (int regno)
regcache_collect (regno, buf);
/* Store the local buffer into the inferior a chunk at the time. */
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+ for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) regaddr,
diff --git a/gdb/infrun.c b/gdb/infrun.c
index f4ab632..6bc22a6 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -153,10 +153,6 @@ static int may_follow_exec = MAY_FOLLOW_EXEC;
#define IN_SOLIB_DYNSYM_RESOLVE_CODE(pc) 0
#endif
-#ifndef SKIP_SOLIB_RESOLVER
-#define SKIP_SOLIB_RESOLVER(pc) 0
-#endif
-
/* This function returns TRUE if pc is the address of an instruction
that lies within the dynamic linker (such as the event hook, or the
dld itself).
@@ -495,7 +491,6 @@ static int singlestep_breakpoints_inserted_p = 0;
/* Things to clean up if we QUIT out of resume (). */
-/* ARGSUSED */
static void
resume_cleanups (void *ignore)
{
@@ -520,7 +515,7 @@ set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c)
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. Unfortunatly, for ``show'' commands cloned from
+ 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?). */
@@ -2637,6 +2632,22 @@ process_event_stop_test:
/* In the case where we just stepped out of a function into the
middle of a line of the caller, continue stepping, but
step_frame_id must be modified to current frame */
+#if 0
+ /* NOTE: cagney/2003-10-16: I think this frame ID inner test is too
+ generous. It will trigger on things like a step into a frameless
+ 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. */
+#endif
{
struct frame_id current_frame = get_frame_id (get_current_frame ());
if (!(frame_id_inner (current_frame, step_frame_id)))
@@ -2792,7 +2803,7 @@ step_over_function (struct execution_control_state *ecs)
- avoid handling the case where the PC hasn't been saved in the
prologue analyzer
- Unfortunatly, not five lines further down, is a call to
+ Unfortunately, not five lines further down, is a call to
get_frame_id() and that is guarenteed to trigger the prologue
analyzer.
@@ -3623,7 +3634,7 @@ void
write_inferior_status_register (struct inferior_status *inf_status, int regno,
LONGEST val)
{
- int size = REGISTER_RAW_SIZE (regno);
+ int size = DEPRECATED_REGISTER_RAW_SIZE (regno);
void *buf = alloca (size);
store_signed_integer (buf, size, val);
regcache_raw_write (inf_status->registers, regno, buf);
diff --git a/gdb/inftarg.c b/gdb/inftarg.c
index 7786579..6829400 100644
--- a/gdb/inftarg.c
+++ b/gdb/inftarg.c
@@ -306,7 +306,6 @@ child_files_info (struct target_ops *ignore)
attach_flag ? "attached" : "child", target_pid_to_str (inferior_ptid));
}
-/* ARGSUSED */
static void
child_open (char *arg, int from_tty)
{
@@ -552,7 +551,45 @@ child_core_file_to_sym_file (char *core)
*/
return NULL;
}
-
+
+/* Perform a partial transfer to/from the specified object. For
+ memory transfers, fall back to the old memory xfer functions. */
+
+static LONGEST
+child_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 child_xfer_memory (offset, readbuf, len, 0/*write*/,
+ NULL, ops);
+ if (writebuf)
+ return child_xfer_memory (offset, readbuf, len, 1/*write*/,
+ NULL, ops);
+ return -1;
+
+#if 0
+ case TARGET_OBJECT_UNWIND_TABLE:
+#ifndef NATIVE_XFER_UNWIND_TABLE
+#define NATIVE_XFER_UNWIND_TABLE(OPS,OBJECT,ANNEX,WRITEBUF,READBUF,OFFSET,LEN) (-1)
+#endif
+ return NATIVE_XFER_UNWIND_TABLE (ops, object, annex, readbuf, writebuf,
+ offset, len);
+#endif
+
+#if 0
+ case TARGET_OBJECT_AUXV:
+ return native_xfer_auxv (PIDGET (inferior_ptid), readbuf, writebuf,
+ offset, len);
+#endif
+
+ default:
+ return -1;
+ }
+}
#if !defined(CHILD_PID_TO_STR)
char *
@@ -579,6 +616,7 @@ init_child_ops (void)
child_ops.to_store_registers = store_inferior_registers;
child_ops.to_prepare_to_store = child_prepare_to_store;
child_ops.to_xfer_memory = child_xfer_memory;
+ child_ops.to_xfer_partial = child_xfer_partial;
child_ops.to_files_info = child_files_info;
child_ops.to_insert_breakpoint = memory_insert_breakpoint;
child_ops.to_remove_breakpoint = memory_remove_breakpoint;
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index f7c2034..224d376 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -84,27 +84,27 @@ fill_gregset (gregset_t *gregsetp, int regno)
if ((regno == -1) || (regno == regi))
*(regp + regi) =
extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)],
- REGISTER_RAW_SIZE (regi));
+ DEPRECATED_REGISTER_RAW_SIZE (regi));
if ((regno == -1) || (regno == PC_REGNUM))
*(regp + CTX_EPC) =
extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)],
- REGISTER_RAW_SIZE (PC_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM));
if ((regno == -1) || (regno == CAUSE_REGNUM))
*(regp + CTX_CAUSE) =
extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (CAUSE_REGNUM)],
- REGISTER_RAW_SIZE (CAUSE_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (CAUSE_REGNUM));
if ((regno == -1) || (regno == HI_REGNUM))
*(regp + CTX_MDHI) =
extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (HI_REGNUM)],
- REGISTER_RAW_SIZE (HI_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (HI_REGNUM));
if ((regno == -1) || (regno == LO_REGNUM))
*(regp + CTX_MDLO) =
extract_signed_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (LO_REGNUM)],
- REGISTER_RAW_SIZE (LO_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (LO_REGNUM));
}
/*
@@ -147,7 +147,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, REGISTER_RAW_SIZE (regi));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regi));
}
}
@@ -219,7 +219,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
*dstp++ = *srcp++;
*dstp++ = *srcp++;
*dstp++ = *srcp++;
- if (REGISTER_RAW_SIZE (regno) == 4)
+ if (DEPRECATED_REGISTER_RAW_SIZE (regno) == 4)
{
/* copying 4 bytes from eight bytes?
I don't see how this can be right... */
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y
index f6eb50c..0def55f 100644
--- a/gdb/jv-exp.y
+++ b/gdb/jv-exp.y
@@ -682,16 +682,16 @@ Expression:
static int
parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
+ char *p;
+ int len;
int parsed_float;
YYSTYPE *putithere;
{
- register ULONGEST n = 0;
+ ULONGEST n = 0;
ULONGEST limit, limit_div_base;
- register int c;
- register int base = input_radix;
+ int c;
+ int base = input_radix;
struct type *type;
@@ -872,7 +872,7 @@ yylex ()
tokstart = lexptr;
/* See if it is a special token of length 3. */
for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
- if (STREQN (tokstart, tokentab3[i].operator, 3))
+ if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
{
lexptr += 3;
yylval.opcode = tokentab3[i].opcode;
@@ -881,7 +881,7 @@ yylex ()
/* See if it is a special token of length 2. */
for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
- if (STREQN (tokstart, tokentab2[i].operator, 2))
+ if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
{
lexptr += 2;
yylval.opcode = tokentab2[i].opcode;
@@ -967,7 +967,7 @@ yylex ()
{
/* It's a number. */
int got_dot = 0, got_e = 0, toktype;
- register char *p = tokstart;
+ char *p = tokstart;
int hex = input_radix > 10;
if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
@@ -1167,9 +1167,9 @@ yylex ()
}
break;
case 3:
- if (STREQN (tokstart, "int", 3))
+ if (strncmp (tokstart, "int", 3) == 0)
return INT;
- if (STREQN (tokstart, "new", 3))
+ if (strncmp (tokstart, "new", 3) == 0)
return NEW;
break;
default:
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index 207051e..80a6487 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -1040,6 +1040,15 @@ const struct op_print java_op_print_tab[] =
{NULL, 0, 0, 0}
};
+const struct exp_descriptor exp_descriptor_java =
+{
+ print_subexp_standard,
+ operator_length_standard,
+ op_name_standard,
+ dump_subexp_body_standard,
+ evaluate_subexp_java
+};
+
const struct language_defn java_language_defn =
{
"java", /* Language name */
@@ -1048,9 +1057,9 @@ const struct language_defn java_language_defn =
range_check_off,
type_check_off,
case_sensitive_on,
+ &exp_descriptor_java,
java_parse,
java_error,
- evaluate_subexp_java,
c_printchar, /* Print a character constant */
c_printstr, /* Function to print string constant */
java_emit_char, /* Function to print a single character */
@@ -1070,6 +1079,7 @@ const struct language_defn java_language_defn =
0, /* not c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
diff --git a/gdb/kod.c b/gdb/kod.c
index 8f565bb..6cb3622 100644
--- a/gdb/kod.c
+++ b/gdb/kod.c
@@ -87,11 +87,13 @@ gdb_kod_display (char *arg)
static void
gdb_kod_query (char *arg, char *result, int *maxsiz)
{
- int bufsiz = 0;
+ LONGEST bufsiz = 0;
- /* Check if current target has remote_query capabilities.
- If not, it does not have kod either. */
- if (! current_target.to_query)
+ /* Check if current target has remote_query capabilities. If not,
+ it does not have kod either. */
+ bufsiz = target_read_partial (&current_target, TARGET_OBJECT_KOD,
+ NULL, NULL, 0, 0);
+ if (bufsiz < 0)
{
strcpy (result,
"ERR: Kernel Object Display not supported by current target\n");
@@ -99,7 +101,6 @@ gdb_kod_query (char *arg, char *result, int *maxsiz)
}
/* Just get the maximum buffer size. */
- target_query ((int) 'K', 0, 0, &bufsiz);
/* Check if *we* were called just for getting the buffer size. */
if (*maxsiz == 0)
@@ -119,7 +120,8 @@ gdb_kod_query (char *arg, char *result, int *maxsiz)
error ("kod: query argument too long");
/* Send actual request. */
- if (target_query ((int) 'K', arg, result, &bufsiz))
+ if (target_read_partial (&current_target, TARGET_OBJECT_KOD,
+ arg, result, 0, bufsiz) < 0)
strcpy (result, "ERR: remote query failed");
}
@@ -136,7 +138,7 @@ kod_set_os (char *arg, int from_tty, struct cmd_list_element *command)
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. Unfortunatly, for ``show'' commands cloned from
+ 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?). */
diff --git a/gdb/language.c b/gdb/language.c
index bba7ebe..cc89482 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -205,7 +205,7 @@ set_language_command (char *ignore, int from_tty)
/* Search the list of languages for a match. */
for (i = 0; i < languages_size; i++)
{
- if (STREQ (languages[i]->la_name, language))
+ if (strcmp (languages[i]->la_name, language) == 0)
{
/* Found it! Go into manual mode, and use this language. */
if (languages[i]->la_language == language_auto)
@@ -253,22 +253,22 @@ show_type_command (char *ignore, int from_tty)
static void
set_type_command (char *ignore, int from_tty)
{
- if (STREQ (type, "on"))
+ if (strcmp (type, "on") == 0)
{
type_check = type_check_on;
type_mode = type_mode_manual;
}
- else if (STREQ (type, "warn"))
+ else if (strcmp (type, "warn") == 0)
{
type_check = type_check_warn;
type_mode = type_mode_manual;
}
- else if (STREQ (type, "off"))
+ else if (strcmp (type, "off") == 0)
{
type_check = type_check_off;
type_mode = type_mode_manual;
}
- else if (STREQ (type, "auto"))
+ else if (strcmp (type, "auto") == 0)
{
type_mode = type_mode_auto;
set_type_range_case ();
@@ -299,22 +299,22 @@ show_range_command (char *ignore, int from_tty)
static void
set_range_command (char *ignore, int from_tty)
{
- if (STREQ (range, "on"))
+ if (strcmp (range, "on") == 0)
{
range_check = range_check_on;
range_mode = range_mode_manual;
}
- else if (STREQ (range, "warn"))
+ else if (strcmp (range, "warn") == 0)
{
range_check = range_check_warn;
range_mode = range_mode_manual;
}
- else if (STREQ (range, "off"))
+ else if (strcmp (range, "off") == 0)
{
range_check = range_check_off;
range_mode = range_mode_manual;
}
- else if (STREQ (range, "auto"))
+ else if (strcmp (range, "auto") == 0)
{
range_mode = range_mode_auto;
set_type_range_case ();
@@ -1177,6 +1177,15 @@ language_demangle (const struct language_defn *current_language,
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. */
+
+char *
+default_word_break_characters (void)
+{
+ return " \t\n!@#$%^&*()+=|~`}{[]\"';:?/>.<,-";
+}
/* Define the language that is no language. */
@@ -1268,9 +1277,9 @@ const struct language_defn unknown_language_defn =
range_check_off,
type_check_off,
case_sensitive_on,
+ &exp_descriptor_standard,
unk_lang_parser,
unk_lang_error,
- evaluate_subexp_standard,
unk_lang_printchar, /* Print character constant */
unk_lang_printstr,
unk_lang_emit_char,
@@ -1290,6 +1299,7 @@ const struct language_defn unknown_language_defn =
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
@@ -1302,9 +1312,9 @@ const struct language_defn auto_language_defn =
range_check_off,
type_check_off,
case_sensitive_on,
+ &exp_descriptor_standard,
unk_lang_parser,
unk_lang_error,
- evaluate_subexp_standard,
unk_lang_printchar, /* Print character constant */
unk_lang_printstr,
unk_lang_emit_char,
@@ -1324,6 +1334,7 @@ const struct language_defn auto_language_defn =
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
@@ -1335,9 +1346,9 @@ const struct language_defn local_language_defn =
range_check_off,
type_check_off,
case_sensitive_on,
+ &exp_descriptor_standard,
unk_lang_parser,
unk_lang_error,
- evaluate_subexp_standard,
unk_lang_printchar, /* Print character constant */
unk_lang_printstr,
unk_lang_emit_char,
@@ -1357,6 +1368,7 @@ const struct language_defn local_language_defn =
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
diff --git a/gdb/language.h b/gdb/language.h
index b3c3122..b8c70c2 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -167,6 +167,11 @@ struct language_defn
/* Default case sensitivity */
enum case_sensitivity la_case_sensitivity;
+ /* Definitions related to expression printing, prefixifying, and
+ dumping */
+
+ const struct exp_descriptor *la_exp_desc;
+
/* Parser function. */
int (*la_parser) (void);
@@ -175,10 +180,6 @@ struct language_defn
void (*la_error) (char *);
- /* Evaluate an expression. */
- struct value *(*evaluate_exp) (struct type *, struct expression *,
- int *, enum noside);
-
void (*la_printchar) (int ch, struct ui_file * stream);
void (*la_printstr) (struct ui_file * stream, char *string,
@@ -266,6 +267,9 @@ struct language_defn
/* Type of elements of strings. */
struct type **string_char_type;
+ /* The list of characters forming word boundaries. */
+ char *(*la_word_break_characters) (void);
+
/* Add fields above this point, so the magic number is always last. */
/* Magic number for compat checking */
@@ -501,4 +505,7 @@ extern CORE_ADDR skip_language_trampoline (CORE_ADDR pc);
extern char *language_demangle (const struct language_defn *current_language,
const char *mangled, int options);
+/* Splitting strings into words. */
+extern char *default_word_break_characters (void);
+
#endif /* defined (LANGUAGE_H) */
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index fbf9a09..df91aa7 100644
--- a/gdb/lin-lwp.c
+++ b/gdb/lin-lwp.c
@@ -930,7 +930,7 @@ status_callback (struct lwp_info *lp, void *data)
static int
running_callback (struct lwp_info *lp, void *data)
{
- return (lp->stopped == 0);
+ return (lp->stopped == 0 || (lp->status != 0 && lp->resumed));
}
/* Count the LWP's that have had events. */
@@ -1183,7 +1183,10 @@ stop_and_resume_callback (struct lwp_info *lp, void *data)
/* Resume if the lwp still exists. */
for (ptr = lwp_list; ptr; ptr = ptr->next)
if (lp == ptr)
- resume_callback (lp, NULL);
+ {
+ resume_callback (lp, NULL);
+ resume_set_callback (lp, NULL);
+ }
}
return 0;
}
diff --git a/gdb/linux-proc.c b/gdb/linux-proc.c
index 2f290c4..22dc93d 100644
--- a/gdb/linux-proc.c
+++ b/gdb/linux-proc.c
@@ -235,6 +235,26 @@ linux_corefile_thread_callback (struct lwp_info *ti, void *data)
return 0;
}
+/* Function: linux_do_registers
+ *
+ * Records the register state for the corefile note section.
+ */
+
+static char *
+linux_do_registers (bfd *obfd, ptid_t ptid,
+ char *note_data, int *note_size)
+{
+ registers_changed ();
+ target_fetch_registers (-1); /* FIXME should not be necessary;
+ fill_gregset should do it automatically. */
+ return linux_do_thread_registers (obfd,
+ ptid_build (ptid_get_pid (inferior_ptid),
+ ptid_get_pid (inferior_ptid),
+ 0),
+ note_data, note_size);
+ return note_data;
+}
+
/* Function: linux_make_note_section
*
* Fills the "to_make_corefile_note" target vector.
@@ -277,8 +297,8 @@ linux_make_note_section (bfd *obfd, int *note_size)
{
/* iterate_over_threads didn't come up with any threads;
just use inferior_ptid. */
- note_data = linux_do_thread_registers (obfd, inferior_ptid,
- note_data, note_size);
+ note_data = linux_do_registers (obfd, inferior_ptid,
+ note_data, note_size);
}
else
{
diff --git a/gdb/lynx-nat.c b/gdb/lynx-nat.c
index bbd88b6..b0e2402 100644
--- a/gdb/lynx-nat.c
+++ b/gdb/lynx-nat.c
@@ -293,12 +293,12 @@ fetch_inferior_registers (int regno)
if (errno)
perror_with_name ("ptrace(PTRACE_GETREGS)");
- memset (buf, 0, REGISTER_RAW_SIZE (G0_REGNUM));
+ memset (buf, 0, DEPRECATED_REGISTER_RAW_SIZE (G0_REGNUM));
supply_register (G0_REGNUM, buf);
supply_register (TBR_REGNUM, (char *) &ec.tbr);
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (G1_REGNUM)], &ec.g1,
- 4 * REGISTER_RAW_SIZE (G1_REGNUM));
+ 4 * DEPRECATED_REGISTER_RAW_SIZE (G1_REGNUM));
for (i = G1_REGNUM; i <= G1_REGNUM + 3; i++)
deprecated_register_valid[i] = 1;
@@ -309,7 +309,7 @@ fetch_inferior_registers (int regno)
supply_register (WIM_REGNUM, (char *) &ec.wim);
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (O0_REGNUM)], ec.o,
- 8 * REGISTER_RAW_SIZE (O0_REGNUM));
+ 8 * DEPRECATED_REGISTER_RAW_SIZE (O0_REGNUM));
for (i = O0_REGNUM; i <= O0_REGNUM + 7; i++)
deprecated_register_valid[i] = 1;
}
@@ -323,13 +323,13 @@ fetch_inferior_registers (int regno)
target_read_memory (sp + FRAME_SAVED_I0,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (I0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (I0_REGNUM));
+ 8 * DEPRECATED_REGISTER_RAW_SIZE (I0_REGNUM));
for (i = I0_REGNUM; i <= I7_REGNUM; i++)
deprecated_register_valid[i] = 1;
target_read_memory (sp + FRAME_SAVED_L0,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (L0_REGNUM));
+ 8 * DEPRECATED_REGISTER_RAW_SIZE (L0_REGNUM));
for (i = L0_REGNUM; i <= L0_REGNUM + 7; i++)
deprecated_register_valid[i] = 1;
}
@@ -347,7 +347,7 @@ fetch_inferior_registers (int regno)
perror_with_name ("ptrace(PTRACE_GETFPREGS)");
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)], fc.f.fregs,
- 32 * REGISTER_RAW_SIZE (FP0_REGNUM));
+ 32 * DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM));
for (i = FP0_REGNUM; i <= FP0_REGNUM + 31; i++)
deprecated_register_valid[i] = 1;
@@ -385,7 +385,7 @@ store_inferior_registers (int regno)
ec.tbr = read_register (TBR_REGNUM);
memcpy (&ec.g1, &deprecated_registers[DEPRECATED_REGISTER_BYTE (G1_REGNUM)],
- 4 * REGISTER_RAW_SIZE (G1_REGNUM));
+ 4 * DEPRECATED_REGISTER_RAW_SIZE (G1_REGNUM));
ec.psr = read_register (PS_REGNUM);
ec.y = read_register (Y_REGNUM);
@@ -394,7 +394,7 @@ store_inferior_registers (int regno)
ec.wim = read_register (WIM_REGNUM);
memcpy (ec.o, &deprecated_registers[DEPRECATED_REGISTER_BYTE (O0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (O0_REGNUM));
+ 8 * DEPRECATED_REGISTER_RAW_SIZE (O0_REGNUM));
errno = 0;
retval = ptrace (PTRACE_SETREGS, PIDGET (inferior_ptid),
@@ -416,11 +416,11 @@ store_inferior_registers (int regno)
internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp + FRAME_SAVED_I0,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (I0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (I0_REGNUM));
+ 8 * DEPRECATED_REGISTER_RAW_SIZE (I0_REGNUM));
target_write_memory (sp + FRAME_SAVED_L0,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
- 8 * REGISTER_RAW_SIZE (L0_REGNUM));
+ 8 * DEPRECATED_REGISTER_RAW_SIZE (L0_REGNUM));
}
else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
{
@@ -434,7 +434,7 @@ store_inferior_registers (int regno)
+ FRAME_SAVED_I0;
target_write_memory (sp + regoffset,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno));
+ DEPRECATED_REGISTER_RAW_SIZE (regno));
}
}
@@ -451,7 +451,7 @@ store_inferior_registers (int regno)
perror_with_name ("ptrace(PTRACE_GETFPREGS)");
memcpy (fc.f.fregs, &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- 32 * REGISTER_RAW_SIZE (FP0_REGNUM));
+ 32 * DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM));
fc.fsr = read_register (FPS_REGNUM);
@@ -521,7 +521,7 @@ fetch_inferior_registers (int regno)
ptrace_fun = regno == SP_REGNUM ? PTRACE_PEEKUSP : PTRACE_PEEKTHREAD;
#endif
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
+ for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (int))
{
unsigned int reg;
@@ -570,7 +570,7 @@ store_inferior_registers (int regno)
ptrace_fun = regno == SP_REGNUM ? PTRACE_POKEUSP : PTRACE_POKEUSER;
#endif
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
+ for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (int))
{
unsigned int reg;
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index b8dd178..df4a809 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -617,7 +617,7 @@ variable: NAME
else
{
struct minimal_symbol *msymbol;
- register char *arg = copy_name ($1);
+ char *arg = copy_name ($1);
msymbol =
lookup_minimal_symbol_linkage_or_natural (arg);
@@ -672,12 +672,12 @@ static int
parse_number (olen)
int olen;
{
- register char *p = lexptr;
- register LONGEST n = 0;
- register LONGEST prevn = 0;
- register int c,i,ischar=0;
- register int base = input_radix;
- register int len = olen;
+ char *p = lexptr;
+ LONGEST n = 0;
+ LONGEST prevn = 0;
+ int c,i,ischar=0;
+ int base = input_radix;
+ int len = olen;
int unsigned_p = number_sign == 1 ? 1 : 0;
if(p[len-1] == 'H')
@@ -820,11 +820,11 @@ static struct keyword keytab[] =
static int
yylex ()
{
- register int c;
- register int namelen;
- register int i;
- register char *tokstart;
- register char quote;
+ int c;
+ int namelen;
+ int i;
+ char *tokstart;
+ char quote;
retry:
@@ -936,7 +936,7 @@ yylex ()
{
/* It's a number. */
int got_dot = 0, got_e = 0;
- register char *p = tokstart;
+ char *p = tokstart;
int toktype;
for (++p ;; ++p)
diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c
index a54d188..7fe2e34e 100644
--- a/gdb/m2-lang.c
+++ b/gdb/m2-lang.c
@@ -415,9 +415,9 @@ const struct language_defn m2_language_defn =
range_check_on,
type_check_on,
case_sensitive_on,
+ &exp_descriptor_standard,
m2_parse, /* parser */
m2_error, /* parser error function */
- evaluate_subexp_standard,
m2_printchar, /* Print character constant */
m2_printstr, /* function to print string constant */
m2_emit_char, /* Function to print a single character */
@@ -437,6 +437,7 @@ const struct language_defn m2_language_defn =
0, /* arrays are first-class (not c-style) */
0, /* String lower bound */
&builtin_type_m2_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
diff --git a/gdb/m3-nat.c b/gdb/m3-nat.c
deleted file mode 100644
index 9e3f93b..0000000
--- a/gdb/m3-nat.c
+++ /dev/null
@@ -1,4566 +0,0 @@
-// OBSOLETE /* Interface GDB to Mach 3.0 operating systems.
-// OBSOLETE (Most) Mach 3.0 related routines live in this file.
-// OBSOLETE
-// OBSOLETE Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-// OBSOLETE 2002 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 * Author: Jukka Virtanen <jtv@hut.fi>
-// OBSOLETE * Computing Centre
-// OBSOLETE * Helsinki University of Technology
-// OBSOLETE * Finland
-// OBSOLETE *
-// OBSOLETE * Thanks to my friends who helped with ideas and testing:
-// OBSOLETE *
-// OBSOLETE * Johannes Helander, Antti Louko, Tero Mononen,
-// OBSOLETE * jvh@cs.hut.fi alo@hut.fi tmo@cs.hut.fi
-// OBSOLETE *
-// OBSOLETE * Tero Kivinen and Eamonn McManus
-// OBSOLETE * kivinen@cs.hut.fi emcmanus@gr.osf.org
-// OBSOLETE *
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #include <stdio.h>
-// OBSOLETE
-// OBSOLETE #include <mach.h>
-// OBSOLETE #include <servers/netname.h>
-// OBSOLETE #include <servers/machid.h>
-// OBSOLETE #include <mach/message.h>
-// OBSOLETE #include <mach/notify.h>
-// OBSOLETE #include <mach_error.h>
-// OBSOLETE #include <mach/exception.h>
-// OBSOLETE #include <mach/vm_attributes.h>
-// OBSOLETE
-// OBSOLETE #include "defs.h"
-// OBSOLETE #include "inferior.h"
-// OBSOLETE #include "symtab.h"
-// OBSOLETE #include "value.h"
-// OBSOLETE #include "language.h"
-// OBSOLETE #include "target.h"
-// OBSOLETE #include "gdb_wait.h"
-// OBSOLETE #include "gdbcmd.h"
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE #include <servers/machid_lib.h>
-// OBSOLETE #else
-// OBSOLETE #define MACH_TYPE_TASK 1
-// OBSOLETE #define MACH_TYPE_THREAD 2
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* Included only for signal names and NSIG
-// OBSOLETE
-// OBSOLETE * note: There are many problems in signal handling with
-// OBSOLETE * gdb in Mach 3.0 in general.
-// OBSOLETE */
-// OBSOLETE #include <signal.h>
-// OBSOLETE #define SIG_UNKNOWN 0 /* Exception that has no matching unix signal */
-// OBSOLETE
-// OBSOLETE #include <cthreads.h>
-// OBSOLETE
-// OBSOLETE /* This is what a cproc looks like. This is here partly because
-// OBSOLETE cthread_internals.h is not a header we can just #include, partly with
-// OBSOLETE an eye towards perhaps getting this to work with cross-debugging
-// OBSOLETE someday. Best solution is if CMU publishes a real interface to this
-// OBSOLETE stuff. */
-// OBSOLETE #define CPROC_NEXT_OFFSET 0
-// OBSOLETE #define CPROC_NEXT_SIZE (TARGET_PTR_BIT / HOST_CHAR_BIT)
-// OBSOLETE #define CPROC_INCARNATION_OFFSET (CPROC_NEXT_OFFSET + CPROC_NEXT_SIZE)
-// OBSOLETE #define CPROC_INCARNATION_SIZE (sizeof (cthread_t))
-// OBSOLETE #define CPROC_LIST_OFFSET (CPROC_INCARNATION_OFFSET + CPROC_INCARNATION_SIZE)
-// OBSOLETE #define CPROC_LIST_SIZE (TARGET_PTR_BIT / HOST_CHAR_BIT)
-// OBSOLETE #define CPROC_WAIT_OFFSET (CPROC_LIST_OFFSET + CPROC_LIST_SIZE)
-// OBSOLETE #define CPROC_WAIT_SIZE (TARGET_PTR_BIT / HOST_CHAR_BIT)
-// OBSOLETE #define CPROC_REPLY_OFFSET (CPROC_WAIT_OFFSET + CPROC_WAIT_SIZE)
-// OBSOLETE #define CPROC_REPLY_SIZE (sizeof (mach_port_t))
-// OBSOLETE #define CPROC_CONTEXT_OFFSET (CPROC_REPLY_OFFSET + CPROC_REPLY_SIZE)
-// OBSOLETE #define CPROC_CONTEXT_SIZE (TARGET_INT_BIT / HOST_CHAR_BIT)
-// OBSOLETE #define CPROC_LOCK_OFFSET (CPROC_CONTEXT_OFFSET + CPROC_CONTEXT_SIZE)
-// OBSOLETE #define CPROC_LOCK_SIZE (sizeof (spin_lock_t))
-// OBSOLETE #define CPROC_STATE_OFFSET (CPROC_LOCK_OFFSET + CPROC_LOCK_SIZE)
-// OBSOLETE #define CPROC_STATE_SIZE (TARGET_INT_BIT / HOST_CHAR_BIT)
-// OBSOLETE #define CPROC_WIRED_OFFSET (CPROC_STATE_OFFSET + CPROC_STATE_SIZE)
-// OBSOLETE #define CPROC_WIRED_SIZE (sizeof (mach_port_t))
-// OBSOLETE #define CPROC_BUSY_OFFSET (CPROC_WIRED_OFFSET + CPROC_WIRED_SIZE)
-// OBSOLETE #define CPROC_BUSY_SIZE (TARGET_INT_BIT / HOST_CHAR_BIT)
-// OBSOLETE #define CPROC_MSG_OFFSET (CPROC_BUSY_OFFSET + CPROC_BUSY_SIZE)
-// OBSOLETE #define CPROC_MSG_SIZE (sizeof (mach_msg_header_t))
-// OBSOLETE #define CPROC_BASE_OFFSET (CPROC_MSG_OFFSET + CPROC_MSG_SIZE)
-// OBSOLETE #define CPROC_BASE_SIZE (TARGET_INT_BIT / HOST_CHAR_BIT)
-// OBSOLETE #define CPROC_SIZE_OFFSET (CPROC_BASE_OFFSET + CPROC_BASE_SIZE)
-// OBSOLETE #define CPROC_SIZE_SIZE (TARGET_INT_BIT / HOST_CHAR_BIT)
-// OBSOLETE #define CPROC_SIZE (CPROC_SIZE_OFFSET + CPROC_SIZE_SIZE)
-// OBSOLETE
-// OBSOLETE /* Values for the state field in the cproc. */
-// OBSOLETE #define CPROC_RUNNING 0
-// OBSOLETE #define CPROC_SWITCHING 1
-// OBSOLETE #define CPROC_BLOCKED 2
-// OBSOLETE #define CPROC_CONDWAIT 4
-// OBSOLETE
-// OBSOLETE /* For cproc and kernel thread mapping */
-// OBSOLETE typedef struct gdb_thread
-// OBSOLETE {
-// OBSOLETE mach_port_t name;
-// OBSOLETE CORE_ADDR sp;
-// OBSOLETE CORE_ADDR pc;
-// OBSOLETE CORE_ADDR fp;
-// OBSOLETE boolean_t in_emulator;
-// OBSOLETE int slotid;
-// OBSOLETE
-// OBSOLETE /* This is for the mthreads list. It points to the cproc list.
-// OBSOLETE Perhaps the two lists should be merged (or perhaps it was a mistake
-// OBSOLETE to make them both use a struct gdb_thread). */
-// OBSOLETE struct gdb_thread *cproc;
-// OBSOLETE
-// OBSOLETE /* These are for the cproc list, which is linked through the next field
-// OBSOLETE of the struct gdb_thread. */
-// OBSOLETE char raw_cproc[CPROC_SIZE];
-// OBSOLETE /* The cthread which is pointed to by the incarnation field from the
-// OBSOLETE cproc. This points to the copy we've read into GDB. */
-// OBSOLETE cthread_t cthread;
-// OBSOLETE /* Point back to the mthreads list. */
-// OBSOLETE int reverse_map;
-// OBSOLETE struct gdb_thread *next;
-// OBSOLETE }
-// OBSOLETE *gdb_thread_t;
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Actions for Mach exceptions.
-// OBSOLETE *
-// OBSOLETE * sigmap field maps the exception to corresponding Unix signal.
-// OBSOLETE *
-// OBSOLETE * I do not know how to map the exception to unix signal
-// OBSOLETE * if SIG_UNKNOWN is specified.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE struct exception_list
-// OBSOLETE {
-// OBSOLETE char *name;
-// OBSOLETE boolean_t forward;
-// OBSOLETE boolean_t print;
-// OBSOLETE int sigmap;
-// OBSOLETE }
-// OBSOLETE exception_map[] =
-// OBSOLETE {
-// OBSOLETE {
-// OBSOLETE "not_mach3_exception", FALSE, TRUE, SIG_UNKNOWN
-// OBSOLETE }
-// OBSOLETE ,
-// OBSOLETE {
-// OBSOLETE "EXC_BAD_ACCESS", FALSE, TRUE, SIGSEGV
-// OBSOLETE }
-// OBSOLETE ,
-// OBSOLETE {
-// OBSOLETE "EXC_BAD_INSTRUCTION", FALSE, TRUE, SIGILL
-// OBSOLETE }
-// OBSOLETE ,
-// OBSOLETE {
-// OBSOLETE "EXC_ARITHMETIC", FALSE, TRUE, SIGFPE
-// OBSOLETE }
-// OBSOLETE ,
-// OBSOLETE {
-// OBSOLETE "EXC_EMULATION", FALSE, TRUE, SIGEMT
-// OBSOLETE }
-// OBSOLETE , /* ??? */
-// OBSOLETE {
-// OBSOLETE "EXC_SOFTWARE", FALSE, TRUE, SIG_UNKNOWN
-// OBSOLETE }
-// OBSOLETE ,
-// OBSOLETE {
-// OBSOLETE "EXC_BREAKPOINT", FALSE, FALSE, SIGTRAP
-// OBSOLETE }
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /* Mach exception table size */
-// OBSOLETE int max_exception = sizeof (exception_map) / sizeof (struct exception_list) - 1;
-// OBSOLETE
-// OBSOLETE #define MAX_EXCEPTION max_exception
-// OBSOLETE
-// OBSOLETE WAITTYPE wait_status;
-// OBSOLETE
-// OBSOLETE /* If you define this, intercepted bsd server calls will be
-// OBSOLETE * dumped while waiting the inferior to EXEC the correct
-// OBSOLETE * program
-// OBSOLETE */
-// OBSOLETE /* #define DUMP_SYSCALL /* debugging interceptor */
-// OBSOLETE
-// OBSOLETE /* xx_debug() outputs messages if this is nonzero.
-// OBSOLETE * If > 1, DUMP_SYSCALL will dump message contents.
-// OBSOLETE */
-// OBSOLETE int debug_level = 0;
-// OBSOLETE
-// OBSOLETE /* "Temporary" debug stuff */
-// OBSOLETE void
-// OBSOLETE xx_debug (char *fmt, int a, int b, int c)
-// OBSOLETE {
-// OBSOLETE if (debug_level)
-// OBSOLETE warning (fmt, a, b, c);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* This is in libmach.a */
-// OBSOLETE extern mach_port_t name_server_port;
-// OBSOLETE
-// OBSOLETE /* Set in catch_exception_raise */
-// OBSOLETE int stop_exception, stop_code, stop_subcode;
-// OBSOLETE int stopped_in_exception;
-// OBSOLETE
-// OBSOLETE /* Thread that was the active thread when we stopped */
-// OBSOLETE thread_t stop_thread = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE char *hostname = "";
-// OBSOLETE
-// OBSOLETE /* Set when task is attached or created */
-// OBSOLETE boolean_t emulator_present = FALSE;
-// OBSOLETE
-// OBSOLETE task_t inferior_task;
-// OBSOLETE thread_t current_thread;
-// OBSOLETE
-// OBSOLETE /* Exception ports for inferior task */
-// OBSOLETE mach_port_t inferior_exception_port = MACH_PORT_NULL;
-// OBSOLETE mach_port_t inferior_old_exception_port = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE /* task exceptions and notifications */
-// OBSOLETE mach_port_t inferior_wait_port_set = MACH_PORT_NULL;
-// OBSOLETE mach_port_t our_notify_port = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE /* This is "inferior_wait_port_set" when not single stepping, and
-// OBSOLETE * "singlestepped_thread_port" when we are single stepping.
-// OBSOLETE *
-// OBSOLETE * This is protected by a cleanup function: discard_single_step()
-// OBSOLETE */
-// OBSOLETE mach_port_t currently_waiting_for = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE /* A port for external messages to gdb.
-// OBSOLETE * External in the meaning that they do not come
-// OBSOLETE * from the inferior_task, but rather from external
-// OBSOLETE * tasks.
-// OBSOLETE *
-// OBSOLETE * As a debugging feature:
-// OBSOLETE * A debugger debugging another debugger can stop the
-// OBSOLETE * inferior debugger by the following command sequence
-// OBSOLETE * (without running external programs)
-// OBSOLETE *
-// OBSOLETE * (top-gdb) set stop_inferior_gdb ()
-// OBSOLETE * (top-gdb) continue
-// OBSOLETE */
-// OBSOLETE mach_port_t our_message_port = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE /* For single stepping */
-// OBSOLETE mach_port_t thread_exception_port = MACH_PORT_NULL;
-// OBSOLETE mach_port_t thread_saved_exception_port = MACH_PORT_NULL;
-// OBSOLETE mach_port_t singlestepped_thread_port = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE /* For machid calls */
-// OBSOLETE mach_port_t mid_server = MACH_PORT_NULL;
-// OBSOLETE mach_port_t mid_auth = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE /* If gdb thinks the inferior task is not suspended, it
-// OBSOLETE * must take suspend/abort the threads when it reads the state.
-// OBSOLETE */
-// OBSOLETE int must_suspend_thread = 0;
-// OBSOLETE
-// OBSOLETE /* When single stepping, we switch the port that mach_really_wait() listens to.
-// OBSOLETE * This cleanup is a guard to prevent the port set from being left to
-// OBSOLETE * the singlestepped_thread_port when error() is called.
-// OBSOLETE * This is nonzero only when we are single stepping.
-// OBSOLETE */
-// OBSOLETE #define NULL_CLEANUP (struct cleanup *)0
-// OBSOLETE struct cleanup *cleanup_step = NULL_CLEANUP;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE static struct target_ops m3_ops;
-// OBSOLETE
-// OBSOLETE static void m3_kill_inferior ();
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE #define MACH_TYPE_EXCEPTION_PORT -1
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* Chain of ports to remember requested notifications. */
-// OBSOLETE
-// OBSOLETE struct port_chain
-// OBSOLETE {
-// OBSOLETE struct port_chain *next;
-// OBSOLETE mach_port_t port;
-// OBSOLETE int type;
-// OBSOLETE int mid; /* Now only valid with MACH_TYPE_THREAD and */
-// OBSOLETE /* MACH_TYPE_THREAD */
-// OBSOLETE };
-// OBSOLETE typedef struct port_chain *port_chain_t;
-// OBSOLETE
-// OBSOLETE /* Room for chain nodes comes from pchain_obstack */
-// OBSOLETE struct obstack pchain_obstack;
-// OBSOLETE struct obstack *port_chain_obstack = &pchain_obstack;
-// OBSOLETE
-// OBSOLETE /* For thread handling */
-// OBSOLETE struct obstack Cproc_obstack;
-// OBSOLETE struct obstack *cproc_obstack = &Cproc_obstack;
-// OBSOLETE
-// OBSOLETE /* the list of notified ports */
-// OBSOLETE port_chain_t notify_chain = (port_chain_t) NULL;
-// OBSOLETE
-// OBSOLETE port_chain_t
-// OBSOLETE port_chain_insert (port_chain_t list, mach_port_t name, int type)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE port_chain_t new;
-// OBSOLETE int mid;
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (name))
-// OBSOLETE return list;
-// OBSOLETE
-// OBSOLETE if (type == MACH_TYPE_TASK || type == MACH_TYPE_THREAD)
-// OBSOLETE {
-// OBSOLETE if (!MACH_PORT_VALID (mid_server))
-// OBSOLETE {
-// OBSOLETE warning ("Machid server port invalid, can not map port 0x%x to MID",
-// OBSOLETE name);
-// OBSOLETE mid = name;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE ret = machid_mach_register (mid_server, mid_auth, name, type, &mid);
-// OBSOLETE
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE warning ("Can not map name (0x%x) to MID with machid", name);
-// OBSOLETE mid = name;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// OBSOLETE
-// OBSOLETE new = (port_chain_t) obstack_alloc (port_chain_obstack,
-// OBSOLETE sizeof (struct port_chain));
-// OBSOLETE new->next = list;
-// OBSOLETE new->port = name;
-// OBSOLETE new->type = type;
-// OBSOLETE new->mid = mid;
-// OBSOLETE
-// OBSOLETE return new;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE port_chain_t
-// OBSOLETE port_chain_delete (port_chain_t list, mach_port_t elem)
-// OBSOLETE {
-// OBSOLETE if (list)
-// OBSOLETE if (list->port == elem)
-// OBSOLETE list = list->next;
-// OBSOLETE else
-// OBSOLETE while (list->next)
-// OBSOLETE {
-// OBSOLETE if (list->next->port == elem)
-// OBSOLETE list->next = list->next->next; /* GCd with obstack_free() */
-// OBSOLETE else
-// OBSOLETE list = list->next;
-// OBSOLETE }
-// OBSOLETE return list;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE port_chain_destroy (struct obstack *ostack)
-// OBSOLETE {
-// OBSOLETE obstack_free (ostack, 0);
-// OBSOLETE obstack_init (ostack);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE port_chain_t
-// OBSOLETE port_chain_member (port_chain_t list, mach_port_t elem)
-// OBSOLETE {
-// OBSOLETE while (list)
-// OBSOLETE {
-// OBSOLETE if (list->port == elem)
-// OBSOLETE return list;
-// OBSOLETE list = list->next;
-// OBSOLETE }
-// OBSOLETE return (port_chain_t) NULL;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE map_port_name_to_mid (mach_port_t name, int type)
-// OBSOLETE {
-// OBSOLETE port_chain_t elem;
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (name))
-// OBSOLETE return -1;
-// OBSOLETE
-// OBSOLETE elem = port_chain_member (notify_chain, name);
-// OBSOLETE
-// OBSOLETE if (elem && (elem->type == type))
-// OBSOLETE return elem->mid;
-// OBSOLETE
-// OBSOLETE if (elem)
-// OBSOLETE return -1;
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (mid_server))
-// OBSOLETE {
-// OBSOLETE warning ("Machid server port invalid, can not map port 0x%x to mid",
-// OBSOLETE name);
-// OBSOLETE return -1;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE int mid;
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE ret = machid_mach_register (mid_server, mid_auth, name, type, &mid);
-// OBSOLETE
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE warning ("Can not map name (0x%x) to mid with machid", name);
-// OBSOLETE return -1;
-// OBSOLETE }
-// OBSOLETE return mid;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Guard for currently_waiting_for and singlestepped_thread_port */
-// OBSOLETE static void
-// OBSOLETE discard_single_step (thread_t thread)
-// OBSOLETE {
-// OBSOLETE currently_waiting_for = inferior_wait_port_set;
-// OBSOLETE
-// OBSOLETE cleanup_step = NULL_CLEANUP;
-// OBSOLETE if (MACH_PORT_VALID (thread) && MACH_PORT_VALID (singlestepped_thread_port))
-// OBSOLETE setup_single_step (thread, FALSE);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE setup_single_step (thread_t thread, boolean_t start_step)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (thread))
-// OBSOLETE error ("Invalid thread supplied to setup_single_step");
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE mach_port_t teport;
-// OBSOLETE
-// OBSOLETE /* Get the current thread exception port */
-// OBSOLETE ret = thread_get_exception_port (thread, &teport);
-// OBSOLETE CHK ("Getting thread's exception port", ret);
-// OBSOLETE
-// OBSOLETE if (start_step)
-// OBSOLETE {
-// OBSOLETE if (MACH_PORT_VALID (singlestepped_thread_port))
-// OBSOLETE {
-// OBSOLETE warning ("Singlestepped_thread_port (0x%x) is still valid?",
-// OBSOLETE singlestepped_thread_port);
-// OBSOLETE singlestepped_thread_port = MACH_PORT_NULL;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* If we are already stepping this thread */
-// OBSOLETE if (MACH_PORT_VALID (teport) && teport == thread_exception_port)
-// OBSOLETE {
-// OBSOLETE ret = mach_port_deallocate (mach_task_self (), teport);
-// OBSOLETE CHK ("Could not deallocate thread exception port", ret);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE ret = thread_set_exception_port (thread, thread_exception_port);
-// OBSOLETE CHK ("Setting exception port for thread", ret);
-// OBSOLETE #if 0
-// OBSOLETE /* Insert thread exception port to wait port set */
-// OBSOLETE ret = mach_port_move_member (mach_task_self (),
-// OBSOLETE thread_exception_port,
-// OBSOLETE inferior_wait_port_set);
-// OBSOLETE CHK ("Moving thread exception port to inferior_wait_port_set",
-// OBSOLETE ret);
-// OBSOLETE #endif
-// OBSOLETE thread_saved_exception_port = teport;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE thread_trace (thread, TRUE);
-// OBSOLETE
-// OBSOLETE singlestepped_thread_port = thread_exception_port;
-// OBSOLETE currently_waiting_for = singlestepped_thread_port;
-// OBSOLETE cleanup_step = make_cleanup (discard_single_step, thread);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (!MACH_PORT_VALID (teport))
-// OBSOLETE error ("Single stepped thread had an invalid exception port?");
-// OBSOLETE
-// OBSOLETE if (teport != thread_exception_port)
-// OBSOLETE error ("Single stepped thread had an unknown exception port?");
-// OBSOLETE
-// OBSOLETE ret = mach_port_deallocate (mach_task_self (), teport);
-// OBSOLETE CHK ("Couldn't deallocate thread exception port", ret);
-// OBSOLETE #if 0
-// OBSOLETE /* Remove thread exception port from wait port set */
-// OBSOLETE ret = mach_port_move_member (mach_task_self (),
-// OBSOLETE thread_exception_port,
-// OBSOLETE MACH_PORT_NULL);
-// OBSOLETE CHK ("Removing thread exception port from inferior_wait_port_set",
-// OBSOLETE ret);
-// OBSOLETE #endif
-// OBSOLETE /* Restore thread's old exception port */
-// OBSOLETE ret = thread_set_exception_port (thread,
-// OBSOLETE thread_saved_exception_port);
-// OBSOLETE CHK ("Restoring stepped thread's exception port", ret);
-// OBSOLETE
-// OBSOLETE if (MACH_PORT_VALID (thread_saved_exception_port))
-// OBSOLETE (void) mach_port_deallocate (mach_task_self (),
-// OBSOLETE thread_saved_exception_port);
-// OBSOLETE
-// OBSOLETE thread_trace (thread, FALSE);
-// OBSOLETE
-// OBSOLETE singlestepped_thread_port = MACH_PORT_NULL;
-// OBSOLETE currently_waiting_for = inferior_wait_port_set;
-// OBSOLETE if (cleanup_step)
-// OBSOLETE discard_cleanups (cleanup_step);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static
-// OBSOLETE request_notify (mach_port_t name, mach_msg_id_t variant, int type)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE mach_port_t previous_port_dummy = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (name))
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE if (port_chain_member (notify_chain, name))
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE ret = mach_port_request_notification (mach_task_self (),
-// OBSOLETE name,
-// OBSOLETE variant,
-// OBSOLETE 1,
-// OBSOLETE our_notify_port,
-// OBSOLETE MACH_MSG_TYPE_MAKE_SEND_ONCE,
-// OBSOLETE &previous_port_dummy);
-// OBSOLETE CHK ("Serious: request_notify failed", ret);
-// OBSOLETE
-// OBSOLETE (void) mach_port_deallocate (mach_task_self (),
-// OBSOLETE previous_port_dummy);
-// OBSOLETE
-// OBSOLETE notify_chain = port_chain_insert (notify_chain, name, type);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE reverse_msg_bits (mach_msg_header_t *msgp, int type)
-// OBSOLETE {
-// OBSOLETE int rbits, lbits;
-// OBSOLETE rbits = MACH_MSGH_BITS_REMOTE (msgp->msgh_bits);
-// OBSOLETE lbits = type;
-// OBSOLETE msgp->msgh_bits =
-// OBSOLETE (msgp->msgh_bits & ~MACH_MSGH_BITS_PORTS_MASK) |
-// OBSOLETE MACH_MSGH_BITS (lbits, rbits);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* On the third day He said:
-// OBSOLETE
-// OBSOLETE Let this be global
-// OBSOLETE and then it was global.
-// OBSOLETE
-// OBSOLETE When creating the inferior fork, the
-// OBSOLETE child code in inflow.c sets the name of the
-// OBSOLETE bootstrap_port in its address space to this
-// OBSOLETE variable.
-// OBSOLETE
-// OBSOLETE The name is transferred to our address space
-// OBSOLETE with mach3_read_inferior().
-// OBSOLETE
-// OBSOLETE Thou shalt not do this with
-// OBSOLETE task_get_bootstrap_port() in this task, since
-// OBSOLETE the name in the inferior task is different than
-// OBSOLETE the one we get.
-// OBSOLETE
-// OBSOLETE For blessed are the meek, as they shall inherit
-// OBSOLETE the address space.
-// OBSOLETE */
-// OBSOLETE mach_port_t original_server_port_name = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Called from inferior after FORK but before EXEC */
-// OBSOLETE static void
-// OBSOLETE m3_trace_me (void)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE /* Get the NAME of the bootstrap port in this task
-// OBSOLETE so that GDB can read it */
-// OBSOLETE ret = task_get_bootstrap_port (mach_task_self (),
-// OBSOLETE &original_server_port_name);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// OBSOLETE ret = mach_port_deallocate (mach_task_self (),
-// OBSOLETE original_server_port_name);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// OBSOLETE
-// OBSOLETE /* Suspend this task to let the parent change my ports.
-// OBSOLETE Resumed by the debugger */
-// OBSOLETE ret = task_suspend (mach_task_self ());
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Intercept system calls to Unix server.
-// OBSOLETE * After EXEC_COUNTER calls to exec(), return.
-// OBSOLETE *
-// OBSOLETE * Pre-assertion: Child is suspended. (Not verified)
-// OBSOLETE * Post-condition: Child is suspended after EXEC_COUNTER exec() calls.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE intercept_exec_calls (int exec_counter)
-// OBSOLETE {
-// OBSOLETE int terminal_initted = 0;
-// OBSOLETE
-// OBSOLETE struct syscall_msg_t
-// OBSOLETE {
-// OBSOLETE mach_msg_header_t header;
-// OBSOLETE mach_msg_type_t type;
-// OBSOLETE char room[2000]; /* Enuff space */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE struct syscall_msg_t syscall_in, syscall_out;
-// OBSOLETE
-// OBSOLETE mach_port_t fake_server;
-// OBSOLETE mach_port_t original_server_send;
-// OBSOLETE mach_port_t original_exec_reply;
-// OBSOLETE mach_port_t exec_reply;
-// OBSOLETE mach_port_t exec_reply_send;
-// OBSOLETE mach_msg_type_name_t acquired;
-// OBSOLETE mach_port_t emulator_server_port_name;
-// OBSOLETE struct task_basic_info info;
-// OBSOLETE mach_msg_type_number_t info_count;
-// OBSOLETE
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE if (exec_counter <= 0)
-// OBSOLETE return; /* We are already set up in the correct program */
-// OBSOLETE
-// OBSOLETE ret = mach_port_allocate (mach_task_self (),
-// OBSOLETE MACH_PORT_RIGHT_RECEIVE,
-// OBSOLETE &fake_server);
-// OBSOLETE CHK ("create inferior_fake_server port failed", ret);
-// OBSOLETE
-// OBSOLETE /* Wait for inferior_task to suspend itself */
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE info_count = sizeof (info);
-// OBSOLETE ret = task_info (inferior_task,
-// OBSOLETE TASK_BASIC_INFO,
-// OBSOLETE (task_info_t) & info,
-// OBSOLETE &info_count);
-// OBSOLETE CHK ("Task info", ret);
-// OBSOLETE
-// OBSOLETE if (info.suspend_count)
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE /* Note that the definition of the parameter was undefined
-// OBSOLETE * at the time of this writing, so I just use an `ad hoc' value.
-// OBSOLETE */
-// OBSOLETE (void) swtch_pri (42); /* Universal Priority Value */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Read the inferior's bootstrap port name */
-// OBSOLETE if (!mach3_read_inferior (&original_server_port_name,
-// OBSOLETE &original_server_port_name,
-// OBSOLETE sizeof (original_server_port_name)))
-// OBSOLETE error ("Can't read inferior task bootstrap port name");
-// OBSOLETE
-// OBSOLETE /* @@ BUG: If more than 1 send right GDB will FAIL!!! */
-// OBSOLETE /* Should get refs, and set them back when restoring */
-// OBSOLETE /* Steal the original bsd server send right from inferior */
-// OBSOLETE ret = mach_port_extract_right (inferior_task,
-// OBSOLETE original_server_port_name,
-// OBSOLETE MACH_MSG_TYPE_MOVE_SEND,
-// OBSOLETE &original_server_send,
-// OBSOLETE &acquired);
-// OBSOLETE CHK ("mach_port_extract_right (bsd server send)", ret);
-// OBSOLETE
-// OBSOLETE if (acquired != MACH_MSG_TYPE_PORT_SEND)
-// OBSOLETE error ("Incorrect right extracted, send right to bsd server expected");
-// OBSOLETE
-// OBSOLETE ret = mach_port_insert_right (inferior_task,
-// OBSOLETE original_server_port_name,
-// OBSOLETE fake_server,
-// OBSOLETE MACH_MSG_TYPE_MAKE_SEND);
-// OBSOLETE CHK ("mach_port_insert_right (fake server send)", ret);
-// OBSOLETE
-// OBSOLETE xx_debug ("inferior task bsd server ports set up \nfs %x, ospn %x, oss %x\n",
-// OBSOLETE fake_server,
-// OBSOLETE original_server_port_name, original_server_send);
-// OBSOLETE
-// OBSOLETE /* A receive right to the reply generated by unix server exec() request */
-// OBSOLETE ret = mach_port_allocate (mach_task_self (),
-// OBSOLETE MACH_PORT_RIGHT_RECEIVE,
-// OBSOLETE &exec_reply);
-// OBSOLETE CHK ("create intercepted_reply_port port failed", ret);
-// OBSOLETE
-// OBSOLETE /* Pass this send right to Unix server so it replies to us after exec() */
-// OBSOLETE ret = mach_port_extract_right (mach_task_self (),
-// OBSOLETE exec_reply,
-// OBSOLETE MACH_MSG_TYPE_MAKE_SEND_ONCE,
-// OBSOLETE &exec_reply_send,
-// OBSOLETE &acquired);
-// OBSOLETE CHK ("mach_port_extract_right (exec_reply)", ret);
-// OBSOLETE
-// OBSOLETE if (acquired != MACH_MSG_TYPE_PORT_SEND_ONCE)
-// OBSOLETE error ("Incorrect right extracted, send once expected for exec reply");
-// OBSOLETE
-// OBSOLETE ret = mach_port_move_member (mach_task_self (),
-// OBSOLETE fake_server,
-// OBSOLETE inferior_wait_port_set);
-// OBSOLETE CHK ("Moving fake syscall port to inferior_wait_port_set", ret);
-// OBSOLETE
-// OBSOLETE xx_debug ("syscall fake server set up, resuming inferior\n");
-// OBSOLETE
-// OBSOLETE ret = task_resume (inferior_task);
-// OBSOLETE CHK ("task_resume (startup)", ret);
-// OBSOLETE
-// OBSOLETE /* Read requests from the inferior.
-// OBSOLETE Pass directly through everything else except exec() calls.
-// OBSOLETE */
-// OBSOLETE while (exec_counter > 0)
-// OBSOLETE {
-// OBSOLETE ret = mach_msg (&syscall_in.header, /* header */
-// OBSOLETE MACH_RCV_MSG, /* options */
-// OBSOLETE 0, /* send size */
-// OBSOLETE sizeof (struct syscall_msg_t), /* receive size */
-// OBSOLETE inferior_wait_port_set, /* receive_name */
-// OBSOLETE MACH_MSG_TIMEOUT_NONE,
-// OBSOLETE MACH_PORT_NULL);
-// OBSOLETE CHK ("mach_msg (intercepted sycall)", ret);
-// OBSOLETE
-// OBSOLETE #ifdef DUMP_SYSCALL
-// OBSOLETE print_msg (&syscall_in.header);
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* ASSERT : msgh_local_port == fake_server */
-// OBSOLETE
-// OBSOLETE if (notify_server (&syscall_in.header, &syscall_out.header))
-// OBSOLETE error ("received a notify while intercepting syscalls");
-// OBSOLETE
-// OBSOLETE if (syscall_in.header.msgh_id == MIG_EXEC_SYSCALL_ID)
-// OBSOLETE {
-// OBSOLETE xx_debug ("Received EXEC SYSCALL, counter = %d\n", exec_counter);
-// OBSOLETE if (exec_counter == 1)
-// OBSOLETE {
-// OBSOLETE original_exec_reply = syscall_in.header.msgh_remote_port;
-// OBSOLETE syscall_in.header.msgh_remote_port = exec_reply_send;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (!terminal_initted)
-// OBSOLETE {
-// OBSOLETE /* Now that the child has exec'd we know it has already set its
-// OBSOLETE process group. On POSIX systems, tcsetpgrp will fail with
-// OBSOLETE EPERM if we try it before the child's setpgid. */
-// OBSOLETE
-// OBSOLETE /* Set up the "saved terminal modes" of the inferior
-// OBSOLETE based on what modes we are starting it with. */
-// OBSOLETE target_terminal_init ();
-// OBSOLETE
-// OBSOLETE /* Install inferior's terminal modes. */
-// OBSOLETE target_terminal_inferior ();
-// OBSOLETE
-// OBSOLETE terminal_initted = 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE exec_counter--;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE syscall_in.header.msgh_local_port = syscall_in.header.msgh_remote_port;
-// OBSOLETE syscall_in.header.msgh_remote_port = original_server_send;
-// OBSOLETE
-// OBSOLETE reverse_msg_bits (&syscall_in.header, MACH_MSG_TYPE_COPY_SEND);
-// OBSOLETE
-// OBSOLETE ret = mach_msg_send (&syscall_in.header);
-// OBSOLETE CHK ("Forwarded syscall", ret);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE ret = mach_port_move_member (mach_task_self (),
-// OBSOLETE fake_server,
-// OBSOLETE MACH_PORT_NULL);
-// OBSOLETE CHK ("Moving fake syscall out of inferior_wait_port_set", ret);
-// OBSOLETE
-// OBSOLETE ret = mach_port_move_member (mach_task_self (),
-// OBSOLETE exec_reply,
-// OBSOLETE inferior_wait_port_set);
-// OBSOLETE CHK ("Moving exec_reply to inferior_wait_port_set", ret);
-// OBSOLETE
-// OBSOLETE ret = mach_msg (&syscall_in.header, /* header */
-// OBSOLETE MACH_RCV_MSG, /* options */
-// OBSOLETE 0, /* send size */
-// OBSOLETE sizeof (struct syscall_msg_t), /* receive size */
-// OBSOLETE inferior_wait_port_set, /* receive_name */
-// OBSOLETE MACH_MSG_TIMEOUT_NONE,
-// OBSOLETE MACH_PORT_NULL);
-// OBSOLETE CHK ("mach_msg (exec reply)", ret);
-// OBSOLETE
-// OBSOLETE ret = task_suspend (inferior_task);
-// OBSOLETE CHK ("Suspending inferior after last exec", ret);
-// OBSOLETE
-// OBSOLETE must_suspend_thread = 0;
-// OBSOLETE
-// OBSOLETE xx_debug ("Received exec reply from bsd server, suspended inferior task\n");
-// OBSOLETE
-// OBSOLETE #ifdef DUMP_SYSCALL
-// OBSOLETE print_msg (&syscall_in.header);
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* Message should appear as if it came from the unix server */
-// OBSOLETE syscall_in.header.msgh_local_port = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE /* and go to the inferior task original reply port */
-// OBSOLETE syscall_in.header.msgh_remote_port = original_exec_reply;
-// OBSOLETE
-// OBSOLETE reverse_msg_bits (&syscall_in.header, MACH_MSG_TYPE_MOVE_SEND_ONCE);
-// OBSOLETE
-// OBSOLETE ret = mach_msg_send (&syscall_in.header);
-// OBSOLETE CHK ("Forwarding exec reply to inferior", ret);
-// OBSOLETE
-// OBSOLETE /* Garbage collect */
-// OBSOLETE ret = mach_port_deallocate (inferior_task,
-// OBSOLETE original_server_port_name);
-// OBSOLETE CHK ("deallocating fake server send right", ret);
-// OBSOLETE
-// OBSOLETE ret = mach_port_insert_right (inferior_task,
-// OBSOLETE original_server_port_name,
-// OBSOLETE original_server_send,
-// OBSOLETE MACH_MSG_TYPE_MOVE_SEND);
-// OBSOLETE CHK ("Restoring the original bsd server send right", ret);
-// OBSOLETE
-// OBSOLETE ret = mach_port_destroy (mach_task_self (),
-// OBSOLETE fake_server);
-// OBSOLETE fake_server = MACH_PORT_DEAD;
-// OBSOLETE CHK ("mach_port_destroy (fake_server)", ret);
-// OBSOLETE
-// OBSOLETE ret = mach_port_destroy (mach_task_self (),
-// OBSOLETE exec_reply);
-// OBSOLETE exec_reply = MACH_PORT_DEAD;
-// OBSOLETE CHK ("mach_port_destroy (exec_reply)", ret);
-// OBSOLETE
-// OBSOLETE xx_debug ("Done with exec call interception\n");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE consume_send_rights (thread_array_t thread_list, int thread_count)
-// OBSOLETE {
-// OBSOLETE int index;
-// OBSOLETE
-// OBSOLETE if (!thread_count)
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE for (index = 0; index < thread_count; index++)
-// OBSOLETE {
-// OBSOLETE /* Since thread kill command kills threads, don't check ret */
-// OBSOLETE (void) mach_port_deallocate (mach_task_self (),
-// OBSOLETE thread_list[index]);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* suspend/abort/resume a thread. */
-// OBSOLETE setup_thread (mach_port_t thread, int what)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE if (what)
-// OBSOLETE {
-// OBSOLETE ret = thread_suspend (thread);
-// OBSOLETE CHK ("setup_thread thread_suspend", ret);
-// OBSOLETE
-// OBSOLETE ret = thread_abort (thread);
-// OBSOLETE CHK ("setup_thread thread_abort", ret);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE ret = thread_resume (thread);
-// OBSOLETE CHK ("setup_thread thread_resume", ret);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE map_slot_to_mid (int slot, thread_array_t threads, int thread_count)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE int deallocate = 0;
-// OBSOLETE int index;
-// OBSOLETE int mid;
-// OBSOLETE
-// OBSOLETE if (!threads)
-// OBSOLETE {
-// OBSOLETE deallocate++;
-// OBSOLETE ret = task_threads (inferior_task, &threads, &thread_count);
-// OBSOLETE CHK ("Can not select a thread from a dead task", ret);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (slot < 0 || slot >= thread_count)
-// OBSOLETE {
-// OBSOLETE if (deallocate)
-// OBSOLETE {
-// OBSOLETE consume_send_rights (threads, thread_count);
-// OBSOLETE (void) vm_deallocate (mach_task_self (), (vm_address_t) threads,
-// OBSOLETE (thread_count * sizeof (mach_port_t)));
-// OBSOLETE }
-// OBSOLETE if (slot < 0)
-// OBSOLETE error ("invalid slot number");
-// OBSOLETE else
-// OBSOLETE return -(slot + 1);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE mid = map_port_name_to_mid (threads[slot], MACH_TYPE_THREAD);
-// OBSOLETE
-// OBSOLETE if (deallocate)
-// OBSOLETE {
-// OBSOLETE consume_send_rights (threads, thread_count);
-// OBSOLETE (void) vm_deallocate (mach_task_self (), (vm_address_t) threads,
-// OBSOLETE (thread_count * sizeof (mach_port_t)));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return mid;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE parse_thread_id (char *arg, int thread_count, int slots)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE int mid;
-// OBSOLETE int slot;
-// OBSOLETE int index;
-// OBSOLETE
-// OBSOLETE if (arg == 0)
-// OBSOLETE return 0;
-// OBSOLETE
-// OBSOLETE while (*arg && (*arg == ' ' || *arg == '\t'))
-// OBSOLETE arg++;
-// OBSOLETE
-// OBSOLETE if (!*arg)
-// OBSOLETE return 0;
-// OBSOLETE
-// OBSOLETE /* Currently parse MID and @SLOTNUMBER */
-// OBSOLETE if (*arg != '@')
-// OBSOLETE {
-// OBSOLETE mid = atoi (arg);
-// OBSOLETE if (mid <= 0)
-// OBSOLETE error ("valid thread mid expected");
-// OBSOLETE return mid;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE arg++;
-// OBSOLETE slot = atoi (arg);
-// OBSOLETE
-// OBSOLETE if (slot < 0)
-// OBSOLETE error ("invalid slot number");
-// OBSOLETE
-// OBSOLETE /* If you want slot numbers to remain slot numbers, set slots.
-// OBSOLETE
-// OBSOLETE * Well, since 0 is reserved, return the ordinal number
-// OBSOLETE * of the thread rather than the slot number. Awk, this
-// OBSOLETE * counts as a kludge.
-// OBSOLETE */
-// OBSOLETE if (slots)
-// OBSOLETE return -(slot + 1);
-// OBSOLETE
-// OBSOLETE if (thread_count && slot >= thread_count)
-// OBSOLETE return -(slot + 1);
-// OBSOLETE
-// OBSOLETE mid = map_slot_to_mid (slot);
-// OBSOLETE
-// OBSOLETE return mid;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* THREAD_ID 0 is special; it selects the first kernel
-// OBSOLETE * thread from the list (i.e. SLOTNUMBER 0)
-// OBSOLETE * This is used when starting the program with 'run' or when attaching.
-// OBSOLETE *
-// OBSOLETE * If FLAG is 0 the context is not changed, and the registers, frame, etc
-// OBSOLETE * will continue to describe the old thread.
-// OBSOLETE *
-// OBSOLETE * If FLAG is nonzero, really select the thread.
-// OBSOLETE * If FLAG is 2, the THREAD_ID is a slotnumber instead of a mid.
-// OBSOLETE *
-// OBSOLETE */
-// OBSOLETE kern_return_t
-// OBSOLETE select_thread (mach_port_t task, int thread_id, int flag)
-// OBSOLETE {
-// OBSOLETE thread_array_t thread_list;
-// OBSOLETE int thread_count;
-// OBSOLETE kern_return_t ret;
-// OBSOLETE int index;
-// OBSOLETE thread_t new_thread = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE if (thread_id < 0)
-// OBSOLETE error ("Can't select cprocs without kernel thread");
-// OBSOLETE
-// OBSOLETE ret = task_threads (task, &thread_list, &thread_count);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE warning ("Can not select a thread from a dead task");
-// OBSOLETE m3_kill_inferior ();
-// OBSOLETE return KERN_FAILURE;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (thread_count == 0)
-// OBSOLETE {
-// OBSOLETE /* The task can not do anything anymore, but it still
-// OBSOLETE * exists as a container for memory and ports.
-// OBSOLETE */
-// OBSOLETE registers_changed ();
-// OBSOLETE warning ("Task %d has no threads",
-// OBSOLETE map_port_name_to_mid (task, MACH_TYPE_TASK));
-// OBSOLETE current_thread = MACH_PORT_NULL;
-// OBSOLETE (void) vm_deallocate (mach_task_self (),
-// OBSOLETE (vm_address_t) thread_list,
-// OBSOLETE (thread_count * sizeof (mach_port_t)));
-// OBSOLETE return KERN_FAILURE;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (!thread_id || flag == 2)
-// OBSOLETE {
-// OBSOLETE /* First thread or a slotnumber */
-// OBSOLETE if (!thread_id)
-// OBSOLETE new_thread = thread_list[0];
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (thread_id < thread_count)
-// OBSOLETE new_thread = thread_list[thread_id];
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE (void) vm_deallocate (mach_task_self (),
-// OBSOLETE (vm_address_t) thread_list,
-// OBSOLETE (thread_count * sizeof (mach_port_t)));
-// OBSOLETE error ("No such thread slot number : %d", thread_id);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE for (index = 0; index < thread_count; index++)
-// OBSOLETE if (thread_id == map_port_name_to_mid (thread_list[index],
-// OBSOLETE MACH_TYPE_THREAD))
-// OBSOLETE {
-// OBSOLETE new_thread = thread_list[index];
-// OBSOLETE index = -1;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (index != -1)
-// OBSOLETE error ("No thread with mid %d", thread_id);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Notify when the selected thread dies */
-// OBSOLETE request_notify (new_thread, MACH_NOTIFY_DEAD_NAME, MACH_TYPE_THREAD);
-// OBSOLETE
-// OBSOLETE ret = vm_deallocate (mach_task_self (),
-// OBSOLETE (vm_address_t) thread_list,
-// OBSOLETE (thread_count * sizeof (mach_port_t)));
-// OBSOLETE CHK ("vm_deallocate", ret);
-// OBSOLETE
-// OBSOLETE if (!flag)
-// OBSOLETE current_thread = new_thread;
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE #if 0
-// OBSOLETE if (MACH_PORT_VALID (current_thread))
-// OBSOLETE {
-// OBSOLETE /* Store the gdb's view of the thread we are deselecting
-// OBSOLETE
-// OBSOLETE * @@ I think gdb updates registers immediately when they are
-// OBSOLETE * changed, so don't do this.
-// OBSOLETE */
-// OBSOLETE ret = thread_abort (current_thread);
-// OBSOLETE CHK ("Could not abort system calls when saving state of old thread",
-// OBSOLETE ret);
-// OBSOLETE target_prepare_to_store ();
-// OBSOLETE target_store_registers (-1);
-// OBSOLETE }
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE registers_changed ();
-// OBSOLETE
-// OBSOLETE current_thread = new_thread;
-// OBSOLETE
-// OBSOLETE ret = thread_abort (current_thread);
-// OBSOLETE CHK ("Could not abort system calls when selecting a thread", ret);
-// OBSOLETE
-// OBSOLETE stop_pc = read_pc ();
-// OBSOLETE flush_cached_frames ();
-// OBSOLETE
-// OBSOLETE select_frame (get_current_frame ());
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return KERN_SUCCESS;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Switch to use thread named NEW_THREAD.
-// OBSOLETE * Return it's MID
-// OBSOLETE */
-// OBSOLETE int
-// OBSOLETE switch_to_thread (thread_t new_thread)
-// OBSOLETE {
-// OBSOLETE thread_t saved_thread = current_thread;
-// OBSOLETE int mid;
-// OBSOLETE
-// OBSOLETE mid = map_port_name_to_mid (new_thread,
-// OBSOLETE MACH_TYPE_THREAD);
-// OBSOLETE if (mid == -1)
-// OBSOLETE warning ("Can't map thread name 0x%x to mid", new_thread);
-// OBSOLETE else if (select_thread (inferior_task, mid, 1) != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE if (current_thread)
-// OBSOLETE current_thread = saved_thread;
-// OBSOLETE error ("Could not select thread %d", mid);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return mid;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Do this in gdb after doing FORK but before STARTUP_INFERIOR.
-// OBSOLETE * Note that the registers are not yet valid in the inferior task.
-// OBSOLETE */
-// OBSOLETE static int
-// OBSOLETE m3_trace_him (int pid)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE push_target (&m3_ops);
-// OBSOLETE
-// OBSOLETE inferior_task = task_by_pid (pid);
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (inferior_task))
-// OBSOLETE error ("Can not map Unix pid %d to Mach task", pid);
-// OBSOLETE
-// OBSOLETE /* Clean up previous notifications and create new ones */
-// OBSOLETE setup_notify_port (1);
-// OBSOLETE
-// OBSOLETE /* When notification appears, the inferior task has died */
-// OBSOLETE request_notify (inferior_task, MACH_NOTIFY_DEAD_NAME, MACH_TYPE_TASK);
-// OBSOLETE
-// OBSOLETE emulator_present = have_emulator_p (inferior_task);
-// OBSOLETE
-// OBSOLETE /* By default, select the first thread,
-// OBSOLETE * If task has no threads, gives a warning
-// OBSOLETE * Does not fetch registers, since they are not yet valid.
-// OBSOLETE */
-// OBSOLETE select_thread (inferior_task, 0, 0);
-// OBSOLETE
-// OBSOLETE inferior_exception_port = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE setup_exception_port ();
-// OBSOLETE
-// OBSOLETE xx_debug ("Now the debugged task is created\n");
-// OBSOLETE
-// OBSOLETE /* One trap to exec the shell, one to exec the program being debugged. */
-// OBSOLETE intercept_exec_calls (2);
-// OBSOLETE
-// OBSOLETE return pid;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE setup_exception_port (void)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE ret = mach_port_allocate (mach_task_self (),
-// OBSOLETE MACH_PORT_RIGHT_RECEIVE,
-// OBSOLETE &inferior_exception_port);
-// OBSOLETE CHK ("mach_port_allocate", ret);
-// OBSOLETE
-// OBSOLETE /* add send right */
-// OBSOLETE ret = mach_port_insert_right (mach_task_self (),
-// OBSOLETE inferior_exception_port,
-// OBSOLETE inferior_exception_port,
-// OBSOLETE MACH_MSG_TYPE_MAKE_SEND);
-// OBSOLETE CHK ("mach_port_insert_right", ret);
-// OBSOLETE
-// OBSOLETE ret = mach_port_move_member (mach_task_self (),
-// OBSOLETE inferior_exception_port,
-// OBSOLETE inferior_wait_port_set);
-// OBSOLETE CHK ("mach_port_move_member", ret);
-// OBSOLETE
-// OBSOLETE ret = task_get_special_port (inferior_task,
-// OBSOLETE TASK_EXCEPTION_PORT,
-// OBSOLETE &inferior_old_exception_port);
-// OBSOLETE CHK ("task_get_special_port(old exc)", ret);
-// OBSOLETE
-// OBSOLETE ret = task_set_special_port (inferior_task,
-// OBSOLETE TASK_EXCEPTION_PORT,
-// OBSOLETE inferior_exception_port);
-// OBSOLETE CHK ("task_set_special_port", ret);
-// OBSOLETE
-// OBSOLETE ret = mach_port_deallocate (mach_task_self (),
-// OBSOLETE inferior_exception_port);
-// OBSOLETE CHK ("mack_port_deallocate", ret);
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE /* When notify appears, the inferior_task's exception
-// OBSOLETE * port has been destroyed.
-// OBSOLETE *
-// OBSOLETE * Not used, since the dead_name_notification already
-// OBSOLETE * appears when task dies.
-// OBSOLETE *
-// OBSOLETE */
-// OBSOLETE request_notify (inferior_exception_port,
-// OBSOLETE MACH_NOTIFY_NO_SENDERS,
-// OBSOLETE MACH_TYPE_EXCEPTION_PORT);
-// OBSOLETE #endif
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Nonzero if gdb is waiting for a message */
-// OBSOLETE int mach_really_waiting;
-// OBSOLETE
-// OBSOLETE /* Wait for the inferior to stop for some reason.
-// OBSOLETE - Loop on notifications until inferior_task dies.
-// OBSOLETE - Loop on exceptions until stopped_in_exception comes true.
-// OBSOLETE (e.g. we receive a single step trace trap)
-// OBSOLETE - a message arrives to gdb's message port
-// OBSOLETE
-// OBSOLETE There is no other way to exit this loop.
-// OBSOLETE
-// OBSOLETE Returns the inferior_ptid for rest of gdb.
-// OBSOLETE Side effects: Set *OURSTATUS. */
-// OBSOLETE ptid_t
-// OBSOLETE mach_really_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE int w;
-// OBSOLETE
-// OBSOLETE struct msg
-// OBSOLETE {
-// OBSOLETE mach_msg_header_t header;
-// OBSOLETE mach_msg_type_t foo;
-// OBSOLETE int data[8000];
-// OBSOLETE }
-// OBSOLETE in_msg, out_msg;
-// OBSOLETE
-// OBSOLETE /* Either notify (death), exception or message can stop the inferior */
-// OBSOLETE stopped_in_exception = FALSE;
-// OBSOLETE
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE QUIT;
-// OBSOLETE
-// OBSOLETE stop_exception = stop_code = stop_subcode = -1;
-// OBSOLETE stop_thread = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE mach_really_waiting = 1;
-// OBSOLETE ret = mach_msg (&in_msg.header, /* header */
-// OBSOLETE MACH_RCV_MSG, /* options */
-// OBSOLETE 0, /* send size */
-// OBSOLETE sizeof (struct msg), /* receive size */
-// OBSOLETE currently_waiting_for, /* receive name */
-// OBSOLETE MACH_MSG_TIMEOUT_NONE,
-// OBSOLETE MACH_PORT_NULL);
-// OBSOLETE mach_really_waiting = 0;
-// OBSOLETE CHK ("mach_msg (receive)", ret);
-// OBSOLETE
-// OBSOLETE /* Check if we received a notify of the childs' death */
-// OBSOLETE if (notify_server (&in_msg.header, &out_msg.header))
-// OBSOLETE {
-// OBSOLETE /* If inferior_task is null then the inferior has
-// OBSOLETE gone away and we want to return to command level.
-// OBSOLETE Otherwise it was just an informative message and we
-// OBSOLETE need to look to see if there are any more. */
-// OBSOLETE if (inferior_task != MACH_PORT_NULL)
-// OBSOLETE continue;
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* Collect Unix exit status for gdb */
-// OBSOLETE
-// OBSOLETE wait3 (&w, WNOHANG, 0);
-// OBSOLETE
-// OBSOLETE /* This mess is here to check that the rest of
-// OBSOLETE * gdb knows that the inferior died. It also
-// OBSOLETE * tries to hack around the fact that Mach 3.0 (mk69)
-// OBSOLETE * unix server (ux28) does not always know what
-// OBSOLETE * has happened to it's children when mach-magic
-// OBSOLETE * is applied on them.
-// OBSOLETE */
-// OBSOLETE if ((!WIFEXITED (w) && WIFSTOPPED (w)) ||
-// OBSOLETE (WIFEXITED (w) && WEXITSTATUS (w) > 0377))
-// OBSOLETE {
-// OBSOLETE WSETEXIT (w, 0);
-// OBSOLETE warning ("Using exit value 0 for terminated task");
-// OBSOLETE }
-// OBSOLETE else if (!WIFEXITED (w))
-// OBSOLETE {
-// OBSOLETE int sig = WTERMSIG (w);
-// OBSOLETE
-// OBSOLETE /* Signals cause problems. Warn the user. */
-// OBSOLETE if (sig != SIGKILL) /* Bad luck if garbage matches this */
-// OBSOLETE warning ("The terminating signal stuff may be nonsense");
-// OBSOLETE else if (sig > NSIG)
-// OBSOLETE {
-// OBSOLETE WSETEXIT (w, 0);
-// OBSOLETE warning ("Using exit value 0 for terminated task");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE store_waitstatus (ourstatus, w);
-// OBSOLETE return inferior_ptid;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Hmm. Check for exception, as it was not a notification.
-// OBSOLETE exc_server() does an upcall to catch_exception_raise()
-// OBSOLETE if this rpc is an exception. Further actions are decided
-// OBSOLETE there.
-// OBSOLETE */
-// OBSOLETE if (!exc_server (&in_msg.header, &out_msg.header))
-// OBSOLETE {
-// OBSOLETE
-// OBSOLETE /* Not an exception, check for message.
-// OBSOLETE
-// OBSOLETE * Messages don't come from the inferior, or if they
-// OBSOLETE * do they better be asynchronous or it will hang.
-// OBSOLETE */
-// OBSOLETE if (gdb_message_server (&in_msg.header))
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE error ("Unrecognized message received in mach_really_wait");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Send the reply of the exception rpc to the suspended task */
-// OBSOLETE ret = mach_msg_send (&out_msg.header);
-// OBSOLETE CHK ("mach_msg_send (exc reply)", ret);
-// OBSOLETE
-// OBSOLETE if (stopped_in_exception)
-// OBSOLETE {
-// OBSOLETE /* Get unix state. May be changed in mach3_exception_actions() */
-// OBSOLETE wait3 (&w, WNOHANG, 0);
-// OBSOLETE
-// OBSOLETE mach3_exception_actions (&w, FALSE, "Task");
-// OBSOLETE
-// OBSOLETE store_waitstatus (ourstatus, w);
-// OBSOLETE return inferior_ptid;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Called by macro DO_QUIT() in utils.c(quit).
-// OBSOLETE * This is called just before calling error() to return to command level
-// OBSOLETE */
-// OBSOLETE void
-// OBSOLETE mach3_quit (void)
-// OBSOLETE {
-// OBSOLETE int mid;
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE if (mach_really_waiting)
-// OBSOLETE {
-// OBSOLETE ret = task_suspend (inferior_task);
-// OBSOLETE
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE warning ("Could not suspend task for interrupt: %s",
-// OBSOLETE mach_error_string (ret));
-// OBSOLETE mach_really_waiting = 0;
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE must_suspend_thread = 0;
-// OBSOLETE mach_really_waiting = 0;
-// OBSOLETE
-// OBSOLETE mid = map_port_name_to_mid (current_thread, MACH_TYPE_THREAD);
-// OBSOLETE if (mid == -1)
-// OBSOLETE {
-// OBSOLETE warning ("Selecting first existing kernel thread");
-// OBSOLETE mid = 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE current_thread = MACH_PORT_NULL; /* Force setup */
-// OBSOLETE select_thread (inferior_task, mid, 1);
-// OBSOLETE
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE /* bogus bogus bogus. It is NOT OK to quit out of target_wait. */
-// OBSOLETE
-// OBSOLETE /* If ^C is typed when we are waiting for a message
-// OBSOLETE * and your Unix server is able to notice that we
-// OBSOLETE * should quit now.
-// OBSOLETE *
-// OBSOLETE * Called by REQUEST_QUIT() from utils.c(request_quit)
-// OBSOLETE */
-// OBSOLETE void
-// OBSOLETE mach3_request_quit (void)
-// OBSOLETE {
-// OBSOLETE if (mach_really_waiting)
-// OBSOLETE immediate_quit = 1;
-// OBSOLETE }
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Gdb message server.
-// OBSOLETE * Currently implemented is the STOP message, that causes
-// OBSOLETE * gdb to return to the command level like ^C had been typed from terminal.
-// OBSOLETE */
-// OBSOLETE int
-// OBSOLETE gdb_message_server (mach_msg_header_t *InP)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE int mid;
-// OBSOLETE
-// OBSOLETE if (InP->msgh_local_port == our_message_port)
-// OBSOLETE {
-// OBSOLETE /* A message coming to our_message_port. Check validity */
-// OBSOLETE switch (InP->msgh_id)
-// OBSOLETE {
-// OBSOLETE
-// OBSOLETE case GDB_MESSAGE_ID_STOP:
-// OBSOLETE ret = task_suspend (inferior_task);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE warning ("Could not suspend task for stop message: %s",
-// OBSOLETE mach_error_string (ret));
-// OBSOLETE
-// OBSOLETE /* QUIT in mach_really_wait() loop. */
-// OBSOLETE request_quit (0);
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE default:
-// OBSOLETE warning ("Invalid message id %d received, ignored.",
-// OBSOLETE InP->msgh_id);
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Message not handled by this server */
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* NOTE: This is not an RPC call. It is a simpleroutine.
-// OBSOLETE
-// OBSOLETE * This is not called from this gdb code.
-// OBSOLETE *
-// OBSOLETE * It may be called by another debugger to cause this
-// OBSOLETE * debugger to enter command level:
-// OBSOLETE *
-// OBSOLETE * (gdb) set stop_inferior_gdb ()
-// OBSOLETE * (gdb) continue
-// OBSOLETE *
-// OBSOLETE * External program "stop-gdb" implements this also.
-// OBSOLETE */
-// OBSOLETE void
-// OBSOLETE stop_inferior_gdb (void)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE /* Code generated by mig, with minor cleanups :-)
-// OBSOLETE
-// OBSOLETE * simpleroutine stop_inferior_gdb (our_message_port : mach_port_t);
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE typedef struct
-// OBSOLETE {
-// OBSOLETE mach_msg_header_t Head;
-// OBSOLETE }
-// OBSOLETE Request;
-// OBSOLETE
-// OBSOLETE Request Mess;
-// OBSOLETE
-// OBSOLETE register Request *InP = &Mess;
-// OBSOLETE
-// OBSOLETE InP->Head.msgh_bits = MACH_MSGH_BITS (MACH_MSG_TYPE_COPY_SEND, 0);
-// OBSOLETE
-// OBSOLETE /* msgh_size passed as argument */
-// OBSOLETE InP->Head.msgh_remote_port = our_message_port;
-// OBSOLETE InP->Head.msgh_local_port = MACH_PORT_NULL;
-// OBSOLETE InP->Head.msgh_seqno = 0;
-// OBSOLETE InP->Head.msgh_id = GDB_MESSAGE_ID_STOP;
-// OBSOLETE
-// OBSOLETE ret = mach_msg (&InP->Head,
-// OBSOLETE MACH_SEND_MSG | MACH_MSG_OPTION_NONE,
-// OBSOLETE sizeof (Request),
-// OBSOLETE 0,
-// OBSOLETE MACH_PORT_NULL,
-// OBSOLETE MACH_MSG_TIMEOUT_NONE,
-// OBSOLETE MACH_PORT_NULL);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #ifdef THREAD_ALLOWED_TO_BREAK
-// OBSOLETE /*
-// OBSOLETE * Return 1 if the MID specifies the thread that caused the
-// OBSOLETE * last exception.
-// OBSOLETE * Since catch_exception_raise() selects the thread causing
-// OBSOLETE * the last exception to current_thread, we just check that
-// OBSOLETE * it is selected and the last exception was a breakpoint.
-// OBSOLETE */
-// OBSOLETE int
-// OBSOLETE mach_thread_for_breakpoint (int mid)
-// OBSOLETE {
-// OBSOLETE int cmid = map_port_name_to_mid (current_thread, MACH_TYPE_THREAD);
-// OBSOLETE
-// OBSOLETE if (mid < 0)
-// OBSOLETE {
-// OBSOLETE mid = map_slot_to_mid (-(mid + 1), 0, 0);
-// OBSOLETE if (mid < 0)
-// OBSOLETE return 0; /* Don't stop, no such slot */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (!mid || cmid == -1)
-// OBSOLETE return 1; /* stop */
-// OBSOLETE
-// OBSOLETE return cmid == mid && stop_exception == EXC_BREAKPOINT;
-// OBSOLETE }
-// OBSOLETE #endif /* THREAD_ALLOWED_TO_BREAK */
-// OBSOLETE
-// OBSOLETE #ifdef THREAD_PARSE_ID
-// OBSOLETE /*
-// OBSOLETE * Map a thread id string (MID or a @SLOTNUMBER)
-// OBSOLETE * to a thread-id.
-// OBSOLETE *
-// OBSOLETE * 0 matches all threads.
-// OBSOLETE * Otherwise the meaning is defined only in this file.
-// OBSOLETE * (mach_thread_for_breakpoint uses it)
-// OBSOLETE *
-// OBSOLETE * @@ This allows non-existent MIDs to be specified.
-// OBSOLETE * It now also allows non-existent slots to be
-// OBSOLETE * specified. (Slot numbers stored are negative,
-// OBSOLETE * and the magnitude is one greater than the actual
-// OBSOLETE * slot index. (Since 0 is reserved))
-// OBSOLETE */
-// OBSOLETE int
-// OBSOLETE mach_thread_parse_id (char *arg)
-// OBSOLETE {
-// OBSOLETE int mid;
-// OBSOLETE if (arg == 0)
-// OBSOLETE error ("thread id expected");
-// OBSOLETE mid = parse_thread_id (arg, 0, 1);
-// OBSOLETE
-// OBSOLETE return mid;
-// OBSOLETE }
-// OBSOLETE #endif /* THREAD_PARSE_ID */
-// OBSOLETE
-// OBSOLETE #ifdef THREAD_OUTPUT_ID
-// OBSOLETE char *
-// OBSOLETE mach_thread_output_id (int mid)
-// OBSOLETE {
-// OBSOLETE static char foobar[20];
-// OBSOLETE
-// OBSOLETE if (mid > 0)
-// OBSOLETE sprintf (foobar, "mid %d", mid);
-// OBSOLETE else if (mid < 0)
-// OBSOLETE sprintf (foobar, "@%d", -(mid + 1));
-// OBSOLETE else
-// OBSOLETE sprintf (foobar, "*any thread*");
-// OBSOLETE
-// OBSOLETE return foobar;
-// OBSOLETE }
-// OBSOLETE #endif /* THREAD_OUTPUT_ID */
-// OBSOLETE
-// OBSOLETE /* Called with hook PREPARE_TO_PROCEED() from infrun.c.
-// OBSOLETE
-// OBSOLETE * If we have switched threads and stopped at breakpoint return 1 otherwise 0.
-// OBSOLETE *
-// OBSOLETE * if SELECT_IT is nonzero, reselect the thread that was active when
-// OBSOLETE * we stopped at a breakpoint.
-// OBSOLETE *
-// OBSOLETE * Note that this implementation is potentially redundant now that
-// OBSOLETE * default_prepare_to_proceed() has been added.
-// OBSOLETE *
-// OBSOLETE * FIXME This may not support switching threads after Ctrl-C
-// OBSOLETE * correctly. The default implementation does support this.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE mach3_prepare_to_proceed (int select_it)
-// OBSOLETE {
-// OBSOLETE if (stop_thread &&
-// OBSOLETE stop_thread != current_thread &&
-// OBSOLETE stop_exception == EXC_BREAKPOINT)
-// OBSOLETE {
-// OBSOLETE int mid;
-// OBSOLETE
-// OBSOLETE if (!select_it)
-// OBSOLETE return 1;
-// OBSOLETE
-// OBSOLETE mid = switch_to_thread (stop_thread);
-// OBSOLETE
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* this stuff here is an upcall via libmach/excServer.c
-// OBSOLETE and mach_really_wait which does the actual upcall.
-// OBSOLETE
-// OBSOLETE The code will pass the exception to the inferior if:
-// OBSOLETE
-// OBSOLETE - The task that signaled is not the inferior task
-// OBSOLETE (e.g. when debugging another debugger)
-// OBSOLETE
-// OBSOLETE - The user has explicitely requested to pass on the exceptions.
-// OBSOLETE (e.g to the default unix exception handler, which maps
-// OBSOLETE exceptions to signals, or the user has her own exception handler)
-// OBSOLETE
-// OBSOLETE - If the thread that signaled is being single-stepped and it
-// OBSOLETE has set it's own exception port and the exception is not
-// OBSOLETE EXC_BREAKPOINT. (Maybe this is not desirable?)
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE kern_return_t
-// OBSOLETE catch_exception_raise (mach_port_t port, thread_t thread, task_t task,
-// OBSOLETE int exception, int code, int subcode)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE boolean_t signal_thread;
-// OBSOLETE int mid = map_port_name_to_mid (thread, MACH_TYPE_THREAD);
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (thread))
-// OBSOLETE {
-// OBSOLETE /* If the exception was sent and thread dies before we
-// OBSOLETE receive it, THREAD will be MACH_PORT_DEAD
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE current_thread = thread = MACH_PORT_NULL;
-// OBSOLETE error ("Received exception from nonexistent thread");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Check if the task died in transit.
-// OBSOLETE * @@ Isn't the thread also invalid in such case?
-// OBSOLETE */
-// OBSOLETE if (!MACH_PORT_VALID (task))
-// OBSOLETE {
-// OBSOLETE current_thread = thread = MACH_PORT_NULL;
-// OBSOLETE error ("Received exception from nonexistent task");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (exception < 0 || exception > MAX_EXCEPTION)
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "catch_exception_raise: unknown exception code %d thread %d",
-// OBSOLETE exception,
-// OBSOLETE mid);
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (inferior_task))
-// OBSOLETE error ("got an exception, but inferior_task is null or dead");
-// OBSOLETE
-// OBSOLETE stop_exception = exception;
-// OBSOLETE stop_code = code;
-// OBSOLETE stop_subcode = subcode;
-// OBSOLETE stop_thread = thread;
-// OBSOLETE
-// OBSOLETE signal_thread = exception != EXC_BREAKPOINT &&
-// OBSOLETE port == singlestepped_thread_port &&
-// OBSOLETE MACH_PORT_VALID (thread_saved_exception_port);
-// OBSOLETE
-// OBSOLETE /* If it was not our inferior or if we want to forward
-// OBSOLETE * the exception to the inferior's handler, do it here
-// OBSOLETE *
-// OBSOLETE * Note: If you have forwarded EXC_BREAKPOINT I trust you know why.
-// OBSOLETE */
-// OBSOLETE if (task != inferior_task ||
-// OBSOLETE signal_thread ||
-// OBSOLETE exception_map[exception].forward)
-// OBSOLETE {
-// OBSOLETE mach_port_t eport = inferior_old_exception_port;
-// OBSOLETE
-// OBSOLETE if (signal_thread)
-// OBSOLETE {
-// OBSOLETE /*
-// OBSOLETE GDB now forwards the exeption to thread's original handler,
-// OBSOLETE since the user propably knows what he is doing.
-// OBSOLETE Give a message, though.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE mach3_exception_actions ((WAITTYPE *) NULL, TRUE, "Thread");
-// OBSOLETE eport = thread_saved_exception_port;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Send the exception to the original handler */
-// OBSOLETE ret = exception_raise (eport,
-// OBSOLETE thread,
-// OBSOLETE task,
-// OBSOLETE exception,
-// OBSOLETE code,
-// OBSOLETE subcode);
-// OBSOLETE
-// OBSOLETE (void) mach_port_deallocate (mach_task_self (), task);
-// OBSOLETE (void) mach_port_deallocate (mach_task_self (), thread);
-// OBSOLETE
-// OBSOLETE /* If we come here, we don't want to trace any more, since we
-// OBSOLETE * will never stop for tracing anyway.
-// OBSOLETE */
-// OBSOLETE discard_single_step (thread);
-// OBSOLETE
-// OBSOLETE /* Do not stop the inferior */
-// OBSOLETE return ret;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Now gdb handles the exception */
-// OBSOLETE stopped_in_exception = TRUE;
-// OBSOLETE
-// OBSOLETE ret = task_suspend (task);
-// OBSOLETE CHK ("Error suspending inferior after exception", ret);
-// OBSOLETE
-// OBSOLETE must_suspend_thread = 0;
-// OBSOLETE
-// OBSOLETE if (current_thread != thread)
-// OBSOLETE {
-// OBSOLETE if (MACH_PORT_VALID (singlestepped_thread_port))
-// OBSOLETE /* Cleanup discards single stepping */
-// OBSOLETE error ("Exception from thread %d while singlestepping thread %d",
-// OBSOLETE mid,
-// OBSOLETE map_port_name_to_mid (current_thread, MACH_TYPE_THREAD));
-// OBSOLETE
-// OBSOLETE /* Then select the thread that caused the exception */
-// OBSOLETE if (select_thread (inferior_task, mid, 0) != KERN_SUCCESS)
-// OBSOLETE error ("Could not select thread %d causing exception", mid);
-// OBSOLETE else
-// OBSOLETE warning ("Gdb selected thread %d", mid);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* If we receive an exception that is not breakpoint
-// OBSOLETE * exception, we interrupt the single step and return to
-// OBSOLETE * debugger. Trace condition is cleared.
-// OBSOLETE */
-// OBSOLETE if (MACH_PORT_VALID (singlestepped_thread_port))
-// OBSOLETE {
-// OBSOLETE if (stop_exception != EXC_BREAKPOINT)
-// OBSOLETE warning ("Single step interrupted by exception");
-// OBSOLETE else if (port == singlestepped_thread_port)
-// OBSOLETE {
-// OBSOLETE /* Single step exception occurred, remove trace bit
-// OBSOLETE * and return to gdb.
-// OBSOLETE */
-// OBSOLETE if (!MACH_PORT_VALID (current_thread))
-// OBSOLETE error ("Single stepped thread is not valid");
-// OBSOLETE
-// OBSOLETE /* Resume threads, but leave the task suspended */
-// OBSOLETE resume_all_threads (0);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE warning ("Breakpoint while single stepping?");
-// OBSOLETE
-// OBSOLETE discard_single_step (current_thread);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE (void) mach_port_deallocate (mach_task_self (), task);
-// OBSOLETE (void) mach_port_deallocate (mach_task_self (), thread);
-// OBSOLETE
-// OBSOLETE return KERN_SUCCESS;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE port_valid (mach_port_t port, int mask)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE mach_port_type_t type;
-// OBSOLETE
-// OBSOLETE ret = mach_port_type (mach_task_self (),
-// OBSOLETE port,
-// OBSOLETE &type);
-// OBSOLETE if (ret != KERN_SUCCESS || (type & mask) != mask)
-// OBSOLETE return 0;
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* @@ No vm read cache implemented yet */
-// OBSOLETE boolean_t vm_read_cache_valid = FALSE;
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Read inferior task's LEN bytes from ADDR and copy it to MYADDR
-// OBSOLETE * in gdb's address space.
-// OBSOLETE *
-// OBSOLETE * Return 0 on failure; number of bytes read otherwise.
-// OBSOLETE */
-// OBSOLETE int
-// OBSOLETE mach3_read_inferior (CORE_ADDR addr, char *myaddr, int length)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE vm_address_t low_address = (vm_address_t) trunc_page (addr);
-// OBSOLETE vm_size_t aligned_length =
-// OBSOLETE (vm_size_t) round_page (addr + length) - low_address;
-// OBSOLETE pointer_t copied_memory;
-// OBSOLETE int copy_count;
-// OBSOLETE
-// OBSOLETE /* Get memory from inferior with page aligned addresses */
-// OBSOLETE ret = vm_read (inferior_task,
-// OBSOLETE low_address,
-// OBSOLETE aligned_length,
-// OBSOLETE &copied_memory,
-// OBSOLETE &copy_count);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE /* the problem is that the inferior might be killed for whatever reason
-// OBSOLETE * before we go to mach_really_wait. This is one place that ought to
-// OBSOLETE * catch many of those errors.
-// OBSOLETE * @@ A better fix would be to make all external events to GDB
-// OBSOLETE * to arrive via a SINGLE port set. (Including user input!)
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE if (!port_valid (inferior_task, MACH_PORT_TYPE_SEND))
-// OBSOLETE {
-// OBSOLETE m3_kill_inferior ();
-// OBSOLETE error ("Inferior killed (task port invalid)");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE #ifdef OSF
-// OBSOLETE extern int errno;
-// OBSOLETE /* valprint.c gives nicer format if this does not
-// OBSOLETE screw it. Eamonn seems to like this, so I enable
-// OBSOLETE it if OSF is defined...
-// OBSOLETE */
-// OBSOLETE warning ("[read inferior %x failed: %s]",
-// OBSOLETE addr, mach_error_string (ret));
-// OBSOLETE errno = 0;
-// OBSOLETE #endif
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE memcpy (myaddr, (char *) addr - low_address + copied_memory, length);
-// OBSOLETE
-// OBSOLETE ret = vm_deallocate (mach_task_self (),
-// OBSOLETE copied_memory,
-// OBSOLETE copy_count);
-// OBSOLETE CHK ("mach3_read_inferior vm_deallocate failed", ret);
-// OBSOLETE
-// OBSOLETE return length;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define CHK_GOTO_OUT(str,ret) \
-// OBSOLETE do if (ret != KERN_SUCCESS) { errstr = #str; goto out; } while(0)
-// OBSOLETE
-// OBSOLETE struct vm_region_list
-// OBSOLETE {
-// OBSOLETE struct vm_region_list *next;
-// OBSOLETE vm_prot_t protection;
-// OBSOLETE vm_address_t start;
-// OBSOLETE vm_size_t length;
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE struct obstack region_obstack;
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Write inferior task's LEN bytes from ADDR and copy it to MYADDR
-// OBSOLETE * in gdb's address space.
-// OBSOLETE */
-// OBSOLETE int
-// OBSOLETE mach3_write_inferior (CORE_ADDR addr, char *myaddr, int length)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE vm_address_t low_address = (vm_address_t) trunc_page (addr);
-// OBSOLETE vm_size_t aligned_length =
-// OBSOLETE (vm_size_t) round_page (addr + length) - low_address;
-// OBSOLETE pointer_t copied_memory;
-// OBSOLETE int copy_count;
-// OBSOLETE int deallocate = 0;
-// OBSOLETE
-// OBSOLETE char *errstr = "Bug in mach3_write_inferior";
-// OBSOLETE
-// OBSOLETE struct vm_region_list *region_element;
-// OBSOLETE struct vm_region_list *region_head = (struct vm_region_list *) NULL;
-// OBSOLETE
-// OBSOLETE /* Get memory from inferior with page aligned addresses */
-// OBSOLETE ret = vm_read (inferior_task,
-// OBSOLETE low_address,
-// OBSOLETE aligned_length,
-// OBSOLETE &copied_memory,
-// OBSOLETE &copy_count);
-// OBSOLETE CHK_GOTO_OUT ("mach3_write_inferior vm_read failed", ret);
-// OBSOLETE
-// OBSOLETE deallocate++;
-// OBSOLETE
-// OBSOLETE memcpy ((char *) addr - low_address + copied_memory, myaddr, length);
-// OBSOLETE
-// OBSOLETE obstack_init (&region_obstack);
-// OBSOLETE
-// OBSOLETE /* Do writes atomically.
-// OBSOLETE * First check for holes and unwritable memory.
-// OBSOLETE */
-// OBSOLETE {
-// OBSOLETE vm_size_t remaining_length = aligned_length;
-// OBSOLETE vm_address_t region_address = low_address;
-// OBSOLETE
-// OBSOLETE struct vm_region_list *scan;
-// OBSOLETE
-// OBSOLETE while (region_address < low_address + aligned_length)
-// OBSOLETE {
-// OBSOLETE vm_prot_t protection;
-// OBSOLETE vm_prot_t max_protection;
-// OBSOLETE vm_inherit_t inheritance;
-// OBSOLETE boolean_t shared;
-// OBSOLETE mach_port_t object_name;
-// OBSOLETE vm_offset_t offset;
-// OBSOLETE vm_size_t region_length = remaining_length;
-// OBSOLETE vm_address_t old_address = region_address;
-// OBSOLETE
-// OBSOLETE ret = vm_region (inferior_task,
-// OBSOLETE &region_address,
-// OBSOLETE &region_length,
-// OBSOLETE &protection,
-// OBSOLETE &max_protection,
-// OBSOLETE &inheritance,
-// OBSOLETE &shared,
-// OBSOLETE &object_name,
-// OBSOLETE &offset);
-// OBSOLETE CHK_GOTO_OUT ("vm_region failed", ret);
-// OBSOLETE
-// OBSOLETE /* Check for holes in memory */
-// OBSOLETE if (old_address != region_address)
-// OBSOLETE {
-// OBSOLETE warning ("No memory at 0x%x. Nothing written",
-// OBSOLETE old_address);
-// OBSOLETE ret = KERN_SUCCESS;
-// OBSOLETE length = 0;
-// OBSOLETE goto out;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (!(max_protection & VM_PROT_WRITE))
-// OBSOLETE {
-// OBSOLETE warning ("Memory at address 0x%x is unwritable. Nothing written",
-// OBSOLETE old_address);
-// OBSOLETE ret = KERN_SUCCESS;
-// OBSOLETE length = 0;
-// OBSOLETE goto out;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Chain the regions for later use */
-// OBSOLETE region_element =
-// OBSOLETE (struct vm_region_list *)
-// OBSOLETE obstack_alloc (&region_obstack, sizeof (struct vm_region_list));
-// OBSOLETE
-// OBSOLETE region_element->protection = protection;
-// OBSOLETE region_element->start = region_address;
-// OBSOLETE region_element->length = region_length;
-// OBSOLETE
-// OBSOLETE /* Chain the regions along with protections */
-// OBSOLETE region_element->next = region_head;
-// OBSOLETE region_head = region_element;
-// OBSOLETE
-// OBSOLETE region_address += region_length;
-// OBSOLETE remaining_length = remaining_length - region_length;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* If things fail after this, we give up.
-// OBSOLETE * Somebody is messing up inferior_task's mappings.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* Enable writes to the chained vm regions */
-// OBSOLETE for (scan = region_head; scan; scan = scan->next)
-// OBSOLETE {
-// OBSOLETE boolean_t protection_changed = FALSE;
-// OBSOLETE
-// OBSOLETE if (!(scan->protection & VM_PROT_WRITE))
-// OBSOLETE {
-// OBSOLETE ret = vm_protect (inferior_task,
-// OBSOLETE scan->start,
-// OBSOLETE scan->length,
-// OBSOLETE FALSE,
-// OBSOLETE scan->protection | VM_PROT_WRITE);
-// OBSOLETE CHK_GOTO_OUT ("vm_protect: enable write failed", ret);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE ret = vm_write (inferior_task,
-// OBSOLETE low_address,
-// OBSOLETE copied_memory,
-// OBSOLETE aligned_length);
-// OBSOLETE CHK_GOTO_OUT ("vm_write failed", ret);
-// OBSOLETE
-// OBSOLETE /* Set up the original region protections, if they were changed */
-// OBSOLETE for (scan = region_head; scan; scan = scan->next)
-// OBSOLETE {
-// OBSOLETE boolean_t protection_changed = FALSE;
-// OBSOLETE
-// OBSOLETE if (!(scan->protection & VM_PROT_WRITE))
-// OBSOLETE {
-// OBSOLETE ret = vm_protect (inferior_task,
-// OBSOLETE scan->start,
-// OBSOLETE scan->length,
-// OBSOLETE FALSE,
-// OBSOLETE scan->protection);
-// OBSOLETE CHK_GOTO_OUT ("vm_protect: enable write failed", ret);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE out:
-// OBSOLETE if (deallocate)
-// OBSOLETE {
-// OBSOLETE obstack_free (&region_obstack, 0);
-// OBSOLETE
-// OBSOLETE (void) vm_deallocate (mach_task_self (),
-// OBSOLETE copied_memory,
-// OBSOLETE copy_count);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE warning ("%s %s", errstr, mach_error_string (ret));
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return length;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Return 0 on failure, number of bytes handled otherwise. TARGET is
-// OBSOLETE ignored. */
-// OBSOLETE static int
-// OBSOLETE m3_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
-// OBSOLETE struct target_ops *target)
-// OBSOLETE {
-// OBSOLETE int result;
-// OBSOLETE
-// OBSOLETE if (write)
-// OBSOLETE result = mach3_write_inferior (memaddr, myaddr, len);
-// OBSOLETE else
-// OBSOLETE result = mach3_read_inferior (memaddr, myaddr, len);
-// OBSOLETE
-// OBSOLETE return result;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE static char *
-// OBSOLETE translate_state (int state)
-// OBSOLETE {
-// OBSOLETE switch (state)
-// OBSOLETE {
-// OBSOLETE case TH_STATE_RUNNING:
-// OBSOLETE return ("R");
-// OBSOLETE case TH_STATE_STOPPED:
-// OBSOLETE return ("S");
-// OBSOLETE case TH_STATE_WAITING:
-// OBSOLETE return ("W");
-// OBSOLETE case TH_STATE_UNINTERRUPTIBLE:
-// OBSOLETE return ("U");
-// OBSOLETE case TH_STATE_HALTED:
-// OBSOLETE return ("H");
-// OBSOLETE default:
-// OBSOLETE return ("?");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static char *
-// OBSOLETE translate_cstate (int state)
-// OBSOLETE {
-// OBSOLETE switch (state)
-// OBSOLETE {
-// OBSOLETE case CPROC_RUNNING:
-// OBSOLETE return "R";
-// OBSOLETE case CPROC_SWITCHING:
-// OBSOLETE return "S";
-// OBSOLETE case CPROC_BLOCKED:
-// OBSOLETE return "B";
-// OBSOLETE case CPROC_CONDWAIT:
-// OBSOLETE return "C";
-// OBSOLETE case CPROC_CONDWAIT | CPROC_SWITCHING:
-// OBSOLETE return "CS";
-// OBSOLETE default:
-// OBSOLETE return "?";
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* type == MACH_MSG_TYPE_COPY_SEND || type == MACH_MSG_TYPE_MAKE_SEND */
-// OBSOLETE
-// OBSOLETE mach_port_t /* no mach_port_name_t found in include files. */
-// OBSOLETE map_inferior_port_name (mach_port_t inferior_name, mach_msg_type_name_t type)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE mach_msg_type_name_t acquired;
-// OBSOLETE mach_port_t iport;
-// OBSOLETE
-// OBSOLETE ret = mach_port_extract_right (inferior_task,
-// OBSOLETE inferior_name,
-// OBSOLETE type,
-// OBSOLETE &iport,
-// OBSOLETE &acquired);
-// OBSOLETE CHK ("mach_port_extract_right (map_inferior_port_name)", ret);
-// OBSOLETE
-// OBSOLETE if (acquired != MACH_MSG_TYPE_PORT_SEND)
-// OBSOLETE error ("Incorrect right extracted, (map_inferior_port_name)");
-// OBSOLETE
-// OBSOLETE ret = mach_port_deallocate (mach_task_self (),
-// OBSOLETE iport);
-// OBSOLETE CHK ("Deallocating mapped port (map_inferior_port_name)", ret);
-// OBSOLETE
-// OBSOLETE return iport;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Naming convention:
-// OBSOLETE * Always return user defined name if found.
-// OBSOLETE * _K == A kernel thread with no matching CPROC
-// OBSOLETE * _C == A cproc with no current cthread
-// OBSOLETE * _t == A cthread with no user defined name
-// OBSOLETE *
-// OBSOLETE * The digits that follow the _names are the SLOT number of the
-// OBSOLETE * kernel thread if there is such a thing, otherwise just a negation
-// OBSOLETE * of the sequential number of such cprocs.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE static char buf[7];
-// OBSOLETE
-// OBSOLETE static char *
-// OBSOLETE get_thread_name (gdb_thread_t one_cproc, int id)
-// OBSOLETE {
-// OBSOLETE if (one_cproc)
-// OBSOLETE if (one_cproc->cthread == NULL)
-// OBSOLETE {
-// OBSOLETE /* cproc not mapped to any cthread */
-// OBSOLETE sprintf (buf, "_C%d", id);
-// OBSOLETE }
-// OBSOLETE else if (!one_cproc->cthread->name)
-// OBSOLETE {
-// OBSOLETE /* cproc and cthread, but no name */
-// OBSOLETE sprintf (buf, "_t%d", id);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE return (char *) (one_cproc->cthread->name);
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (id < 0)
-// OBSOLETE warning ("Inconsistency in thread name id %d", id);
-// OBSOLETE
-// OBSOLETE /* Kernel thread without cproc */
-// OBSOLETE sprintf (buf, "_K%d", id);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return buf;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE fetch_thread_info (mach_port_t task, gdb_thread_t *mthreads_out)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE thread_array_t th_table;
-// OBSOLETE int th_count;
-// OBSOLETE gdb_thread_t mthreads = NULL;
-// OBSOLETE int index;
-// OBSOLETE
-// OBSOLETE ret = task_threads (task, &th_table, &th_count);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE warning ("Error getting inferior's thread list:%s",
-// OBSOLETE mach_error_string (ret));
-// OBSOLETE m3_kill_inferior ();
-// OBSOLETE return -1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE mthreads = (gdb_thread_t)
-// OBSOLETE obstack_alloc
-// OBSOLETE (cproc_obstack,
-// OBSOLETE th_count * sizeof (struct gdb_thread));
-// OBSOLETE
-// OBSOLETE for (index = 0; index < th_count; index++)
-// OBSOLETE {
-// OBSOLETE thread_t saved_thread = MACH_PORT_NULL;
-// OBSOLETE int mid;
-// OBSOLETE
-// OBSOLETE if (must_suspend_thread)
-// OBSOLETE setup_thread (th_table[index], 1);
-// OBSOLETE
-// OBSOLETE if (th_table[index] != current_thread)
-// OBSOLETE {
-// OBSOLETE saved_thread = current_thread;
-// OBSOLETE
-// OBSOLETE mid = switch_to_thread (th_table[index]);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE mthreads[index].name = th_table[index];
-// OBSOLETE mthreads[index].cproc = NULL; /* map_cprocs_to_kernel_threads() */
-// OBSOLETE mthreads[index].in_emulator = FALSE;
-// OBSOLETE mthreads[index].slotid = index;
-// OBSOLETE
-// OBSOLETE mthreads[index].sp = read_register (SP_REGNUM);
-// OBSOLETE mthreads[index].fp = read_register (FP_REGNUM);
-// OBSOLETE mthreads[index].pc = read_pc ();
-// OBSOLETE
-// OBSOLETE if (MACH_PORT_VALID (saved_thread))
-// OBSOLETE mid = switch_to_thread (saved_thread);
-// OBSOLETE
-// OBSOLETE if (must_suspend_thread)
-// OBSOLETE setup_thread (th_table[index], 0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE consume_send_rights (th_table, th_count);
-// OBSOLETE ret = vm_deallocate (mach_task_self (), (vm_address_t) th_table,
-// OBSOLETE (th_count * sizeof (mach_port_t)));
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE warning ("Error trying to deallocate thread list : %s",
-// OBSOLETE mach_error_string (ret));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE *mthreads_out = mthreads;
-// OBSOLETE
-// OBSOLETE return th_count;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Current emulator always saves the USP on top of
-// OBSOLETE * emulator stack below struct emul_stack_top stuff.
-// OBSOLETE */
-// OBSOLETE CORE_ADDR
-// OBSOLETE fetch_usp_from_emulator_stack (CORE_ADDR sp)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR stack_pointer;
-// OBSOLETE
-// OBSOLETE sp = (sp & ~(EMULATOR_STACK_SIZE - 1)) +
-// OBSOLETE EMULATOR_STACK_SIZE - sizeof (struct emul_stack_top);
-// OBSOLETE
-// OBSOLETE if (mach3_read_inferior (sp,
-// OBSOLETE &stack_pointer,
-// OBSOLETE sizeof (CORE_ADDR)) != sizeof (CORE_ADDR))
-// OBSOLETE {
-// OBSOLETE warning ("Can't read user sp from emulator stack address 0x%x", sp);
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return stack_pointer;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #ifdef MK67
-// OBSOLETE
-// OBSOLETE /* get_emulation_vector() interface was changed after mk67 */
-// OBSOLETE #define EMUL_VECTOR_COUNT 400 /* Value does not matter too much */
-// OBSOLETE
-// OBSOLETE #endif /* MK67 */
-// OBSOLETE
-// OBSOLETE /* Check if the emulator exists at task's address space.
-// OBSOLETE */
-// OBSOLETE boolean_t
-// OBSOLETE have_emulator_p (task_t task)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE #ifndef EMUL_VECTOR_COUNT
-// OBSOLETE vm_offset_t *emulation_vector;
-// OBSOLETE int n;
-// OBSOLETE #else
-// OBSOLETE vm_offset_t emulation_vector[EMUL_VECTOR_COUNT];
-// OBSOLETE int n = EMUL_VECTOR_COUNT;
-// OBSOLETE #endif
-// OBSOLETE int i;
-// OBSOLETE int vector_start;
-// OBSOLETE
-// OBSOLETE ret = task_get_emulation_vector (task,
-// OBSOLETE &vector_start,
-// OBSOLETE #ifndef EMUL_VECTOR_COUNT
-// OBSOLETE &emulation_vector,
-// OBSOLETE #else
-// OBSOLETE emulation_vector,
-// OBSOLETE #endif
-// OBSOLETE &n);
-// OBSOLETE CHK ("task_get_emulation_vector", ret);
-// OBSOLETE xx_debug ("%d vectors from %d at 0x%08x\n",
-// OBSOLETE n, vector_start, emulation_vector);
-// OBSOLETE
-// OBSOLETE for (i = 0; i < n; i++)
-// OBSOLETE {
-// OBSOLETE vm_offset_t entry = emulation_vector[i];
-// OBSOLETE
-// OBSOLETE if (EMULATOR_BASE <= entry && entry <= EMULATOR_END)
-// OBSOLETE return TRUE;
-// OBSOLETE else if (entry)
-// OBSOLETE {
-// OBSOLETE static boolean_t informed = FALSE;
-// OBSOLETE if (!informed)
-// OBSOLETE {
-// OBSOLETE warning ("Emulation vector address 0x08%x outside emulator space",
-// OBSOLETE entry);
-// OBSOLETE informed = TRUE;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE return FALSE;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Map cprocs to kernel threads and vice versa. */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE map_cprocs_to_kernel_threads (gdb_thread_t cprocs, gdb_thread_t mthreads,
-// OBSOLETE int thread_count)
-// OBSOLETE {
-// OBSOLETE int index;
-// OBSOLETE gdb_thread_t scan;
-// OBSOLETE boolean_t all_mapped = TRUE;
-// OBSOLETE LONGEST stack_base;
-// OBSOLETE LONGEST stack_size;
-// OBSOLETE
-// OBSOLETE for (scan = cprocs; scan; scan = scan->next)
-// OBSOLETE {
-// OBSOLETE /* Default to: no kernel thread for this cproc */
-// OBSOLETE scan->reverse_map = -1;
-// OBSOLETE
-// OBSOLETE /* Check if the cproc is found by its stack */
-// OBSOLETE for (index = 0; index < thread_count; index++)
-// OBSOLETE {
-// OBSOLETE stack_base =
-// OBSOLETE extract_signed_integer (scan->raw_cproc + CPROC_BASE_OFFSET,
-// OBSOLETE CPROC_BASE_SIZE);
-// OBSOLETE stack_size =
-// OBSOLETE extract_signed_integer (scan->raw_cproc + CPROC_SIZE_OFFSET,
-// OBSOLETE CPROC_SIZE_SIZE);
-// OBSOLETE if ((mthreads + index)->sp > stack_base &&
-// OBSOLETE (mthreads + index)->sp <= stack_base + stack_size)
-// OBSOLETE {
-// OBSOLETE (mthreads + index)->cproc = scan;
-// OBSOLETE scan->reverse_map = index;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE all_mapped &= (scan->reverse_map != -1);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Check for threads that are currently in the emulator.
-// OBSOLETE * If so, they have a different stack, and the still unmapped
-// OBSOLETE * cprocs may well get mapped to these threads.
-// OBSOLETE *
-// OBSOLETE * If:
-// OBSOLETE * - cproc stack does not match any kernel thread stack pointer
-// OBSOLETE * - there is at least one extra kernel thread
-// OBSOLETE * that has no cproc mapped above.
-// OBSOLETE * - some kernel thread stack pointer points to emulator space
-// OBSOLETE * then we find the user stack pointer saved in the emulator
-// OBSOLETE * stack, and try to map that to the cprocs.
-// OBSOLETE *
-// OBSOLETE * Also set in_emulator for kernel threads.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE if (emulator_present)
-// OBSOLETE {
-// OBSOLETE for (index = 0; index < thread_count; index++)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR emul_sp;
-// OBSOLETE CORE_ADDR usp;
-// OBSOLETE
-// OBSOLETE gdb_thread_t mthread = (mthreads + index);
-// OBSOLETE emul_sp = mthread->sp;
-// OBSOLETE
-// OBSOLETE if (mthread->cproc == NULL &&
-// OBSOLETE EMULATOR_BASE <= emul_sp && emul_sp <= EMULATOR_END)
-// OBSOLETE {
-// OBSOLETE mthread->in_emulator = emulator_present;
-// OBSOLETE
-// OBSOLETE if (!all_mapped && cprocs)
-// OBSOLETE {
-// OBSOLETE usp = fetch_usp_from_emulator_stack (emul_sp);
-// OBSOLETE
-// OBSOLETE /* @@ Could be more accurate */
-// OBSOLETE if (!usp)
-// OBSOLETE error ("Zero stack pointer read from emulator?");
-// OBSOLETE
-// OBSOLETE /* Try to match this stack pointer to the cprocs that
-// OBSOLETE * don't yet have a kernel thread.
-// OBSOLETE */
-// OBSOLETE for (scan = cprocs; scan; scan = scan->next)
-// OBSOLETE {
-// OBSOLETE
-// OBSOLETE /* Check is this unmapped CPROC stack contains
-// OBSOLETE * the user stack pointer saved in the
-// OBSOLETE * emulator.
-// OBSOLETE */
-// OBSOLETE if (scan->reverse_map == -1)
-// OBSOLETE {
-// OBSOLETE stack_base =
-// OBSOLETE extract_signed_integer
-// OBSOLETE (scan->raw_cproc + CPROC_BASE_OFFSET,
-// OBSOLETE CPROC_BASE_SIZE);
-// OBSOLETE stack_size =
-// OBSOLETE extract_signed_integer
-// OBSOLETE (scan->raw_cproc + CPROC_SIZE_OFFSET,
-// OBSOLETE CPROC_SIZE_SIZE);
-// OBSOLETE if (usp > stack_base &&
-// OBSOLETE usp <= stack_base + stack_size)
-// OBSOLETE {
-// OBSOLETE mthread->cproc = scan;
-// OBSOLETE scan->reverse_map = index;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Format of the thread_list command
-// OBSOLETE *
-// OBSOLETE * slot mid sel name emul ks susp cstate wired address
-// OBSOLETE */
-// OBSOLETE #define TL_FORMAT "%-2.2s %5d%c %-10.10s %1.1s%s%-5.5s %-2.2s %-5.5s "
-// OBSOLETE
-// OBSOLETE #define TL_HEADER "\n@ MID Name KState CState Where\n"
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE print_tl_address (struct ui_file *stream, CORE_ADDR pc)
-// OBSOLETE {
-// OBSOLETE if (!lookup_minimal_symbol_by_pc (pc))
-// OBSOLETE fprintf_filtered (stream, local_hex_format (), pc);
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE extern int addressprint;
-// OBSOLETE extern int asm_demangle;
-// OBSOLETE
-// OBSOLETE int store = addressprint;
-// OBSOLETE addressprint = 0;
-// OBSOLETE print_address_symbolic (pc, stream, asm_demangle, "");
-// OBSOLETE addressprint = store;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* For thread names, but also for gdb_message_port external name */
-// OBSOLETE #define MAX_NAME_LEN 50
-// OBSOLETE
-// OBSOLETE /* Returns the address of variable NAME or 0 if not found */
-// OBSOLETE CORE_ADDR
-// OBSOLETE lookup_address_of_variable (char *name)
-// OBSOLETE {
-// OBSOLETE struct symbol *sym;
-// OBSOLETE CORE_ADDR symaddr = 0;
-// OBSOLETE struct minimal_symbol *msymbol;
-// OBSOLETE
-// OBSOLETE sym = lookup_symbol (name,
-// OBSOLETE (struct block *) NULL,
-// OBSOLETE VAR_DOMAIN,
-// OBSOLETE (int *) NULL,
-// OBSOLETE (struct symtab **) NULL);
-// OBSOLETE
-// OBSOLETE if (sym)
-// OBSOLETE symaddr = SYMBOL_VALUE (sym);
-// OBSOLETE
-// OBSOLETE if (!symaddr)
-// OBSOLETE {
-// OBSOLETE msymbol = lookup_minimal_symbol (name, NULL, NULL);
-// OBSOLETE
-// OBSOLETE if (msymbol && msymbol->type == mst_data)
-// OBSOLETE symaddr = SYMBOL_VALUE_ADDRESS (msymbol);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return symaddr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static gdb_thread_t
-// OBSOLETE get_cprocs (void)
-// OBSOLETE {
-// OBSOLETE gdb_thread_t cproc_head;
-// OBSOLETE gdb_thread_t cproc_copy;
-// OBSOLETE CORE_ADDR their_cprocs;
-// OBSOLETE char *buf;
-// OBSOLETE char *name;
-// OBSOLETE cthread_t cthread;
-// OBSOLETE CORE_ADDR symaddr;
-// OBSOLETE
-// OBSOLETE buf = alloca (TARGET_PTR_BIT / HOST_CHAR_BIT);
-// OBSOLETE symaddr = lookup_address_of_variable ("cproc_list");
-// OBSOLETE
-// OBSOLETE if (!symaddr)
-// OBSOLETE {
-// OBSOLETE /* cproc_list is not in a file compiled with debugging
-// OBSOLETE symbols, but don't give up yet */
-// OBSOLETE
-// OBSOLETE symaddr = lookup_address_of_variable ("cprocs");
-// OBSOLETE
-// OBSOLETE if (symaddr)
-// OBSOLETE {
-// OBSOLETE static int informed = 0;
-// OBSOLETE if (!informed)
-// OBSOLETE {
-// OBSOLETE informed++;
-// OBSOLETE warning ("Your program is loaded with an old threads library.");
-// OBSOLETE warning ("GDB does not know the old form of threads");
-// OBSOLETE warning ("so things may not work.");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Stripped or no -lthreads loaded or "cproc_list" is in wrong segment. */
-// OBSOLETE if (!symaddr)
-// OBSOLETE return NULL;
-// OBSOLETE
-// OBSOLETE /* Get the address of the first cproc in the task */
-// OBSOLETE if (!mach3_read_inferior (symaddr,
-// OBSOLETE buf,
-// OBSOLETE TARGET_PTR_BIT / HOST_CHAR_BIT))
-// OBSOLETE error ("Can't read cproc master list at address (0x%x).", symaddr);
-// OBSOLETE their_cprocs = extract_address (buf, TARGET_PTR_BIT / HOST_CHAR_BIT);
-// OBSOLETE
-// OBSOLETE /* Scan the CPROCs in the task.
-// OBSOLETE CPROCs are chained with LIST field, not NEXT field, which
-// OBSOLETE chains mutexes, condition variables and queues */
-// OBSOLETE
-// OBSOLETE cproc_head = NULL;
-// OBSOLETE
-// OBSOLETE while (their_cprocs != (CORE_ADDR) 0)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR cproc_copy_incarnation;
-// OBSOLETE cproc_copy = (gdb_thread_t) obstack_alloc (cproc_obstack,
-// OBSOLETE sizeof (struct gdb_thread));
-// OBSOLETE
-// OBSOLETE if (!mach3_read_inferior (their_cprocs,
-// OBSOLETE &cproc_copy->raw_cproc[0],
-// OBSOLETE CPROC_SIZE))
-// OBSOLETE error ("Can't read next cproc at 0x%x.", their_cprocs);
-// OBSOLETE
-// OBSOLETE their_cprocs =
-// OBSOLETE extract_address (cproc_copy->raw_cproc + CPROC_LIST_OFFSET,
-// OBSOLETE CPROC_LIST_SIZE);
-// OBSOLETE cproc_copy_incarnation =
-// OBSOLETE extract_address (cproc_copy->raw_cproc + CPROC_INCARNATION_OFFSET,
-// OBSOLETE CPROC_INCARNATION_SIZE);
-// OBSOLETE
-// OBSOLETE if (cproc_copy_incarnation == (CORE_ADDR) 0)
-// OBSOLETE cproc_copy->cthread = NULL;
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* This CPROC has an attached CTHREAD. Get its name */
-// OBSOLETE cthread = (cthread_t) obstack_alloc (cproc_obstack,
-// OBSOLETE sizeof (struct cthread));
-// OBSOLETE
-// OBSOLETE if (!mach3_read_inferior (cproc_copy_incarnation,
-// OBSOLETE cthread,
-// OBSOLETE sizeof (struct cthread)))
-// OBSOLETE error ("Can't read next thread at 0x%x.",
-// OBSOLETE cproc_copy_incarnation);
-// OBSOLETE
-// OBSOLETE cproc_copy->cthread = cthread;
-// OBSOLETE
-// OBSOLETE if (cthread->name)
-// OBSOLETE {
-// OBSOLETE name = (char *) obstack_alloc (cproc_obstack, MAX_NAME_LEN);
-// OBSOLETE
-// OBSOLETE if (!mach3_read_inferior (cthread->name, name, MAX_NAME_LEN))
-// OBSOLETE error ("Can't read next thread's name at 0x%x.", cthread->name);
-// OBSOLETE
-// OBSOLETE cthread->name = name;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* insert in front */
-// OBSOLETE cproc_copy->next = cproc_head;
-// OBSOLETE cproc_head = cproc_copy;
-// OBSOLETE }
-// OBSOLETE return cproc_head;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #ifndef FETCH_CPROC_STATE
-// OBSOLETE /*
-// OBSOLETE * Check if your machine does not grok the way this routine
-// OBSOLETE * fetches the FP,PC and SP of a cproc that is not
-// OBSOLETE * currently attached to any kernel thread (e.g. its cproc.context
-// OBSOLETE * field points to the place in stack where the context
-// OBSOLETE * is saved).
-// OBSOLETE *
-// OBSOLETE * If it doesn't, define your own routine.
-// OBSOLETE */
-// OBSOLETE #define FETCH_CPROC_STATE(mth) mach3_cproc_state (mth)
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE mach3_cproc_state (gdb_thread_t mthread)
-// OBSOLETE {
-// OBSOLETE int context;
-// OBSOLETE
-// OBSOLETE if (!mthread || !mthread->cproc)
-// OBSOLETE return -1;
-// OBSOLETE
-// OBSOLETE context = extract_signed_integer
-// OBSOLETE (mthread->cproc->raw_cproc + CPROC_CONTEXT_OFFSET,
-// OBSOLETE CPROC_CONTEXT_SIZE);
-// OBSOLETE if (context == 0)
-// OBSOLETE return -1;
-// OBSOLETE
-// OBSOLETE mthread->sp = context + MACHINE_CPROC_SP_OFFSET;
-// OBSOLETE
-// OBSOLETE if (mach3_read_inferior (context + MACHINE_CPROC_PC_OFFSET,
-// OBSOLETE &mthread->pc,
-// OBSOLETE sizeof (CORE_ADDR)) != sizeof (CORE_ADDR))
-// OBSOLETE {
-// OBSOLETE warning ("Can't read cproc pc from inferior");
-// OBSOLETE return -1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (mach3_read_inferior (context + MACHINE_CPROC_FP_OFFSET,
-// OBSOLETE &mthread->fp,
-// OBSOLETE sizeof (CORE_ADDR)) != sizeof (CORE_ADDR))
-// OBSOLETE {
-// OBSOLETE warning ("Can't read cproc fp from inferior");
-// OBSOLETE return -1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE #endif /* FETCH_CPROC_STATE */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE thread_list_command (void)
-// OBSOLETE {
-// OBSOLETE thread_basic_info_data_t ths;
-// OBSOLETE int thread_count;
-// OBSOLETE gdb_thread_t cprocs;
-// OBSOLETE gdb_thread_t scan;
-// OBSOLETE int index;
-// OBSOLETE char *name;
-// OBSOLETE char selected;
-// OBSOLETE char *wired;
-// OBSOLETE int infoCnt;
-// OBSOLETE kern_return_t ret;
-// OBSOLETE mach_port_t mid_or_port;
-// OBSOLETE gdb_thread_t their_threads;
-// OBSOLETE gdb_thread_t kthread;
-// OBSOLETE
-// OBSOLETE int neworder = 1;
-// OBSOLETE
-// OBSOLETE char *fmt = "There are %d kernel threads in task %d.\n";
-// OBSOLETE
-// OBSOLETE int tmid = map_port_name_to_mid (inferior_task, MACH_TYPE_TASK);
-// OBSOLETE
-// OBSOLETE MACH_ERROR_NO_INFERIOR;
-// OBSOLETE
-// OBSOLETE thread_count = fetch_thread_info (inferior_task,
-// OBSOLETE &their_threads);
-// OBSOLETE if (thread_count == -1)
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE if (thread_count == 1)
-// OBSOLETE fmt = "There is %d kernel thread in task %d.\n";
-// OBSOLETE
-// OBSOLETE printf_filtered (fmt, thread_count, tmid);
-// OBSOLETE
-// OBSOLETE puts_filtered (TL_HEADER);
-// OBSOLETE
-// OBSOLETE cprocs = get_cprocs ();
-// OBSOLETE
-// OBSOLETE map_cprocs_to_kernel_threads (cprocs, their_threads, thread_count);
-// OBSOLETE
-// OBSOLETE for (scan = cprocs; scan; scan = scan->next)
-// OBSOLETE {
-// OBSOLETE int mid;
-// OBSOLETE char buf[10];
-// OBSOLETE char slot[3];
-// OBSOLETE int cproc_state =
-// OBSOLETE extract_signed_integer
-// OBSOLETE (scan->raw_cproc + CPROC_STATE_OFFSET, CPROC_STATE_SIZE);
-// OBSOLETE
-// OBSOLETE selected = ' ';
-// OBSOLETE
-// OBSOLETE /* a wired cproc? */
-// OBSOLETE wired = (extract_address (scan->raw_cproc + CPROC_WIRED_OFFSET,
-// OBSOLETE CPROC_WIRED_SIZE)
-// OBSOLETE ? "wired" : "");
-// OBSOLETE
-// OBSOLETE if (scan->reverse_map != -1)
-// OBSOLETE kthread = (their_threads + scan->reverse_map);
-// OBSOLETE else
-// OBSOLETE kthread = NULL;
-// OBSOLETE
-// OBSOLETE if (kthread)
-// OBSOLETE {
-// OBSOLETE /* These cprocs have a kernel thread */
-// OBSOLETE
-// OBSOLETE mid = map_port_name_to_mid (kthread->name, MACH_TYPE_THREAD);
-// OBSOLETE
-// OBSOLETE infoCnt = THREAD_BASIC_INFO_COUNT;
-// OBSOLETE
-// OBSOLETE ret = thread_info (kthread->name,
-// OBSOLETE THREAD_BASIC_INFO,
-// OBSOLETE (thread_info_t) & ths,
-// OBSOLETE &infoCnt);
-// OBSOLETE
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE warning ("Unable to get basic info on thread %d : %s",
-// OBSOLETE mid,
-// OBSOLETE mach_error_string (ret));
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Who is the first to have more than 100 threads */
-// OBSOLETE sprintf (slot, "%d", kthread->slotid % 100);
-// OBSOLETE
-// OBSOLETE if (kthread->name == current_thread)
-// OBSOLETE selected = '*';
-// OBSOLETE
-// OBSOLETE if (ths.suspend_count)
-// OBSOLETE sprintf (buf, "%d", ths.suspend_count);
-// OBSOLETE else
-// OBSOLETE buf[0] = '\000';
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE if (ths.flags & TH_FLAGS_SWAPPED)
-// OBSOLETE strcat (buf, "S");
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE if (ths.flags & TH_FLAGS_IDLE)
-// OBSOLETE strcat (buf, "I");
-// OBSOLETE
-// OBSOLETE printf_filtered (TL_FORMAT,
-// OBSOLETE slot,
-// OBSOLETE mid,
-// OBSOLETE selected,
-// OBSOLETE get_thread_name (scan, kthread->slotid),
-// OBSOLETE kthread->in_emulator ? "E" : "",
-// OBSOLETE translate_state (ths.run_state),
-// OBSOLETE buf,
-// OBSOLETE translate_cstate (cproc_state),
-// OBSOLETE wired);
-// OBSOLETE print_tl_address (gdb_stdout, kthread->pc);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* These cprocs don't have a kernel thread.
-// OBSOLETE * find out the calling frame with
-// OBSOLETE * FETCH_CPROC_STATE.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE struct gdb_thread state;
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE /* jtv -> emcmanus: why do you want this here? */
-// OBSOLETE if (scan->incarnation == NULL)
-// OBSOLETE continue; /* EMcM */
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE printf_filtered (TL_FORMAT,
-// OBSOLETE "-",
-// OBSOLETE -neworder, /* Pseudo MID */
-// OBSOLETE selected,
-// OBSOLETE get_thread_name (scan, -neworder),
-// OBSOLETE "",
-// OBSOLETE "-", /* kernel state */
-// OBSOLETE "",
-// OBSOLETE translate_cstate (cproc_state),
-// OBSOLETE "");
-// OBSOLETE state.cproc = scan;
-// OBSOLETE
-// OBSOLETE if (FETCH_CPROC_STATE (&state) == -1)
-// OBSOLETE puts_filtered ("???");
-// OBSOLETE else
-// OBSOLETE print_tl_address (gdb_stdout, state.pc);
-// OBSOLETE
-// OBSOLETE neworder++;
-// OBSOLETE }
-// OBSOLETE puts_filtered ("\n");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Scan for kernel threads without cprocs */
-// OBSOLETE for (index = 0; index < thread_count; index++)
-// OBSOLETE {
-// OBSOLETE if (!their_threads[index].cproc)
-// OBSOLETE {
-// OBSOLETE int mid;
-// OBSOLETE
-// OBSOLETE char buf[10];
-// OBSOLETE char slot[3];
-// OBSOLETE
-// OBSOLETE mach_port_t name = their_threads[index].name;
-// OBSOLETE
-// OBSOLETE mid = map_port_name_to_mid (name, MACH_TYPE_THREAD);
-// OBSOLETE
-// OBSOLETE infoCnt = THREAD_BASIC_INFO_COUNT;
-// OBSOLETE
-// OBSOLETE ret = thread_info (name,
-// OBSOLETE THREAD_BASIC_INFO,
-// OBSOLETE (thread_info_t) & ths,
-// OBSOLETE &infoCnt);
-// OBSOLETE
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE warning ("Unable to get basic info on thread %d : %s",
-// OBSOLETE mid,
-// OBSOLETE mach_error_string (ret));
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE sprintf (slot, "%d", index % 100);
-// OBSOLETE
-// OBSOLETE if (name == current_thread)
-// OBSOLETE selected = '*';
-// OBSOLETE else
-// OBSOLETE selected = ' ';
-// OBSOLETE
-// OBSOLETE if (ths.suspend_count)
-// OBSOLETE sprintf (buf, "%d", ths.suspend_count);
-// OBSOLETE else
-// OBSOLETE buf[0] = '\000';
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE if (ths.flags & TH_FLAGS_SWAPPED)
-// OBSOLETE strcat (buf, "S");
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE if (ths.flags & TH_FLAGS_IDLE)
-// OBSOLETE strcat (buf, "I");
-// OBSOLETE
-// OBSOLETE printf_filtered (TL_FORMAT,
-// OBSOLETE slot,
-// OBSOLETE mid,
-// OBSOLETE selected,
-// OBSOLETE get_thread_name (NULL, index),
-// OBSOLETE their_threads[index].in_emulator ? "E" : "",
-// OBSOLETE translate_state (ths.run_state),
-// OBSOLETE buf,
-// OBSOLETE "", /* No cproc state */
-// OBSOLETE ""); /* Can't be wired */
-// OBSOLETE print_tl_address (gdb_stdout, their_threads[index].pc);
-// OBSOLETE puts_filtered ("\n");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE obstack_free (cproc_obstack, 0);
-// OBSOLETE obstack_init (cproc_obstack);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE thread_select_command (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE int mid;
-// OBSOLETE thread_array_t thread_list;
-// OBSOLETE int thread_count;
-// OBSOLETE kern_return_t ret;
-// OBSOLETE int is_slot = 0;
-// OBSOLETE
-// OBSOLETE MACH_ERROR_NO_INFERIOR;
-// OBSOLETE
-// OBSOLETE if (!args)
-// OBSOLETE error_no_arg ("MID or @SLOTNUMBER to specify a thread to select");
-// OBSOLETE
-// OBSOLETE while (*args == ' ' || *args == '\t')
-// OBSOLETE args++;
-// OBSOLETE
-// OBSOLETE if (*args == '@')
-// OBSOLETE {
-// OBSOLETE is_slot++;
-// OBSOLETE args++;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE mid = atoi (args);
-// OBSOLETE
-// OBSOLETE if (mid == 0)
-// OBSOLETE if (!is_slot || *args != '0') /* Rudimentary checks */
-// OBSOLETE error ("You must select threads by MID or @SLOTNUMBER");
-// OBSOLETE
-// OBSOLETE if (select_thread (inferior_task, mid, is_slot ? 2 : 1) != KERN_SUCCESS)
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE if (from_tty)
-// OBSOLETE printf_filtered ("Thread %d selected\n",
-// OBSOLETE is_slot ? map_port_name_to_mid (current_thread,
-// OBSOLETE MACH_TYPE_THREAD) : mid);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE thread_trace (mach_port_t thread, boolean_t set)
-// OBSOLETE {
-// OBSOLETE int flavor = TRACE_FLAVOR;
-// OBSOLETE unsigned int stateCnt = TRACE_FLAVOR_SIZE;
-// OBSOLETE kern_return_t ret;
-// OBSOLETE thread_state_data_t state;
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (thread))
-// OBSOLETE {
-// OBSOLETE warning ("thread_trace: invalid thread");
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (must_suspend_thread)
-// OBSOLETE setup_thread (thread, 1);
-// OBSOLETE
-// OBSOLETE ret = thread_get_state (thread, flavor, state, &stateCnt);
-// OBSOLETE CHK ("thread_trace: error reading thread state", ret);
-// OBSOLETE
-// OBSOLETE if (set)
-// OBSOLETE {
-// OBSOLETE TRACE_SET (thread, state);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (!TRACE_CLEAR (thread, state))
-// OBSOLETE {
-// OBSOLETE if (must_suspend_thread)
-// OBSOLETE setup_thread (thread, 0);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE ret = thread_set_state (thread, flavor, state, stateCnt);
-// OBSOLETE CHK ("thread_trace: error writing thread state", ret);
-// OBSOLETE if (must_suspend_thread)
-// OBSOLETE setup_thread (thread, 0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #ifdef FLUSH_INFERIOR_CACHE
-// OBSOLETE
-// OBSOLETE /* When over-writing code on some machines the I-Cache must be flushed
-// OBSOLETE explicitly, because it is not kept coherent by the lazy hardware.
-// OBSOLETE This definitely includes breakpoints, for instance, or else we
-// OBSOLETE end up looping in mysterious Bpt traps */
-// OBSOLETE
-// OBSOLETE flush_inferior_icache (CORE_ADDR pc, int amount)
-// OBSOLETE {
-// OBSOLETE vm_machine_attribute_val_t flush = MATTR_VAL_ICACHE_FLUSH;
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE ret = vm_machine_attribute (inferior_task,
-// OBSOLETE pc,
-// OBSOLETE amount,
-// OBSOLETE MATTR_CACHE,
-// OBSOLETE &flush);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE warning ("Error flushing inferior's cache : %s",
-// OBSOLETE mach_error_string (ret));
-// OBSOLETE }
-// OBSOLETE #endif /* FLUSH_INFERIOR_CACHE */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE static
-// OBSOLETE suspend_all_threads (int from_tty)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE thread_array_t thread_list;
-// OBSOLETE int thread_count, index;
-// OBSOLETE int infoCnt;
-// OBSOLETE thread_basic_info_data_t th_info;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE ret = task_threads (inferior_task, &thread_list, &thread_count);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE warning ("Could not suspend inferior threads.");
-// OBSOLETE m3_kill_inferior ();
-// OBSOLETE throw_exception (RETURN_ERROR);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE for (index = 0; index < thread_count; index++)
-// OBSOLETE {
-// OBSOLETE int mid;
-// OBSOLETE
-// OBSOLETE mid = map_port_name_to_mid (thread_list[index],
-// OBSOLETE MACH_TYPE_THREAD);
-// OBSOLETE
-// OBSOLETE ret = thread_suspend (thread_list[index]);
-// OBSOLETE
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE warning ("Error trying to suspend thread %d : %s",
-// OBSOLETE mid, mach_error_string (ret));
-// OBSOLETE
-// OBSOLETE if (from_tty)
-// OBSOLETE {
-// OBSOLETE infoCnt = THREAD_BASIC_INFO_COUNT;
-// OBSOLETE ret = thread_info (thread_list[index],
-// OBSOLETE THREAD_BASIC_INFO,
-// OBSOLETE (thread_info_t) & th_info,
-// OBSOLETE &infoCnt);
-// OBSOLETE CHK ("suspend can't get thread info", ret);
-// OBSOLETE
-// OBSOLETE warning ("Thread %d suspend count is %d",
-// OBSOLETE mid, th_info.suspend_count);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE consume_send_rights (thread_list, thread_count);
-// OBSOLETE ret = vm_deallocate (mach_task_self (),
-// OBSOLETE (vm_address_t) thread_list,
-// OBSOLETE (thread_count * sizeof (int)));
-// OBSOLETE CHK ("Error trying to deallocate thread list", ret);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE thread_suspend_command (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE int mid;
-// OBSOLETE mach_port_t saved_thread;
-// OBSOLETE int infoCnt;
-// OBSOLETE thread_basic_info_data_t th_info;
-// OBSOLETE
-// OBSOLETE MACH_ERROR_NO_INFERIOR;
-// OBSOLETE
-// OBSOLETE if (!strcasecmp (args, "all"))
-// OBSOLETE {
-// OBSOLETE suspend_all_threads (from_tty);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE saved_thread = current_thread;
-// OBSOLETE
-// OBSOLETE mid = parse_thread_id (args, 0, 0);
-// OBSOLETE
-// OBSOLETE if (mid < 0)
-// OBSOLETE error ("You can suspend only existing kernel threads with MID or @SLOTNUMBER");
-// OBSOLETE
-// OBSOLETE if (mid == 0)
-// OBSOLETE mid = map_port_name_to_mid (current_thread, MACH_TYPE_THREAD);
-// OBSOLETE else if (select_thread (inferior_task, mid, 0) != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE if (current_thread)
-// OBSOLETE current_thread = saved_thread;
-// OBSOLETE error ("Could not select thread %d", mid);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE ret = thread_suspend (current_thread);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE warning ("thread_suspend failed : %s",
-// OBSOLETE mach_error_string (ret));
-// OBSOLETE
-// OBSOLETE infoCnt = THREAD_BASIC_INFO_COUNT;
-// OBSOLETE ret = thread_info (current_thread,
-// OBSOLETE THREAD_BASIC_INFO,
-// OBSOLETE (thread_info_t) & th_info,
-// OBSOLETE &infoCnt);
-// OBSOLETE CHK ("suspend can't get thread info", ret);
-// OBSOLETE
-// OBSOLETE warning ("Thread %d suspend count is %d", mid, th_info.suspend_count);
-// OBSOLETE
-// OBSOLETE current_thread = saved_thread;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE resume_all_threads (int from_tty)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE thread_array_t thread_list;
-// OBSOLETE int thread_count, index;
-// OBSOLETE int mid;
-// OBSOLETE int infoCnt;
-// OBSOLETE thread_basic_info_data_t th_info;
-// OBSOLETE
-// OBSOLETE ret = task_threads (inferior_task, &thread_list, &thread_count);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE m3_kill_inferior ();
-// OBSOLETE error ("task_threads", mach_error_string (ret));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE for (index = 0; index < thread_count; index++)
-// OBSOLETE {
-// OBSOLETE infoCnt = THREAD_BASIC_INFO_COUNT;
-// OBSOLETE ret = thread_info (thread_list[index],
-// OBSOLETE THREAD_BASIC_INFO,
-// OBSOLETE (thread_info_t) & th_info,
-// OBSOLETE &infoCnt);
-// OBSOLETE CHK ("resume_all can't get thread info", ret);
-// OBSOLETE
-// OBSOLETE mid = map_port_name_to_mid (thread_list[index],
-// OBSOLETE MACH_TYPE_THREAD);
-// OBSOLETE
-// OBSOLETE if (!th_info.suspend_count)
-// OBSOLETE {
-// OBSOLETE if (mid != -1 && from_tty)
-// OBSOLETE warning ("Thread %d is not suspended", mid);
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE ret = thread_resume (thread_list[index]);
-// OBSOLETE
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE warning ("Error trying to resume thread %d : %s",
-// OBSOLETE mid, mach_error_string (ret));
-// OBSOLETE else if (mid != -1 && from_tty)
-// OBSOLETE warning ("Thread %d suspend count is %d",
-// OBSOLETE mid, --th_info.suspend_count);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE consume_send_rights (thread_list, thread_count);
-// OBSOLETE ret = vm_deallocate (mach_task_self (),
-// OBSOLETE (vm_address_t) thread_list,
-// OBSOLETE (thread_count * sizeof (int)));
-// OBSOLETE CHK ("Error trying to deallocate thread list", ret);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE thread_resume_command (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE int mid;
-// OBSOLETE mach_port_t saved_thread;
-// OBSOLETE kern_return_t ret;
-// OBSOLETE thread_basic_info_data_t th_info;
-// OBSOLETE int infoCnt = THREAD_BASIC_INFO_COUNT;
-// OBSOLETE
-// OBSOLETE MACH_ERROR_NO_INFERIOR;
-// OBSOLETE
-// OBSOLETE if (!strcasecmp (args, "all"))
-// OBSOLETE {
-// OBSOLETE resume_all_threads (from_tty);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE saved_thread = current_thread;
-// OBSOLETE
-// OBSOLETE mid = parse_thread_id (args, 0, 0);
-// OBSOLETE
-// OBSOLETE if (mid < 0)
-// OBSOLETE error ("You can resume only existing kernel threads with MID or @SLOTNUMBER");
-// OBSOLETE
-// OBSOLETE if (mid == 0)
-// OBSOLETE mid = map_port_name_to_mid (current_thread, MACH_TYPE_THREAD);
-// OBSOLETE else if (select_thread (inferior_task, mid, 0) != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE if (current_thread)
-// OBSOLETE current_thread = saved_thread;
-// OBSOLETE throw_exception (RETURN_ERROR);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE ret = thread_info (current_thread,
-// OBSOLETE THREAD_BASIC_INFO,
-// OBSOLETE (thread_info_t) & th_info,
-// OBSOLETE &infoCnt);
-// OBSOLETE CHK ("resume can't get thread info", ret);
-// OBSOLETE
-// OBSOLETE if (!th_info.suspend_count)
-// OBSOLETE {
-// OBSOLETE warning ("Thread %d is not suspended", mid);
-// OBSOLETE goto out;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE ret = thread_resume (current_thread);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE warning ("thread_resume failed : %s",
-// OBSOLETE mach_error_string (ret));
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE th_info.suspend_count--;
-// OBSOLETE warning ("Thread %d suspend count is %d", mid, th_info.suspend_count);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE out:
-// OBSOLETE current_thread = saved_thread;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE thread_kill_command (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE int mid;
-// OBSOLETE kern_return_t ret;
-// OBSOLETE int thread_count;
-// OBSOLETE thread_array_t thread_table;
-// OBSOLETE int index;
-// OBSOLETE mach_port_t thread_to_kill = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE MACH_ERROR_NO_INFERIOR;
-// OBSOLETE
-// OBSOLETE if (!args)
-// OBSOLETE error_no_arg ("thread mid to kill from the inferior task");
-// OBSOLETE
-// OBSOLETE mid = parse_thread_id (args, 0, 0);
-// OBSOLETE
-// OBSOLETE if (mid < 0)
-// OBSOLETE error ("You can kill only existing kernel threads with MID or @SLOTNUMBER");
-// OBSOLETE
-// OBSOLETE if (mid)
-// OBSOLETE {
-// OBSOLETE ret = machid_mach_port (mid_server, mid_auth, mid, &thread_to_kill);
-// OBSOLETE CHK ("thread_kill_command: machid_mach_port map failed", ret);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE mid = map_port_name_to_mid (current_thread, MACH_TYPE_THREAD);
-// OBSOLETE
-// OBSOLETE /* Don't allow gdb to kill *any* thread in the system. Use mkill program for that */
-// OBSOLETE ret = task_threads (inferior_task, &thread_table, &thread_count);
-// OBSOLETE CHK ("Error getting inferior's thread list", ret);
-// OBSOLETE
-// OBSOLETE if (thread_to_kill == current_thread)
-// OBSOLETE {
-// OBSOLETE ret = thread_terminate (thread_to_kill);
-// OBSOLETE CHK ("Thread could not be terminated", ret);
-// OBSOLETE
-// OBSOLETE if (select_thread (inferior_task, 0, 1) != KERN_SUCCESS)
-// OBSOLETE warning ("Last thread was killed, use \"kill\" command to kill task");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE for (index = 0; index < thread_count; index++)
-// OBSOLETE if (thread_table[index] == thread_to_kill)
-// OBSOLETE {
-// OBSOLETE ret = thread_terminate (thread_to_kill);
-// OBSOLETE CHK ("Thread could not be terminated", ret);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (thread_count > 1)
-// OBSOLETE consume_send_rights (thread_table, thread_count);
-// OBSOLETE
-// OBSOLETE ret = vm_deallocate (mach_task_self (), (vm_address_t) thread_table,
-// OBSOLETE (thread_count * sizeof (mach_port_t)));
-// OBSOLETE CHK ("Error trying to deallocate thread list", ret);
-// OBSOLETE
-// OBSOLETE warning ("Thread %d killed", mid);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Task specific commands; add more if you like */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE task_resume_command (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE task_basic_info_data_t ta_info;
-// OBSOLETE int infoCnt = TASK_BASIC_INFO_COUNT;
-// OBSOLETE int mid = map_port_name_to_mid (inferior_task, MACH_TYPE_TASK);
-// OBSOLETE
-// OBSOLETE MACH_ERROR_NO_INFERIOR;
-// OBSOLETE
-// OBSOLETE /* Would be trivial to change, but is it desirable? */
-// OBSOLETE if (args)
-// OBSOLETE error ("Currently gdb can resume only it's inferior task");
-// OBSOLETE
-// OBSOLETE ret = task_info (inferior_task,
-// OBSOLETE TASK_BASIC_INFO,
-// OBSOLETE (task_info_t) & ta_info,
-// OBSOLETE &infoCnt);
-// OBSOLETE CHK ("task_resume_command: task_info failed", ret);
-// OBSOLETE
-// OBSOLETE if (ta_info.suspend_count == 0)
-// OBSOLETE error ("Inferior task %d is not suspended", mid);
-// OBSOLETE else if (ta_info.suspend_count == 1 &&
-// OBSOLETE from_tty &&
-// OBSOLETE !query ("Suspend count is now 1. Do you know what you are doing? "))
-// OBSOLETE error ("Task not resumed");
-// OBSOLETE
-// OBSOLETE ret = task_resume (inferior_task);
-// OBSOLETE CHK ("task_resume_command: task_resume", ret);
-// OBSOLETE
-// OBSOLETE if (ta_info.suspend_count == 1)
-// OBSOLETE {
-// OBSOLETE warning ("Inferior task %d is no longer suspended", mid);
-// OBSOLETE must_suspend_thread = 1;
-// OBSOLETE /* @@ This is not complete: Registers change all the time when not
-// OBSOLETE suspended! */
-// OBSOLETE registers_changed ();
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE warning ("Inferior task %d suspend count is now %d",
-// OBSOLETE mid, ta_info.suspend_count - 1);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE task_suspend_command (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE task_basic_info_data_t ta_info;
-// OBSOLETE int infoCnt = TASK_BASIC_INFO_COUNT;
-// OBSOLETE int mid = map_port_name_to_mid (inferior_task, MACH_TYPE_TASK);
-// OBSOLETE
-// OBSOLETE MACH_ERROR_NO_INFERIOR;
-// OBSOLETE
-// OBSOLETE /* Would be trivial to change, but is it desirable? */
-// OBSOLETE if (args)
-// OBSOLETE error ("Currently gdb can suspend only it's inferior task");
-// OBSOLETE
-// OBSOLETE ret = task_suspend (inferior_task);
-// OBSOLETE CHK ("task_suspend_command: task_suspend", ret);
-// OBSOLETE
-// OBSOLETE must_suspend_thread = 0;
-// OBSOLETE
-// OBSOLETE ret = task_info (inferior_task,
-// OBSOLETE TASK_BASIC_INFO,
-// OBSOLETE (task_info_t) & ta_info,
-// OBSOLETE &infoCnt);
-// OBSOLETE CHK ("task_suspend_command: task_info failed", ret);
-// OBSOLETE
-// OBSOLETE warning ("Inferior task %d suspend count is now %d",
-// OBSOLETE mid, ta_info.suspend_count);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static char *
-// OBSOLETE get_size (int bytes)
-// OBSOLETE {
-// OBSOLETE static char size[30];
-// OBSOLETE int zz = bytes / 1024;
-// OBSOLETE
-// OBSOLETE if (zz / 1024)
-// OBSOLETE sprintf (size, "%-2.1f M", ((float) bytes) / (1024.0 * 1024.0));
-// OBSOLETE else
-// OBSOLETE sprintf (size, "%d K", zz);
-// OBSOLETE
-// OBSOLETE return size;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Does this require the target task to be suspended?? I don't think so. */
-// OBSOLETE void
-// OBSOLETE task_info_command (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE int mid = -5;
-// OBSOLETE mach_port_t task;
-// OBSOLETE kern_return_t ret;
-// OBSOLETE task_basic_info_data_t ta_info;
-// OBSOLETE int infoCnt = TASK_BASIC_INFO_COUNT;
-// OBSOLETE int page_size = round_page (1);
-// OBSOLETE int thread_count = 0;
-// OBSOLETE
-// OBSOLETE if (MACH_PORT_VALID (inferior_task))
-// OBSOLETE mid = map_port_name_to_mid (inferior_task,
-// OBSOLETE MACH_TYPE_TASK);
-// OBSOLETE
-// OBSOLETE task = inferior_task;
-// OBSOLETE
-// OBSOLETE if (args)
-// OBSOLETE {
-// OBSOLETE int tmid = atoi (args);
-// OBSOLETE
-// OBSOLETE if (tmid <= 0)
-// OBSOLETE error ("Invalid mid %d for task info", tmid);
-// OBSOLETE
-// OBSOLETE if (tmid != mid)
-// OBSOLETE {
-// OBSOLETE mid = tmid;
-// OBSOLETE ret = machid_mach_port (mid_server, mid_auth, tmid, &task);
-// OBSOLETE CHK ("task_info_command: machid_mach_port map failed", ret);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (mid < 0)
-// OBSOLETE error ("You have to give the task MID as an argument");
-// OBSOLETE
-// OBSOLETE ret = task_info (task,
-// OBSOLETE TASK_BASIC_INFO,
-// OBSOLETE (task_info_t) & ta_info,
-// OBSOLETE &infoCnt);
-// OBSOLETE CHK ("task_info_command: task_info failed", ret);
-// OBSOLETE
-// OBSOLETE printf_filtered ("\nTask info for task %d:\n\n", mid);
-// OBSOLETE printf_filtered (" Suspend count : %d\n", ta_info.suspend_count);
-// OBSOLETE printf_filtered (" Base priority : %d\n", ta_info.base_priority);
-// OBSOLETE printf_filtered (" Virtual size : %s\n", get_size (ta_info.virtual_size));
-// OBSOLETE printf_filtered (" Resident size : %s\n", get_size (ta_info.resident_size));
-// OBSOLETE
-// OBSOLETE {
-// OBSOLETE thread_array_t thread_list;
-// OBSOLETE
-// OBSOLETE ret = task_threads (task, &thread_list, &thread_count);
-// OBSOLETE CHK ("task_info_command: task_threads", ret);
-// OBSOLETE
-// OBSOLETE printf_filtered (" Thread count : %d\n", thread_count);
-// OBSOLETE
-// OBSOLETE consume_send_rights (thread_list, thread_count);
-// OBSOLETE ret = vm_deallocate (mach_task_self (),
-// OBSOLETE (vm_address_t) thread_list,
-// OBSOLETE (thread_count * sizeof (int)));
-// OBSOLETE CHK ("Error trying to deallocate thread list", ret);
-// OBSOLETE }
-// OBSOLETE if (have_emulator_p (task))
-// OBSOLETE printf_filtered (" Emulator at : 0x%x..0x%x\n",
-// OBSOLETE EMULATOR_BASE, EMULATOR_END);
-// OBSOLETE else
-// OBSOLETE printf_filtered (" No emulator.\n");
-// OBSOLETE
-// OBSOLETE if (thread_count && task == inferior_task)
-// OBSOLETE printf_filtered ("\nUse the \"thread list\" command to see the threads\n");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* You may either FORWARD the exception to the inferior, or KEEP
-// OBSOLETE * it and return to GDB command level.
-// OBSOLETE *
-// OBSOLETE * exception mid [ forward | keep ]
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE exception_command (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE char *scan = args;
-// OBSOLETE int exception;
-// OBSOLETE int len;
-// OBSOLETE
-// OBSOLETE if (!args)
-// OBSOLETE error_no_arg ("exception number action");
-// OBSOLETE
-// OBSOLETE while (*scan == ' ' || *scan == '\t')
-// OBSOLETE scan++;
-// OBSOLETE
-// OBSOLETE if ('0' <= *scan && *scan <= '9')
-// OBSOLETE while ('0' <= *scan && *scan <= '9')
-// OBSOLETE scan++;
-// OBSOLETE else
-// OBSOLETE error ("exception number action");
-// OBSOLETE
-// OBSOLETE exception = atoi (args);
-// OBSOLETE if (exception <= 0 || exception > MAX_EXCEPTION)
-// OBSOLETE error ("Allowed exception numbers are in range 1..%d",
-// OBSOLETE MAX_EXCEPTION);
-// OBSOLETE
-// OBSOLETE if (*scan != ' ' && *scan != '\t')
-// OBSOLETE error ("exception number must be followed by a space");
-// OBSOLETE else
-// OBSOLETE while (*scan == ' ' || *scan == '\t')
-// OBSOLETE scan++;
-// OBSOLETE
-// OBSOLETE args = scan;
-// OBSOLETE len = 0;
-// OBSOLETE while (*scan)
-// OBSOLETE {
-// OBSOLETE len++;
-// OBSOLETE scan++;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (!len)
-// OBSOLETE error ("exception number action");
-// OBSOLETE
-// OBSOLETE if (!strncasecmp (args, "forward", len))
-// OBSOLETE exception_map[exception].forward = TRUE;
-// OBSOLETE else if (!strncasecmp (args, "keep", len))
-// OBSOLETE exception_map[exception].forward = FALSE;
-// OBSOLETE else
-// OBSOLETE error ("exception action is either \"keep\" or \"forward\"");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE print_exception_info (int exception)
-// OBSOLETE {
-// OBSOLETE boolean_t forward = exception_map[exception].forward;
-// OBSOLETE
-// OBSOLETE printf_filtered ("%s\t(%d): ", exception_map[exception].name,
-// OBSOLETE exception);
-// OBSOLETE if (!forward)
-// OBSOLETE if (exception_map[exception].sigmap != SIG_UNKNOWN)
-// OBSOLETE printf_filtered ("keep and handle as signal %d\n",
-// OBSOLETE exception_map[exception].sigmap);
-// OBSOLETE else
-// OBSOLETE printf_filtered ("keep and handle as unknown signal %d\n",
-// OBSOLETE exception_map[exception].sigmap);
-// OBSOLETE else
-// OBSOLETE printf_filtered ("forward exception to inferior\n");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE exception_info (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE int exception;
-// OBSOLETE
-// OBSOLETE if (!args)
-// OBSOLETE for (exception = 1; exception <= MAX_EXCEPTION; exception++)
-// OBSOLETE print_exception_info (exception);
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE exception = atoi (args);
-// OBSOLETE
-// OBSOLETE if (exception <= 0 || exception > MAX_EXCEPTION)
-// OBSOLETE error ("Invalid exception number, values from 1 to %d allowed",
-// OBSOLETE MAX_EXCEPTION);
-// OBSOLETE print_exception_info (exception);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Check for actions for mach exceptions.
-// OBSOLETE */
-// OBSOLETE mach3_exception_actions (WAITTYPE *w, boolean_t force_print_only, char *who)
-// OBSOLETE {
-// OBSOLETE boolean_t force_print = FALSE;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE if (force_print_only ||
-// OBSOLETE exception_map[stop_exception].sigmap == SIG_UNKNOWN)
-// OBSOLETE force_print = TRUE;
-// OBSOLETE else
-// OBSOLETE WSETSTOP (*w, exception_map[stop_exception].sigmap);
-// OBSOLETE
-// OBSOLETE if (exception_map[stop_exception].print || force_print)
-// OBSOLETE {
-// OBSOLETE target_terminal_ours ();
-// OBSOLETE
-// OBSOLETE printf_filtered ("\n%s received %s exception : ",
-// OBSOLETE who,
-// OBSOLETE exception_map[stop_exception].name);
-// OBSOLETE
-// OBSOLETE wrap_here (" ");
-// OBSOLETE
-// OBSOLETE switch (stop_exception)
-// OBSOLETE {
-// OBSOLETE case EXC_BAD_ACCESS:
-// OBSOLETE printf_filtered ("referencing address 0x%x : %s\n",
-// OBSOLETE stop_subcode,
-// OBSOLETE mach_error_string (stop_code));
-// OBSOLETE break;
-// OBSOLETE case EXC_BAD_INSTRUCTION:
-// OBSOLETE printf_filtered
-// OBSOLETE ("illegal or undefined instruction. code %d subcode %d\n",
-// OBSOLETE stop_code, stop_subcode);
-// OBSOLETE break;
-// OBSOLETE case EXC_ARITHMETIC:
-// OBSOLETE printf_filtered ("code %d\n", stop_code);
-// OBSOLETE break;
-// OBSOLETE case EXC_EMULATION:
-// OBSOLETE printf_filtered ("code %d subcode %d\n", stop_code, stop_subcode);
-// OBSOLETE break;
-// OBSOLETE case EXC_SOFTWARE:
-// OBSOLETE printf_filtered ("%s specific, code 0x%x\n",
-// OBSOLETE stop_code < 0xffff ? "hardware" : "os emulation",
-// OBSOLETE stop_code);
-// OBSOLETE break;
-// OBSOLETE case EXC_BREAKPOINT:
-// OBSOLETE printf_filtered ("type %d (machine dependent)\n",
-// OBSOLETE stop_code);
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "Unknown exception");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE setup_notify_port (int create_new)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE if (MACH_PORT_VALID (our_notify_port))
-// OBSOLETE {
-// OBSOLETE ret = mach_port_destroy (mach_task_self (), our_notify_port);
-// OBSOLETE CHK ("Could not destroy our_notify_port", ret);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE our_notify_port = MACH_PORT_NULL;
-// OBSOLETE notify_chain = (port_chain_t) NULL;
-// OBSOLETE port_chain_destroy (port_chain_obstack);
-// OBSOLETE
-// OBSOLETE if (create_new)
-// OBSOLETE {
-// OBSOLETE ret = mach_port_allocate (mach_task_self (),
-// OBSOLETE MACH_PORT_RIGHT_RECEIVE,
-// OBSOLETE &our_notify_port);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "Creating notify port %s", mach_error_string (ret));
-// OBSOLETE
-// OBSOLETE ret = mach_port_move_member (mach_task_self (),
-// OBSOLETE our_notify_port,
-// OBSOLETE inferior_wait_port_set);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "initial move member %s", mach_error_string (ret));
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Register our message port to the net name server
-// OBSOLETE *
-// OBSOLETE * Currently used only by the external stop-gdb program
-// OBSOLETE * since ^C does not work if you would like to enter
-// OBSOLETE * gdb command level while debugging your program.
-// OBSOLETE *
-// OBSOLETE * NOTE: If the message port is sometimes used for other
-// OBSOLETE * purposes also, the NAME must not be a guessable one.
-// OBSOLETE * Then, there should be a way to change it.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE char registered_name[MAX_NAME_LEN];
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE message_port_info (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE if (registered_name[0])
-// OBSOLETE printf_filtered ("gdb's message port name: '%s'\n",
-// OBSOLETE registered_name);
-// OBSOLETE else
-// OBSOLETE printf_filtered ("gdb's message port is not currently registered\n");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE gdb_register_port (char *name, mach_port_t port)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE static int already_signed = 0;
-// OBSOLETE int len;
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (port) || !name || !*name)
-// OBSOLETE {
-// OBSOLETE warning ("Invalid registration request");
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (!already_signed)
-// OBSOLETE {
-// OBSOLETE ret = mach_port_insert_right (mach_task_self (),
-// OBSOLETE our_message_port,
-// OBSOLETE our_message_port,
-// OBSOLETE MACH_MSG_TYPE_MAKE_SEND);
-// OBSOLETE CHK ("Failed to create a signature to our_message_port", ret);
-// OBSOLETE already_signed = 1;
-// OBSOLETE }
-// OBSOLETE else if (already_signed > 1)
-// OBSOLETE {
-// OBSOLETE ret = netname_check_out (name_server_port,
-// OBSOLETE registered_name,
-// OBSOLETE our_message_port);
-// OBSOLETE CHK ("Failed to check out gdb's message port", ret);
-// OBSOLETE registered_name[0] = '\000';
-// OBSOLETE already_signed = 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE ret = netname_check_in (name_server_port, /* Name server port */
-// OBSOLETE name, /* Name of service */
-// OBSOLETE our_message_port, /* Signature */
-// OBSOLETE port); /* Creates a new send right */
-// OBSOLETE CHK ("Failed to check in the port", ret);
-// OBSOLETE
-// OBSOLETE len = 0;
-// OBSOLETE while (len < MAX_NAME_LEN && *(name + len))
-// OBSOLETE {
-// OBSOLETE registered_name[len] = *(name + len);
-// OBSOLETE len++;
-// OBSOLETE }
-// OBSOLETE registered_name[len] = '\000';
-// OBSOLETE already_signed = 2;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE struct cmd_list_element *cmd_thread_list;
-// OBSOLETE struct cmd_list_element *cmd_task_list;
-// OBSOLETE
-// OBSOLETE /*ARGSUSED */
-// OBSOLETE static void
-// OBSOLETE thread_command (char *arg, int from_tty)
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("\"thread\" must be followed by the name of a thread command.\n");
-// OBSOLETE help_list (cmd_thread_list, "thread ", -1, gdb_stdout);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*ARGSUSED */
-// OBSOLETE static void
-// OBSOLETE task_command (char *arg, int from_tty)
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("\"task\" must be followed by the name of a task command.\n");
-// OBSOLETE help_list (cmd_task_list, "task ", -1, gdb_stdout);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE add_mach_specific_commands (void)
-// OBSOLETE {
-// OBSOLETE /* Thread handling commands */
-// OBSOLETE
-// OBSOLETE /* FIXME: Move our thread support into the generic thread.c stuff so we
-// OBSOLETE can share that code. */
-// OBSOLETE add_prefix_cmd ("mthread", class_stack, thread_command,
-// OBSOLETE "Generic command for handling Mach threads in the debugged task.",
-// OBSOLETE &cmd_thread_list, "thread ", 0, &cmdlist);
-// OBSOLETE
-// OBSOLETE add_com_alias ("th", "mthread", class_stack, 1);
-// OBSOLETE
-// OBSOLETE add_cmd ("select", class_stack, thread_select_command,
-// OBSOLETE "Select and print MID of the selected thread",
-// OBSOLETE &cmd_thread_list);
-// OBSOLETE add_cmd ("list", class_stack, thread_list_command,
-// OBSOLETE "List info of task's threads. Selected thread is marked with '*'",
-// OBSOLETE &cmd_thread_list);
-// OBSOLETE add_cmd ("suspend", class_run, thread_suspend_command,
-// OBSOLETE "Suspend one or all of the threads in the selected task.",
-// OBSOLETE &cmd_thread_list);
-// OBSOLETE add_cmd ("resume", class_run, thread_resume_command,
-// OBSOLETE "Resume one or all of the threads in the selected task.",
-// OBSOLETE &cmd_thread_list);
-// OBSOLETE add_cmd ("kill", class_run, thread_kill_command,
-// OBSOLETE "Kill the specified thread MID from inferior task.",
-// OBSOLETE &cmd_thread_list);
-// OBSOLETE #if 0
-// OBSOLETE /* The rest of this support (condition_thread) was not merged. It probably
-// OBSOLETE should not be merged in this form, but instead added to the generic GDB
-// OBSOLETE thread support. */
-// OBSOLETE add_cmd ("break", class_breakpoint, condition_thread,
-// OBSOLETE "Breakpoint N will only be effective for thread MID or @SLOT\n\
-// OBSOLETE If MID/@SLOT is omitted allow all threads to break at breakpoint",
-// OBSOLETE &cmd_thread_list);
-// OBSOLETE #endif
-// OBSOLETE /* Thread command shorthands (for backward compatibility) */
-// OBSOLETE add_alias_cmd ("ts", "mthread select", 0, 0, &cmdlist);
-// OBSOLETE add_alias_cmd ("tl", "mthread list", 0, 0, &cmdlist);
-// OBSOLETE
-// OBSOLETE /* task handling commands */
-// OBSOLETE
-// OBSOLETE add_prefix_cmd ("task", class_stack, task_command,
-// OBSOLETE "Generic command for handling debugged task.",
-// OBSOLETE &cmd_task_list, "task ", 0, &cmdlist);
-// OBSOLETE
-// OBSOLETE add_com_alias ("ta", "task", class_stack, 1);
-// OBSOLETE
-// OBSOLETE add_cmd ("suspend", class_run, task_suspend_command,
-// OBSOLETE "Suspend the inferior task.",
-// OBSOLETE &cmd_task_list);
-// OBSOLETE add_cmd ("resume", class_run, task_resume_command,
-// OBSOLETE "Resume the inferior task.",
-// OBSOLETE &cmd_task_list);
-// OBSOLETE add_cmd ("info", no_class, task_info_command,
-// OBSOLETE "Print information about the specified task.",
-// OBSOLETE &cmd_task_list);
-// OBSOLETE
-// OBSOLETE /* Print my message port name */
-// OBSOLETE
-// OBSOLETE add_info ("message-port", message_port_info,
-// OBSOLETE "Returns the name of gdb's message port in the netnameserver");
-// OBSOLETE
-// OBSOLETE /* Exception commands */
-// OBSOLETE
-// OBSOLETE add_info ("exceptions", exception_info,
-// OBSOLETE "What debugger does when program gets various exceptions.\n\
-// OBSOLETE Specify an exception number as argument to print info on that\n\
-// OBSOLETE exception only.");
-// OBSOLETE
-// OBSOLETE add_com ("exception", class_run, exception_command,
-// OBSOLETE "Specify how to handle an exception.\n\
-// OBSOLETE Args are exception number followed by \"forward\" or \"keep\".\n\
-// OBSOLETE `Forward' means forward the exception to the program's normal exception\n\
-// OBSOLETE handler.\n\
-// OBSOLETE `Keep' means reenter debugger if this exception happens, and GDB maps\n\
-// OBSOLETE the exception to some signal (see info exception)\n\
-// OBSOLETE Normally \"keep\" is used to return to GDB on exception.");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE kern_return_t
-// OBSOLETE do_mach_notify_dead_name (mach_port_t notify, mach_port_t name)
-// OBSOLETE {
-// OBSOLETE kern_return_t kr = KERN_SUCCESS;
-// OBSOLETE
-// OBSOLETE /* Find the thing that notified */
-// OBSOLETE port_chain_t element = port_chain_member (notify_chain, name);
-// OBSOLETE
-// OBSOLETE /* Take name of from unreceived dead name notification list */
-// OBSOLETE notify_chain = port_chain_delete (notify_chain, name);
-// OBSOLETE
-// OBSOLETE if (!element)
-// OBSOLETE error ("Received a dead name notify from unchained port (0x%x)", name);
-// OBSOLETE
-// OBSOLETE switch (element->type)
-// OBSOLETE {
-// OBSOLETE
-// OBSOLETE case MACH_TYPE_THREAD:
-// OBSOLETE target_terminal_ours_for_output ();
-// OBSOLETE if (name == current_thread)
-// OBSOLETE {
-// OBSOLETE printf_filtered ("\nCurrent thread %d died", element->mid);
-// OBSOLETE current_thread = MACH_PORT_NULL;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE printf_filtered ("\nThread %d died", element->mid);
-// OBSOLETE
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case MACH_TYPE_TASK:
-// OBSOLETE target_terminal_ours_for_output ();
-// OBSOLETE if (name != inferior_task)
-// OBSOLETE printf_filtered ("Task %d died, but it was not the selected task",
-// OBSOLETE element->mid);
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE printf_filtered ("Current task %d died", element->mid);
-// OBSOLETE
-// OBSOLETE mach_port_destroy (mach_task_self (), name);
-// OBSOLETE inferior_task = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE if (notify_chain)
-// OBSOLETE warning ("There were still unreceived dead_name_notifications???");
-// OBSOLETE
-// OBSOLETE /* Destroy the old notifications */
-// OBSOLETE setup_notify_port (0);
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE default:
-// OBSOLETE error ("Unregistered dead_name 0x%x notification received. Type is %d, mid is 0x%x",
-// OBSOLETE name, element->type, element->mid);
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return KERN_SUCCESS;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE kern_return_t
-// OBSOLETE do_mach_notify_msg_accepted (mach_port_t notify, mach_port_t name)
-// OBSOLETE {
-// OBSOLETE warning ("do_mach_notify_msg_accepted : notify %x, name %x",
-// OBSOLETE notify, name);
-// OBSOLETE return KERN_SUCCESS;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE kern_return_t
-// OBSOLETE do_mach_notify_no_senders (mach_port_t notify, mach_port_mscount_t mscount)
-// OBSOLETE {
-// OBSOLETE warning ("do_mach_notify_no_senders : notify %x, mscount %x",
-// OBSOLETE notify, mscount);
-// OBSOLETE return KERN_SUCCESS;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE kern_return_t
-// OBSOLETE do_mach_notify_port_deleted (mach_port_t notify, mach_port_t name)
-// OBSOLETE {
-// OBSOLETE warning ("do_mach_notify_port_deleted : notify %x, name %x",
-// OBSOLETE notify, name);
-// OBSOLETE return KERN_SUCCESS;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE kern_return_t
-// OBSOLETE do_mach_notify_port_destroyed (mach_port_t notify, mach_port_t rights)
-// OBSOLETE {
-// OBSOLETE warning ("do_mach_notify_port_destroyed : notify %x, rights %x",
-// OBSOLETE notify, rights);
-// OBSOLETE return KERN_SUCCESS;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE kern_return_t
-// OBSOLETE do_mach_notify_send_once (mach_port_t notify)
-// OBSOLETE {
-// OBSOLETE #ifdef DUMP_SYSCALL
-// OBSOLETE /* MANY of these are generated. */
-// OBSOLETE warning ("do_mach_notify_send_once : notify %x",
-// OBSOLETE notify);
-// OBSOLETE #endif
-// OBSOLETE return KERN_SUCCESS;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Kills the inferior. It's gone when you call this */
-// OBSOLETE static void
-// OBSOLETE kill_inferior_fast (void)
-// OBSOLETE {
-// OBSOLETE WAITTYPE w;
-// OBSOLETE
-// OBSOLETE if (PIDGET (inferior_ptid) == 0 || PIDGET (inferior_ptid) == 1)
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE /* kill() it, since the Unix server does not otherwise notice when
-// OBSOLETE * killed with task_terminate().
-// OBSOLETE */
-// OBSOLETE if (PIDGET (inferior_ptid) > 0)
-// OBSOLETE kill (PIDGET (inferior_ptid), SIGKILL);
-// OBSOLETE
-// OBSOLETE /* It's propably terminate already */
-// OBSOLETE (void) task_terminate (inferior_task);
-// OBSOLETE
-// OBSOLETE inferior_task = MACH_PORT_NULL;
-// OBSOLETE current_thread = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE wait3 (&w, WNOHANG, 0);
-// OBSOLETE
-// OBSOLETE setup_notify_port (0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE m3_kill_inferior (void)
-// OBSOLETE {
-// OBSOLETE kill_inferior_fast ();
-// OBSOLETE target_mourn_inferior ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Clean up after the inferior dies. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE m3_mourn_inferior (void)
-// OBSOLETE {
-// OBSOLETE unpush_target (&m3_ops);
-// OBSOLETE generic_mourn_inferior ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Fork an inferior process, and start debugging it. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE m3_create_inferior (char *exec_file, char *allargs, char **env)
-// OBSOLETE {
-// OBSOLETE fork_inferior (exec_file, allargs, env, m3_trace_me, m3_trace_him, NULL, NULL);
-// OBSOLETE /* We are at the first instruction we care about. */
-// OBSOLETE /* Pedal to the metal... */
-// OBSOLETE proceed ((CORE_ADDR) -1, 0, 0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Mark our target-struct as eligible for stray "run" and "attach"
-// OBSOLETE commands. */
-// OBSOLETE static int
-// OBSOLETE m3_can_run (void)
-// OBSOLETE {
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Mach 3.0 does not need ptrace for anything
-// OBSOLETE * Make sure nobody uses it on mach.
-// OBSOLETE */
-// OBSOLETE ptrace (int a, int b, int c, int d)
-// OBSOLETE {
-// OBSOLETE error ("Lose, Lose! Somebody called ptrace\n");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Resume execution of the inferior process.
-// OBSOLETE If STEP is nonzero, single-step it.
-// OBSOLETE If SIGNAL is nonzero, give it that signal. */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE m3_resume (ptid_t ptid, int step, enum target_signal signal)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE if (step)
-// OBSOLETE {
-// OBSOLETE thread_basic_info_data_t th_info;
-// OBSOLETE unsigned int infoCnt = THREAD_BASIC_INFO_COUNT;
-// OBSOLETE
-// OBSOLETE /* There is no point in single stepping when current_thread
-// OBSOLETE * is dead.
-// OBSOLETE */
-// OBSOLETE if (!MACH_PORT_VALID (current_thread))
-// OBSOLETE error ("No thread selected; can not single step");
-// OBSOLETE
-// OBSOLETE /* If current_thread is suspended, tracing it would never return.
-// OBSOLETE */
-// OBSOLETE ret = thread_info (current_thread,
-// OBSOLETE THREAD_BASIC_INFO,
-// OBSOLETE (thread_info_t) & th_info,
-// OBSOLETE &infoCnt);
-// OBSOLETE CHK ("child_resume: can't get thread info", ret);
-// OBSOLETE
-// OBSOLETE if (th_info.suspend_count)
-// OBSOLETE error ("Can't trace a suspended thread. Use \"thread resume\" command to resume it");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE vm_read_cache_valid = FALSE;
-// OBSOLETE
-// OBSOLETE if (signal && PIDGET (inferior_ptid) > 0) /* Do not signal, if attached by MID */
-// OBSOLETE kill (PIDGET (inferior_ptid), target_signal_to_host (signal));
-// OBSOLETE
-// OBSOLETE if (step)
-// OBSOLETE {
-// OBSOLETE suspend_all_threads (0);
-// OBSOLETE
-// OBSOLETE setup_single_step (current_thread, TRUE);
-// OBSOLETE
-// OBSOLETE ret = thread_resume (current_thread);
-// OBSOLETE CHK ("thread_resume", ret);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE ret = task_resume (inferior_task);
-// OBSOLETE if (ret == KERN_FAILURE)
-// OBSOLETE warning ("Task was not suspended");
-// OBSOLETE else
-// OBSOLETE CHK ("Resuming task", ret);
-// OBSOLETE
-// OBSOLETE /* HACK HACK This is needed by the multiserver system HACK HACK */
-// OBSOLETE while ((ret = task_resume (inferior_task)) == KERN_SUCCESS)
-// OBSOLETE /* make sure it really runs */ ;
-// OBSOLETE /* HACK HACK This is needed by the multiserver system HACK HACK */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #ifdef ATTACH_DETACH
-// OBSOLETE
-// OBSOLETE /* Start debugging the process with the given task */
-// OBSOLETE void
-// OBSOLETE task_attach (task_t tid)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE inferior_task = tid;
-// OBSOLETE
-// OBSOLETE ret = task_suspend (inferior_task);
-// OBSOLETE CHK ("task_attach: task_suspend", ret);
-// OBSOLETE
-// OBSOLETE must_suspend_thread = 0;
-// OBSOLETE
-// OBSOLETE setup_notify_port (1);
-// OBSOLETE
-// OBSOLETE request_notify (inferior_task, MACH_NOTIFY_DEAD_NAME, MACH_TYPE_TASK);
-// OBSOLETE
-// OBSOLETE setup_exception_port ();
-// OBSOLETE
-// OBSOLETE emulator_present = have_emulator_p (inferior_task);
-// OBSOLETE
-// OBSOLETE attach_flag = 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Well, we can call error also here and leave the
-// OBSOLETE * target stack inconsistent. Sigh.
-// OBSOLETE * Fix this sometime (the only way to fail here is that
-// OBSOLETE * the task has no threads at all, which is rare, but
-// OBSOLETE * possible; or if the target task has died, which is also
-// OBSOLETE * possible, but unlikely, since it has been suspended.
-// OBSOLETE * (Someone must have killed it))
-// OBSOLETE */
-// OBSOLETE void
-// OBSOLETE attach_to_thread (void)
-// OBSOLETE {
-// OBSOLETE if (select_thread (inferior_task, 0, 1) != KERN_SUCCESS)
-// OBSOLETE error ("Could not select any threads to attach to");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE mid_attach (int mid)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE ret = machid_mach_port (mid_server, mid_auth, mid, &inferior_task);
-// OBSOLETE CHK ("mid_attach: machid_mach_port", ret);
-// OBSOLETE
-// OBSOLETE task_attach (inferior_task);
-// OBSOLETE
-// OBSOLETE return mid;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Start debugging the process whose unix process-id is PID.
-// OBSOLETE * A negative "pid" value is legal and signifies a mach_id not a unix pid.
-// OBSOLETE *
-// OBSOLETE * Prevent (possible unwanted) dangerous operations by enabled users
-// OBSOLETE * like "atta 0" or "atta foo" (equal to the previous :-) and
-// OBSOLETE * "atta pidself". Anyway, the latter is allowed by specifying a MID.
-// OBSOLETE */
-// OBSOLETE static int
-// OBSOLETE m3_do_attach (int pid)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE if (pid == 0)
-// OBSOLETE error ("MID=0, Debugging the master unix server does not compute");
-// OBSOLETE
-// OBSOLETE /* Foo. This assumes gdb has a unix pid */
-// OBSOLETE if (pid == getpid ())
-// OBSOLETE error ("I will debug myself only by mid. (Gdb would suspend itself!)");
-// OBSOLETE
-// OBSOLETE if (pid < 0)
-// OBSOLETE {
-// OBSOLETE mid_attach (-(pid));
-// OBSOLETE
-// OBSOLETE /* inferior_ptid will be NEGATIVE! */
-// OBSOLETE inferior_ptid = pid_to_ptid (pid);
-// OBSOLETE
-// OBSOLETE return PIDGET (inferior_ptid);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE inferior_task = task_by_pid (pid);
-// OBSOLETE if (!MACH_PORT_VALID (inferior_task))
-// OBSOLETE error ("Cannot map Unix pid %d to Mach task port", pid);
-// OBSOLETE
-// OBSOLETE task_attach (inferior_task);
-// OBSOLETE
-// OBSOLETE inferior_ptid = pid_to_ptid (pid);
-// OBSOLETE
-// OBSOLETE return PIDGET (inferior_ptid);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Attach to process PID, then initialize for debugging it
-// OBSOLETE and wait for the trace-trap that results from attaching. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE m3_attach (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE char *exec_file;
-// OBSOLETE int pid;
-// OBSOLETE
-// OBSOLETE if (!args)
-// OBSOLETE error_no_arg ("process-id to attach");
-// OBSOLETE
-// OBSOLETE pid = atoi (args);
-// OBSOLETE
-// OBSOLETE if (pid == getpid ()) /* Trying to masturbate? */
-// OBSOLETE error ("I refuse to debug myself!");
-// OBSOLETE
-// OBSOLETE if (from_tty)
-// OBSOLETE {
-// OBSOLETE exec_file = (char *) get_exec_file (0);
-// OBSOLETE
-// OBSOLETE if (exec_file)
-// OBSOLETE printf_unfiltered ("Attaching to program `%s', %s\n", exec_file,
-// OBSOLETE target_pid_to_str (pid_to_ptid (pid)));
-// OBSOLETE else
-// OBSOLETE printf_unfiltered ("Attaching to %s\n",
-// OBSOLETE target_pid_to_str (pid_to_ptid (pid)));
-// OBSOLETE
-// OBSOLETE gdb_flush (gdb_stdout);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE m3_do_attach (pid_to_ptid (pid));
-// OBSOLETE inferior_ptid = pid_to_ptid (pid);
-// OBSOLETE push_target (&m3_ops);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE deallocate_inferior_ports (void)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE thread_array_t thread_list;
-// OBSOLETE int thread_count, index;
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (inferior_task))
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE ret = task_threads (inferior_task, &thread_list, &thread_count);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE warning ("deallocate_inferior_ports: task_threads",
-// OBSOLETE mach_error_string (ret));
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Get rid of send rights to task threads */
-// OBSOLETE for (index = 0; index < thread_count; index++)
-// OBSOLETE {
-// OBSOLETE int rights;
-// OBSOLETE ret = mach_port_get_refs (mach_task_self (),
-// OBSOLETE thread_list[index],
-// OBSOLETE MACH_PORT_RIGHT_SEND,
-// OBSOLETE &rights);
-// OBSOLETE CHK ("deallocate_inferior_ports: get refs", ret);
-// OBSOLETE
-// OBSOLETE if (rights > 0)
-// OBSOLETE {
-// OBSOLETE ret = mach_port_mod_refs (mach_task_self (),
-// OBSOLETE thread_list[index],
-// OBSOLETE MACH_PORT_RIGHT_SEND,
-// OBSOLETE -rights);
-// OBSOLETE CHK ("deallocate_inferior_ports: mod refs", ret);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE ret = mach_port_mod_refs (mach_task_self (),
-// OBSOLETE inferior_exception_port,
-// OBSOLETE MACH_PORT_RIGHT_RECEIVE,
-// OBSOLETE -1);
-// OBSOLETE CHK ("deallocate_inferior_ports: cannot get rid of exception port", ret);
-// OBSOLETE
-// OBSOLETE ret = mach_port_deallocate (mach_task_self (),
-// OBSOLETE inferior_task);
-// OBSOLETE CHK ("deallocate_task_port: deallocating inferior_task", ret);
-// OBSOLETE
-// OBSOLETE current_thread = MACH_PORT_NULL;
-// OBSOLETE inferior_task = MACH_PORT_NULL;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Stop debugging the process whose number is PID
-// OBSOLETE and continue it with signal number SIGNAL.
-// OBSOLETE SIGNAL = 0 means just continue it. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE m3_do_detach (int signal)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE MACH_ERROR_NO_INFERIOR;
-// OBSOLETE
-// OBSOLETE if (current_thread != MACH_PORT_NULL)
-// OBSOLETE {
-// OBSOLETE /* Store the gdb's view of the thread we are deselecting
-// OBSOLETE * before we detach.
-// OBSOLETE * @@ I am really not sure if this is ever needeed.
-// OBSOLETE */
-// OBSOLETE target_prepare_to_store ();
-// OBSOLETE target_store_registers (-1);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE ret = task_set_special_port (inferior_task,
-// OBSOLETE TASK_EXCEPTION_PORT,
-// OBSOLETE inferior_old_exception_port);
-// OBSOLETE CHK ("task_set_special_port", ret);
-// OBSOLETE
-// OBSOLETE /* Discard all requested notifications */
-// OBSOLETE setup_notify_port (0);
-// OBSOLETE
-// OBSOLETE if (remove_breakpoints ())
-// OBSOLETE warning ("Could not remove breakpoints when detaching");
-// OBSOLETE
-// OBSOLETE if (signal && PIDGET (inferior_ptid) > 0)
-// OBSOLETE kill (PIDGET (inferior_ptid), signal);
-// OBSOLETE
-// OBSOLETE /* the task might be dead by now */
-// OBSOLETE (void) task_resume (inferior_task);
-// OBSOLETE
-// OBSOLETE deallocate_inferior_ports ();
-// OBSOLETE
-// OBSOLETE attach_flag = 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Take a program previously attached to and detaches it.
-// OBSOLETE The program resumes execution and will no longer stop
-// OBSOLETE on signals, etc. We'd better not have left any breakpoints
-// OBSOLETE in the program or it'll die when it hits one. For this
-// OBSOLETE to work, it may be necessary for the process to have been
-// OBSOLETE previously attached. It *might* work if the program was
-// OBSOLETE started via fork. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE m3_detach (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE int siggnal = 0;
-// OBSOLETE
-// OBSOLETE if (from_tty)
-// OBSOLETE {
-// OBSOLETE char *exec_file = get_exec_file (0);
-// OBSOLETE if (exec_file == 0)
-// OBSOLETE exec_file = "";
-// OBSOLETE printf_unfiltered ("Detaching from program: %s %s\n",
-// OBSOLETE exec_file, target_pid_to_str (inferior_ptid));
-// OBSOLETE gdb_flush (gdb_stdout);
-// OBSOLETE }
-// OBSOLETE if (args)
-// OBSOLETE siggnal = atoi (args);
-// OBSOLETE
-// OBSOLETE m3_do_detach (siggnal);
-// OBSOLETE inferior_ptid = null_ptid;
-// OBSOLETE unpush_target (&m3_ops); /* Pop out of handling an inferior */
-// OBSOLETE }
-// OBSOLETE #endif /* ATTACH_DETACH */
-// OBSOLETE
-// OBSOLETE /* Get ready to modify the registers array. On machines which store
-// OBSOLETE individual registers, this doesn't need to do anything. On machines
-// OBSOLETE which store all the registers in one fell swoop, this makes sure
-// OBSOLETE that registers contains all the registers from the program being
-// OBSOLETE debugged. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE m3_prepare_to_store (void)
-// OBSOLETE {
-// OBSOLETE #ifdef CHILD_PREPARE_TO_STORE
-// OBSOLETE CHILD_PREPARE_TO_STORE ();
-// OBSOLETE #endif
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Print status information about what we're accessing. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE m3_files_info (struct target_ops *ignore)
-// OBSOLETE {
-// OBSOLETE /* FIXME: should print MID and all that crap. */
-// OBSOLETE printf_unfiltered ("\tUsing the running image of %s %s.\n",
-// OBSOLETE attach_flag ? "attached" : "child", target_pid_to_str (inferior_ptid));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE m3_open (char *arg, int from_tty)
-// OBSOLETE {
-// OBSOLETE error ("Use the \"run\" command to start a Unix child process.");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #ifdef DUMP_SYSCALL
-// OBSOLETE #define STR(x) #x
-// OBSOLETE
-// OBSOLETE char *bsd1_names[] =
-// OBSOLETE {
-// OBSOLETE "execve",
-// OBSOLETE "fork",
-// OBSOLETE "take_signal",
-// OBSOLETE "sigreturn",
-// OBSOLETE "getrusage",
-// OBSOLETE "chdir",
-// OBSOLETE "chroot",
-// OBSOLETE "open",
-// OBSOLETE "creat",
-// OBSOLETE "mknod",
-// OBSOLETE "link",
-// OBSOLETE "symlink",
-// OBSOLETE "unlink",
-// OBSOLETE "access",
-// OBSOLETE "stat",
-// OBSOLETE "readlink",
-// OBSOLETE "chmod",
-// OBSOLETE "chown",
-// OBSOLETE "utimes",
-// OBSOLETE "truncate",
-// OBSOLETE "rename",
-// OBSOLETE "mkdir",
-// OBSOLETE "rmdir",
-// OBSOLETE "xutimes",
-// OBSOLETE "mount",
-// OBSOLETE "umount",
-// OBSOLETE "acct",
-// OBSOLETE "setquota",
-// OBSOLETE "write_short",
-// OBSOLETE "write_long",
-// OBSOLETE "send_short",
-// OBSOLETE "send_long",
-// OBSOLETE "sendto_short",
-// OBSOLETE "sendto_long",
-// OBSOLETE "select",
-// OBSOLETE "task_by_pid",
-// OBSOLETE "recvfrom_short",
-// OBSOLETE "recvfrom_long",
-// OBSOLETE "setgroups",
-// OBSOLETE "setrlimit",
-// OBSOLETE "sigvec",
-// OBSOLETE "sigstack",
-// OBSOLETE "settimeofday",
-// OBSOLETE "adjtime",
-// OBSOLETE "setitimer",
-// OBSOLETE "sethostname",
-// OBSOLETE "bind",
-// OBSOLETE "accept",
-// OBSOLETE "connect",
-// OBSOLETE "setsockopt",
-// OBSOLETE "getsockopt",
-// OBSOLETE "getsockname",
-// OBSOLETE "getpeername",
-// OBSOLETE "init_process",
-// OBSOLETE "table_set",
-// OBSOLETE "table_get",
-// OBSOLETE "pioctl",
-// OBSOLETE "emulator_error",
-// OBSOLETE "readwrite",
-// OBSOLETE "share_wakeup",
-// OBSOLETE 0,
-// OBSOLETE "maprw_request_it",
-// OBSOLETE "maprw_release_it",
-// OBSOLETE "maprw_remap",
-// OBSOLETE "pid_by_task",
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE int bsd1_nnames = sizeof (bsd1_names) / sizeof (bsd1_names[0]);
-// OBSOLETE
-// OBSOLETE char *
-// OBSOLETE name_str (int name, char *buf)
-// OBSOLETE {
-// OBSOLETE switch (name)
-// OBSOLETE {
-// OBSOLETE case MACH_MSG_TYPE_BOOLEAN:
-// OBSOLETE return "boolean";
-// OBSOLETE case MACH_MSG_TYPE_INTEGER_16:
-// OBSOLETE return "short";
-// OBSOLETE case MACH_MSG_TYPE_INTEGER_32:
-// OBSOLETE return "long";
-// OBSOLETE case MACH_MSG_TYPE_CHAR:
-// OBSOLETE return "char";
-// OBSOLETE case MACH_MSG_TYPE_BYTE:
-// OBSOLETE return "byte";
-// OBSOLETE case MACH_MSG_TYPE_REAL:
-// OBSOLETE return "real";
-// OBSOLETE case MACH_MSG_TYPE_STRING:
-// OBSOLETE return "string";
-// OBSOLETE default:
-// OBSOLETE sprintf (buf, "%d", name);
-// OBSOLETE return buf;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE char *
-// OBSOLETE id_str (int id, char *buf)
-// OBSOLETE {
-// OBSOLETE char *p;
-// OBSOLETE if (id >= 101000 && id < 101000 + bsd1_nnames)
-// OBSOLETE {
-// OBSOLETE if (p = bsd1_names[id - 101000])
-// OBSOLETE return p;
-// OBSOLETE }
-// OBSOLETE if (id == 102000)
-// OBSOLETE return "psignal_retry";
-// OBSOLETE if (id == 100000)
-// OBSOLETE return "syscall";
-// OBSOLETE sprintf (buf, "%d", id);
-// OBSOLETE return buf;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE print_msg (mach_msg_header_t *mp)
-// OBSOLETE {
-// OBSOLETE char *fmt_x = "%20s : 0x%08x\n";
-// OBSOLETE char *fmt_d = "%20s : %10d\n";
-// OBSOLETE char *fmt_s = "%20s : %s\n";
-// OBSOLETE char buf[100];
-// OBSOLETE
-// OBSOLETE puts_filtered ("\n");
-// OBSOLETE #define pr(fmt,h,x) printf_filtered(fmt,STR(x),(h).x)
-// OBSOLETE pr (fmt_x, (*mp), msgh_bits);
-// OBSOLETE pr (fmt_d, (*mp), msgh_size);
-// OBSOLETE pr (fmt_x, (*mp), msgh_remote_port);
-// OBSOLETE pr (fmt_x, (*mp), msgh_local_port);
-// OBSOLETE pr (fmt_d, (*mp), msgh_kind);
-// OBSOLETE printf_filtered (fmt_s, STR (msgh_id), id_str (mp->msgh_id, buf));
-// OBSOLETE
-// OBSOLETE if (debug_level > 1)
-// OBSOLETE {
-// OBSOLETE char *p, *ep, *dp;
-// OBSOLETE int plen;
-// OBSOLETE p = (char *) mp;
-// OBSOLETE ep = p + mp->msgh_size;
-// OBSOLETE p += sizeof (*mp);
-// OBSOLETE for (; p < ep; p += plen)
-// OBSOLETE {
-// OBSOLETE mach_msg_type_t *tp;
-// OBSOLETE mach_msg_type_long_t *tlp;
-// OBSOLETE int name, size, number;
-// OBSOLETE tp = (mach_msg_type_t *) p;
-// OBSOLETE if (tp->msgt_longform)
-// OBSOLETE {
-// OBSOLETE tlp = (mach_msg_type_long_t *) tp;
-// OBSOLETE name = tlp->msgtl_name;
-// OBSOLETE size = tlp->msgtl_size;
-// OBSOLETE number = tlp->msgtl_number;
-// OBSOLETE plen = sizeof (*tlp);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE name = tp->msgt_name;
-// OBSOLETE size = tp->msgt_size;
-// OBSOLETE number = tp->msgt_number;
-// OBSOLETE plen = sizeof (*tp);
-// OBSOLETE }
-// OBSOLETE printf_filtered ("name=%-16s size=%2d number=%7d inline=%d long=%d deal=%d\n",
-// OBSOLETE name_str (name, buf), size, number, tp->msgt_inline,
-// OBSOLETE tp->msgt_longform, tp->msgt_deallocate);
-// OBSOLETE dp = p + plen;
-// OBSOLETE if (tp->msgt_inline)
-// OBSOLETE {
-// OBSOLETE int l;
-// OBSOLETE l = size * number / 8;
-// OBSOLETE l = (l + sizeof (long) - 1) & ~((sizeof (long)) - 1);
-// OBSOLETE plen += l;
-// OBSOLETE print_data (dp, size, number);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE plen += sizeof (int *);
-// OBSOLETE }
-// OBSOLETE printf_filtered ("plen=%d\n", plen);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE print_data (char *p, int size, int number)
-// OBSOLETE {
-// OBSOLETE int *ip;
-// OBSOLETE short *sp;
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE switch (size)
-// OBSOLETE {
-// OBSOLETE case 8:
-// OBSOLETE for (i = 0; i < number; i++)
-// OBSOLETE {
-// OBSOLETE printf_filtered (" %02x", p[i]);
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE case 16:
-// OBSOLETE sp = (short *) p;
-// OBSOLETE for (i = 0; i < number; i++)
-// OBSOLETE {
-// OBSOLETE printf_filtered (" %04x", sp[i]);
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE case 32:
-// OBSOLETE ip = (int *) p;
-// OBSOLETE for (i = 0; i < number; i++)
-// OBSOLETE {
-// OBSOLETE printf_filtered (" %08x", ip[i]);
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE puts_filtered ("\n");
-// OBSOLETE }
-// OBSOLETE #endif /* DUMP_SYSCALL */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE m3_stop (void)
-// OBSOLETE {
-// OBSOLETE error ("to_stop target function not implemented");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static char *
-// OBSOLETE m3_pid_to_exec_file (int pid)
-// OBSOLETE {
-// OBSOLETE error ("to_pid_to_exec_file target function not implemented");
-// OBSOLETE return NULL; /* To keep all compilers happy. */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE init_m3_ops (void)
-// OBSOLETE {
-// OBSOLETE m3_ops.to_shortname = "mach";
-// OBSOLETE m3_ops.to_longname = "Mach child process";
-// OBSOLETE m3_ops.to_doc = "Mach child process (started by the \"run\" command).";
-// OBSOLETE m3_ops.to_open = m3_open;
-// OBSOLETE m3_ops.to_attach = m3_attach;
-// OBSOLETE m3_ops.to_detach = m3_detach;
-// OBSOLETE m3_ops.to_resume = m3_resume;
-// OBSOLETE m3_ops.to_wait = mach_really_wait;
-// OBSOLETE m3_ops.to_fetch_registers = fetch_inferior_registers;
-// OBSOLETE m3_ops.to_store_registers = store_inferior_registers;
-// OBSOLETE m3_ops.to_prepare_to_store = m3_prepare_to_store;
-// OBSOLETE m3_ops.to_xfer_memory = m3_xfer_memory;
-// OBSOLETE m3_ops.to_files_info = m3_files_info;
-// OBSOLETE m3_ops.to_insert_breakpoint = memory_insert_breakpoint;
-// OBSOLETE m3_ops.to_remove_breakpoint = memory_remove_breakpoint;
-// OBSOLETE m3_ops.to_terminal_init = terminal_init_inferior;
-// OBSOLETE m3_ops.to_terminal_inferior = terminal_inferior;
-// OBSOLETE m3_ops.to_terminal_ours_for_output = terminal_ours_for_output;
-// OBSOLETE m3_ops.to_terminal_save_ours = terminal_save_ours;
-// OBSOLETE m3_ops.to_terminal_ours = terminal_ours;
-// OBSOLETE m3_ops.to_terminal_info = child_terminal_info;
-// OBSOLETE m3_ops.to_kill = m3_kill_inferior;
-// OBSOLETE m3_ops.to_create_inferior = m3_create_inferior;
-// OBSOLETE m3_ops.to_mourn_inferior = m3_mourn_inferior;
-// OBSOLETE m3_ops.to_can_run = m3_can_run;
-// OBSOLETE m3_ops.to_stop = m3_stop;
-// OBSOLETE m3_ops.to_pid_to_exec_file = m3_pid_to_exec_file;
-// OBSOLETE m3_ops.to_stratum = process_stratum;
-// OBSOLETE m3_ops.to_has_all_memory = 1;
-// OBSOLETE m3_ops.to_has_memory = 1;
-// OBSOLETE m3_ops.to_has_stack = 1;
-// OBSOLETE m3_ops.to_has_registers = 1;
-// OBSOLETE m3_ops.to_has_execution = 1;
-// OBSOLETE m3_ops.to_magic = OPS_MAGIC;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE _initialize_m3_nat (void)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE init_m3_ops ();
-// OBSOLETE add_target (&m3_ops);
-// OBSOLETE
-// OBSOLETE ret = mach_port_allocate (mach_task_self (),
-// OBSOLETE MACH_PORT_RIGHT_PORT_SET,
-// OBSOLETE &inferior_wait_port_set);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "initial port set %s", mach_error_string (ret));
-// OBSOLETE
-// OBSOLETE /* mach_really_wait now waits for this */
-// OBSOLETE currently_waiting_for = inferior_wait_port_set;
-// OBSOLETE
-// OBSOLETE ret = netname_look_up (name_server_port, hostname, "MachID", &mid_server);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE {
-// OBSOLETE mid_server = MACH_PORT_NULL;
-// OBSOLETE
-// OBSOLETE warning ("initialize machid: netname_lookup_up(MachID) : %s",
-// OBSOLETE mach_error_string (ret));
-// OBSOLETE warning ("Some (most?) features disabled...");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE mid_auth = mach_privileged_host_port ();
-// OBSOLETE if (mid_auth == MACH_PORT_NULL)
-// OBSOLETE mid_auth = mach_task_self ();
-// OBSOLETE
-// OBSOLETE obstack_init (port_chain_obstack);
-// OBSOLETE
-// OBSOLETE ret = mach_port_allocate (mach_task_self (),
-// OBSOLETE MACH_PORT_RIGHT_RECEIVE,
-// OBSOLETE &thread_exception_port);
-// OBSOLETE CHK ("Creating thread_exception_port for single stepping", ret);
-// OBSOLETE
-// OBSOLETE ret = mach_port_insert_right (mach_task_self (),
-// OBSOLETE thread_exception_port,
-// OBSOLETE thread_exception_port,
-// OBSOLETE MACH_MSG_TYPE_MAKE_SEND);
-// OBSOLETE CHK ("Inserting send right to thread_exception_port", ret);
-// OBSOLETE
-// OBSOLETE /* Allocate message port */
-// OBSOLETE ret = mach_port_allocate (mach_task_self (),
-// OBSOLETE MACH_PORT_RIGHT_RECEIVE,
-// OBSOLETE &our_message_port);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE warning ("Creating message port %s", mach_error_string (ret));
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE char buf[MAX_NAME_LEN];
-// OBSOLETE ret = mach_port_move_member (mach_task_self (),
-// OBSOLETE our_message_port,
-// OBSOLETE inferior_wait_port_set);
-// OBSOLETE if (ret != KERN_SUCCESS)
-// OBSOLETE warning ("message move member %s", mach_error_string (ret));
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* @@@@ No way to change message port name currently */
-// OBSOLETE /* Foo. This assumes gdb has a unix pid */
-// OBSOLETE sprintf (buf, "gdb-%d", getpid ());
-// OBSOLETE gdb_register_port (buf, our_message_port);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Heap for thread commands */
-// OBSOLETE obstack_init (cproc_obstack);
-// OBSOLETE
-// OBSOLETE add_mach_specific_commands ();
-// OBSOLETE }
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 12a91c2..b2bc71f 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -37,6 +37,7 @@
#include "arch-utils.h"
#include "regcache.h"
#include "trad-frame.h"
+#include "dis-asm.h"
#include "gdb_assert.h"
@@ -830,11 +831,6 @@ m32r_frame_this_id (struct frame_info *next_frame,
/* The FUNC is easy. */
func = frame_func_unwind (next_frame);
- /* This is meant to halt the backtrace at "_start". Make sure we
- don't halt it at a generic dummy frame. */
- if (deprecated_inside_entry_file (func))
- return;
-
/* Check if the stack is empty. */
msym_stack = lookup_minimal_symbol ("_stack", NULL, NULL);
if (msym_stack && info->base == SYMBOL_VALUE_ADDRESS (msym_stack))
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 0f3ed0e..e821722 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -894,11 +894,6 @@ m68hc11_frame_this_id (struct frame_info *next_frame,
/* The FUNC is easy. */
func = frame_func_unwind (next_frame);
- /* This is meant to halt the backtrace at "_start". Make sure we
- don't halt it at a generic dummy frame. */
- if (deprecated_inside_entry_file (func))
- return;
-
/* Hopefully the prologue analysis either correctly determined the
frame's base (which is the SP from the previous frame), or set
that base to "NULL". */
@@ -1032,9 +1027,9 @@ m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file,
if (regno == HARD_PC_REGNUM || regno == HARD_SP_REGNUM
|| regno == SOFT_FP_REGNUM || regno == M68HC12_HARD_PC_REGNUM)
- frame_read_unsigned_register (frame, regno, &rval);
+ rval = get_frame_register_unsigned (frame, regno);
else
- frame_read_signed_register (frame, regno, &rval);
+ rval = get_frame_register_signed (frame, regno);
if (regno == HARD_A_REGNUM || regno == HARD_B_REGNUM
|| regno == HARD_CCR_REGNUM || regno == HARD_PAGE_REGNUM)
@@ -1049,7 +1044,7 @@ m68hc11_print_register (struct gdbarch *gdbarch, struct ui_file *file,
{
ULONGEST page;
- frame_read_unsigned_register (frame, HARD_PAGE_REGNUM, &page);
+ page = get_frame_register_unsigned (frame, HARD_PAGE_REGNUM);
fprintf_filtered (file, "0x%02x:%04x ", (unsigned) page,
(unsigned) rval);
}
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index 72c3b86..e5b41a9 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -21,6 +21,7 @@
Boston, MA 02111-1307, USA. */
#include "defs.h"
+#include "dwarf2-frame.h"
#include "frame.h"
#include "frame-base.h"
#include "frame-unwind.h"
@@ -1153,6 +1154,10 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Frame unwinder. */
set_gdbarch_unwind_dummy_id (gdbarch, m68k_unwind_dummy_id);
set_gdbarch_unwind_pc (gdbarch, m68k_unwind_pc);
+
+ /* Hook in the DWARF CFI frame unwinder. */
+ frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
+
frame_base_set_default (gdbarch, &m68k_frame_base);
/* Hook in ABI-specific overrides, if they have been registered. */
diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c
index e51d20f..1407040 100644
--- a/gdb/m68klinux-nat.c
+++ b/gdb/m68klinux-nat.c
@@ -54,7 +54,7 @@
#include "target.h"
-/* This table must line up with REGISTER_NAMES in tm-m68k.h */
+/* This table must line up with REGISTER_NAME in "m68k-tdep.c". */
static const int regmap[] =
{
PT_D0, PT_D1, PT_D2, PT_D3, PT_D4, PT_D5, PT_D6, PT_D7,
diff --git a/gdb/macrotab.c b/gdb/macrotab.c
index 4f0761d..56ee2a4 100644
--- a/gdb/macrotab.c
+++ b/gdb/macrotab.c
@@ -426,11 +426,10 @@ macro_include (struct macro_source_file *source,
struct macro_source_file **link;
/* Find the right position in SOURCE's `includes' list for the new
- file. Scan until we find the first file we shouldn't follow ---
- which is therefore the file we should directly precede --- or
- reach the end of the list. */
+ file. Skip inclusions at earlier lines, until we find one at the
+ same line or later --- or until the end of the list. */
for (link = &source->includes;
- *link && line < (*link)->included_at_line;
+ *link && (*link)->included_at_line < line;
link = &(*link)->next_included)
;
diff --git a/gdb/maint.c b/gdb/maint.c
index b55cb67..f7bb194 100644
--- a/gdb/maint.c
+++ b/gdb/maint.c
@@ -92,7 +92,6 @@ maintenance_command (char *args, int from_tty)
}
#ifndef _WIN32
-/* ARGSUSED */
static void
maintenance_dump_me (char *args, int from_tty)
{
@@ -191,7 +190,6 @@ maintenance_space_display (char *args, int from_tty)
allow_unknown 0. Therefore, its own definition is called only for
"maintenance info" with no args. */
-/* ARGSUSED */
static void
maintenance_info_command (char *arg, int from_tty)
{
@@ -353,7 +351,6 @@ print_objfile_section_info (bfd *abfd,
}
}
-/* ARGSUSED */
static void
maintenance_info_sections (char *arg, int from_tty)
{
@@ -399,7 +396,6 @@ maintenance_info_sections (char *arg, int from_tty)
}
}
-/* ARGSUSED */
void
maintenance_print_statistics (char *args, int from_tty)
{
@@ -426,7 +422,6 @@ maintenance_print_architecture (char *args, int from_tty)
allow_unknown 0. Therefore, its own definition is called only for
"maintenance print" with no args. */
-/* ARGSUSED */
static void
maintenance_print_command (char *arg, int from_tty)
{
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index 342d5a3..0977984 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -265,7 +265,7 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
deprecated_update_frame_base_hack (dummy, frame);
get_frame_extra_info (dummy)->status = 0;
get_frame_extra_info (dummy)->framesize = 0;
- memset (get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS);
+ memset (deprecated_get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS);
mcore_analyze_prologue (dummy, 0, 0);
return dummy;
}
@@ -590,7 +590,7 @@ mcore_analyze_prologue (struct frame_info *fi, CORE_ADDR pc, int skip_prologue)
{
if (register_offsets[rn] >= 0)
{
- get_frame_saved_regs (fi)[rn] = get_frame_base (fi) - register_offsets[rn];
+ deprecated_get_frame_saved_regs (fi)[rn] = get_frame_base (fi) - register_offsets[rn];
mcore_insn_debug (("Saved register %s stored at 0x%08x, value=0x%08x\n",
mcore_register_names[rn], fi->saved_regs[rn],
read_memory_integer (fi->saved_regs[rn], 4)));
@@ -639,11 +639,11 @@ mcore_frame_chain (struct frame_info * fi)
int fp = get_frame_extra_info (dummy)->fp_regnum;
/* Our caller has a frame pointer. */
- if (get_frame_saved_regs (fi)[fp] != 0)
+ if (deprecated_get_frame_saved_regs (fi)[fp] != 0)
{
/* The "FP" was saved on the stack. Don't forget to adjust
the "FP" with the framesize to get a real FP. */
- callers_addr = read_memory_integer (get_frame_saved_regs (fi)[fp],
+ callers_addr = read_memory_integer (deprecated_get_frame_saved_regs (fi)[fp],
DEPRECATED_REGISTER_SIZE)
+ get_frame_extra_info (dummy)->framesize;
}
@@ -726,8 +726,8 @@ mcore_find_callers_reg (struct frame_info *fi, int regnum)
get_frame_base (fi)))
return deprecated_read_register_dummy (get_frame_pc (fi),
get_frame_base (fi), regnum);
- else if (get_frame_saved_regs (fi)[regnum] != 0)
- return read_memory_integer (get_frame_saved_regs (fi)[regnum],
+ else if (deprecated_get_frame_saved_regs (fi)[regnum] != 0)
+ return read_memory_integer (deprecated_get_frame_saved_regs (fi)[regnum],
DEPRECATED_REGISTER_SIZE);
}
@@ -770,11 +770,11 @@ mcore_pop_frame (void)
/* Restore any saved registers. */
for (rn = 0; rn < NUM_REGS; rn++)
{
- if (get_frame_saved_regs (fi)[rn] != 0)
+ if (deprecated_get_frame_saved_regs (fi)[rn] != 0)
{
ULONGEST value;
- value = read_memory_unsigned_integer (get_frame_saved_regs (fi)[rn],
+ value = read_memory_unsigned_integer (deprecated_get_frame_saved_regs (fi)[rn],
DEPRECATED_REGISTER_SIZE);
write_register (rn, value);
}
@@ -1057,7 +1057,7 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* NOTE: cagney/2002-12-06: This can be deleted when this arch is
ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
+ set_gdbarch_deprecated_init_frame_pc (gdbarch, deprecated_init_frame_pc_default);
/* Registers: */
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 438c0f0..b5c7446 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -1522,10 +1522,6 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
if (t->fBitfield)
{
int width = AUX_GET_WIDTH (bigend, ax);
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* Inhibit core dumps with some cfront generated objects that
-// OBSOLETE corrupt the TIR. */
-#endif /* OBSOLETE CFront */
/* Inhibit core dumps if TIR is corrupted. */
if (bs == (int *) NULL)
{
@@ -1636,7 +1632,7 @@ parse_type (int fd, union aux_ext *ax, unsigned int aux_index, int *bs,
if (name[0] == '.' || name[0] == '\0')
TYPE_TAG_NAME (tp) = NULL;
else if (TYPE_TAG_NAME (tp) == NULL
- || !STREQ (TYPE_TAG_NAME (tp), name))
+ || strcmp (TYPE_TAG_NAME (tp), name) != 0)
TYPE_TAG_NAME (tp) = obsavestring (name, strlen (name),
&current_objfile->type_obstack);
}
@@ -3043,22 +3039,6 @@ parse_partial_symbols (struct objfile *objfile)
psymtab_language, objfile);
p += 1;
}
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* The semantics of C++ state that "struct foo { ... }"
-// OBSOLETE also defines a typedef for "foo". Unfortuantely, cfront
-// OBSOLETE never makes the typedef when translating from C++ to C.
-// OBSOLETE We make the typedef here so that "ptype foo" works as
-// OBSOLETE expected for cfront translated code. */
-// OBSOLETE else if (psymtab_language == language_cplus)
-// OBSOLETE {
-// OBSOLETE /* Also a typedef with the same name. */
-// OBSOLETE add_psymbol_to_list (namestring, p - namestring,
-// OBSOLETE VAR_DOMAIN, LOC_TYPEDEF,
-// OBSOLETE &objfile->static_psymbols,
-// OBSOLETE sh.value, 0,
-// OBSOLETE psymtab_language, objfile);
-// OBSOLETE }
-#endif /* OBSOLETE CFront */
}
goto check_enum;
case 't':
@@ -3205,11 +3185,6 @@ parse_partial_symbols (struct objfile *objfile)
case '9':
case '-':
case '#': /* for symbol identification (used in live ranges) */
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* added to support cfront stabs strings */
-// OBSOLETE case 'Z': /* for definition continuations */
-// OBSOLETE case 'P': /* for prototypes */
-#endif /* OBSOLETE CFront */
continue;
case ':':
diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog
index 24974c5..4472fe3 100644
--- a/gdb/mi/ChangeLog
+++ b/gdb/mi/ChangeLog
@@ -1,6 +1,25 @@
+2003-11-06 Andrew Cagney <cagney@redhat.com>
+
+ * mi-cmd-var.c (mi_cmd_var_set_format): Replace STREQN with
+ strncmp.
+
+2003-10-24 Andrew Cagney <cagney@redhat.com>
+
+ * tui-out.c: Fix "fortunatly"[sic].
+
+2003-10-02 Andrew Cagney <cagney@redhat.com>
+
+ * mi-main.c: Rename REGISTER_RAW_SIZE to
+ DEPRECATED_REGISTER_RAW_SIZE.
+
+2003-09-30 Andrew Cagney <cagney@redhat.com>
+
+ * mi-main.c: Rename REGISTER_VIRTUAL_SIZE to
+ DEPRECATED_REGISTER_VIRTUAL_SIZE.
+
2003-09-17 Andrew Cagney <cagney@redhat.com>
- * mi/mi-main.c: Rename REGISTER_BYTE to DEPRECATED_REGISTER_BYTE.
+ * mi-main.c: Rename REGISTER_BYTE to DEPRECATED_REGISTER_BYTE.
2003-09-10 Elena Zannoni <ezannoni@redhat.com>
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 0da6106..114531c 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -189,15 +189,15 @@ mi_cmd_var_set_format (char *command, char **argv, int argc)
len = strlen (formspec);
- if (STREQN (formspec, "natural", len))
+ if (strncmp (formspec, "natural", len) == 0)
format = FORMAT_NATURAL;
- else if (STREQN (formspec, "binary", len))
+ else if (strncmp (formspec, "binary", len) == 0)
format = FORMAT_BINARY;
- else if (STREQN (formspec, "decimal", len))
+ else if (strncmp (formspec, "decimal", len) == 0)
format = FORMAT_DECIMAL;
- else if (STREQN (formspec, "hexadecimal", len))
+ else if (strncmp (formspec, "hexadecimal", len) == 0)
format = FORMAT_HEXADECIMAL;
- else if (STREQN (formspec, "octal", len))
+ else if (strncmp (formspec, "octal", len) == 0)
format = FORMAT_OCTAL;
else
error ("mi_cmd_var_set_format: Unknown display format: must be: \"natural\", \"binary\", \"decimal\", \"hexadecimal\", or \"octal\"");
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index a4d0ab2..19eba99 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -406,13 +406,13 @@ register_changed_p (int regnum)
return -1;
if (memcmp (&old_regs[DEPRECATED_REGISTER_BYTE (regnum)], raw_buffer,
- REGISTER_RAW_SIZE (regnum)) == 0)
+ DEPRECATED_REGISTER_RAW_SIZE (regnum)) == 0)
return 0;
/* Found a changed register. Return 1. */
memcpy (&old_regs[DEPRECATED_REGISTER_BYTE (regnum)], raw_buffer,
- REGISTER_RAW_SIZE (regnum));
+ DEPRECATED_REGISTER_RAW_SIZE (regnum));
return 1;
}
@@ -544,7 +544,7 @@ get_register (int regnum, int format)
raw_buffer, virtual_buffer);
}
else
- memcpy (virtual_buffer, raw_buffer, REGISTER_VIRTUAL_SIZE (regnum));
+ memcpy (virtual_buffer, raw_buffer, DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
if (format == 'r')
{
@@ -553,10 +553,10 @@ get_register (int regnum, int format)
strcpy (buf, "0x");
ptr = buf + 2;
- for (j = 0; j < REGISTER_RAW_SIZE (regnum); j++)
+ for (j = 0; j < DEPRECATED_REGISTER_RAW_SIZE (regnum); j++)
{
- register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
- : REGISTER_RAW_SIZE (regnum) - 1 - 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]);
ptr += 2;
}
@@ -642,7 +642,7 @@ 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, REGISTER_RAW_SIZE (regnum));
+ deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (regnum), buffer, DEPRECATED_REGISTER_RAW_SIZE (regnum));
/* Free the buffer. */
do_cleanups (old_chain);
}
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 85b0104..c6930e9 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -253,8 +253,9 @@ lookup_minimal_symbol_aux (const char *name, int linkage,
case mst_file_data:
case mst_file_bss:
#ifdef SOFUN_ADDRESS_MAYBE_MISSING
- if (sfile == NULL || STREQ (msymbol->filename, sfile))
- found_file_symbol = msymbol;
+ if (sfile == NULL
+ || strcmp (msymbol->filename, sfile) == 0)
+ found_file_symbol = msymbol;
#else
/* We have neither the ability nor the need to
deal with the SFILE parameter. If we find
@@ -308,16 +309,13 @@ lookup_minimal_symbol_aux (const char *name, int linkage,
/* Look through all the current minimal symbol tables and find the
first minimal symbol that matches NAME and has text type. If OBJF
- is non-NULL, limit the search to that objfile. If SFILE is non-NULL,
- the only file-scope symbols considered will be from that source file
- (global symbols are still preferred). Returns a pointer to the minimal
- symbol that matches, or NULL if no match is found.
+ is non-NULL, limit the search to that objfile. Returns a pointer
+ to the minimal symbol that matches, or NULL if no match is found.
This function only searches the mangled (linkage) names. */
struct minimal_symbol *
-lookup_minimal_symbol_text (const char *name, const char *sfile,
- struct objfile *objf)
+lookup_minimal_symbol_text (const char *name, struct objfile *objf)
{
struct objfile *objfile;
struct minimal_symbol *msymbol;
@@ -326,15 +324,6 @@ lookup_minimal_symbol_text (const char *name, const char *sfile,
unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
- if (sfile != NULL)
- {
- char *p = strrchr (sfile, '/');
- if (p != NULL)
- sfile = p + 1;
- }
-#endif
-
for (objfile = object_files;
objfile != NULL && found_symbol == NULL;
objfile = objfile->next)
@@ -352,17 +341,7 @@ lookup_minimal_symbol_text (const char *name, const char *sfile,
switch (MSYMBOL_TYPE (msymbol))
{
case mst_file_text:
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
- if (sfile == NULL || STREQ (msymbol->filename, sfile))
- found_file_symbol = msymbol;
-#else
- /* We have neither the ability nor the need to
- deal with the SFILE parameter. If we find
- more than one symbol, just return the latest
- one (the user can't expect useful behavior in
- that case). */
found_file_symbol = msymbol;
-#endif
break;
default:
found_symbol = msymbol;
@@ -384,17 +363,15 @@ lookup_minimal_symbol_text (const char *name, const char *sfile,
}
/* Look through all the current minimal symbol tables and find the
- first minimal symbol that matches NAME and is a solib trampoline. If OBJF
- is non-NULL, limit the search to that objfile. If SFILE is non-NULL,
- the only file-scope symbols considered will be from that source file
- (global symbols are still preferred). Returns a pointer to the minimal
- symbol that matches, or NULL if no match is found.
+ first minimal symbol that matches NAME and is a solib trampoline.
+ If OBJF is non-NULL, limit the search to that objfile. Returns a
+ pointer to the minimal symbol that matches, or NULL if no match is
+ found.
This function only searches the mangled (linkage) names. */
struct minimal_symbol *
lookup_minimal_symbol_solib_trampoline (const char *name,
- const char *sfile,
struct objfile *objf)
{
struct objfile *objfile;
@@ -403,15 +380,6 @@ lookup_minimal_symbol_solib_trampoline (const char *name,
unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE;
-#ifdef SOFUN_ADDRESS_MAYBE_MISSING
- if (sfile != NULL)
- {
- char *p = strrchr (sfile, '/');
- if (p != NULL)
- sfile = p + 1;
- }
-#endif
-
for (objfile = object_files;
objfile != NULL && found_symbol == NULL;
objfile = objfile->next)
@@ -667,7 +635,7 @@ prim_record_minimal_symbol_and_info (const char *name, CORE_ADDR address,
const char *tempstring = name;
if (tempstring[0] == get_symbol_leading_char (objfile->obfd))
++tempstring;
- if (STREQN (tempstring, "__gnu_compiled", 14))
+ if (strncmp (tempstring, "__gnu_compiled", 14) == 0)
return (NULL);
}
}
@@ -818,10 +786,10 @@ compact_minimal_symbols (struct minimal_symbol *msymbol, int mcount,
copyfrom = copyto = msymbol;
while (copyfrom < msymbol + mcount - 1)
{
- if (SYMBOL_VALUE_ADDRESS (copyfrom) ==
- SYMBOL_VALUE_ADDRESS ((copyfrom + 1)) &&
- (STREQ (SYMBOL_LINKAGE_NAME (copyfrom),
- SYMBOL_LINKAGE_NAME ((copyfrom + 1)))))
+ if (SYMBOL_VALUE_ADDRESS (copyfrom)
+ == SYMBOL_VALUE_ADDRESS ((copyfrom + 1))
+ && strcmp (SYMBOL_LINKAGE_NAME (copyfrom),
+ SYMBOL_LINKAGE_NAME ((copyfrom + 1))) == 0)
{
if (MSYMBOL_TYPE ((copyfrom + 1)) == mst_unknown)
{
@@ -1056,8 +1024,8 @@ find_solib_trampoline_target (CORE_ADDR pc)
ALL_MSYMBOLS (objfile, msymbol)
{
if (MSYMBOL_TYPE (msymbol) == mst_text
- && STREQ (SYMBOL_LINKAGE_NAME (msymbol),
- SYMBOL_LINKAGE_NAME (tsymbol)))
+ && strcmp (SYMBOL_LINKAGE_NAME (msymbol),
+ SYMBOL_LINKAGE_NAME (tsymbol)) == 0)
return SYMBOL_VALUE_ADDRESS (msymbol);
}
}
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 8f31cf2..20ada7b 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -92,7 +92,7 @@ static void
supply_32bit_reg (int regnum, const void *addr)
{
char buf[MAX_REGISTER_SIZE];
- store_signed_integer (buf, REGISTER_RAW_SIZE (regnum),
+ store_signed_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (regnum),
extract_signed_integer (addr, 4));
supply_register (regnum, buf);
}
@@ -218,13 +218,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, REGISTER_RAW_SIZE (regno - FP0_REGNUM));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regno - FP0_REGNUM));
}
else if (regno == FCRCS_REGNUM)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + 32);
- memcpy (to, from, REGISTER_RAW_SIZE (regno));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regno));
}
else if (regno == -1)
{
@@ -493,13 +493,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, REGISTER_RAW_SIZE (regno - FP0_REGNUM));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regno - FP0_REGNUM));
}
else if (regno == FCRCS_REGNUM)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)];
to = (char *) (*fpregsetp + 32);
- memcpy (to, from, REGISTER_RAW_SIZE (regno));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regno));
}
else if (regno == -1)
{
diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c
index 0ab3fb1..4c35986 100644
--- a/gdb/mips-nat.c
+++ b/gdb/mips-nat.c
@@ -83,7 +83,7 @@ fetch_inferior_registers (int regno)
for (regno = 1; regno < NUM_REGS; regno++)
{
regaddr = register_ptrace_addr (regno);
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (int))
+ 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);
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 1d120d7..c0d8b08 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -181,9 +181,9 @@ unmake_mips16_addr (CORE_ADDR addr)
static LONGEST
read_signed_register (int regnum)
{
- void *buf = alloca (REGISTER_RAW_SIZE (regnum));
+ void *buf = alloca (DEPRECATED_REGISTER_RAW_SIZE (regnum));
deprecated_read_register_gen (regnum, buf);
- return (extract_signed_integer (buf, REGISTER_RAW_SIZE (regnum)));
+ return (extract_signed_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (regnum)));
}
static LONGEST
@@ -279,7 +279,7 @@ mips_xfer_register (struct regcache *regcache, int reg_num, int length,
switch (endian)
{
case BFD_ENDIAN_BIG:
- reg_offset = REGISTER_RAW_SIZE (reg_num) - length;
+ reg_offset = DEPRECATED_REGISTER_RAW_SIZE (reg_num) - length;
break;
case BFD_ENDIAN_LITTLE:
reg_offset = 0;
@@ -325,7 +325,7 @@ mips2_fp_compat (void)
{
/* MIPS1 and MIPS2 have only 32 bit FPRs, and the FR bit is not
meaningful. */
- if (REGISTER_RAW_SIZE (FP0_REGNUM) == 4)
+ if (DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) == 4)
return 0;
#if 0
@@ -624,18 +624,6 @@ struct linked_proc_info
}
*linked_proc_desc_table = NULL;
-void
-mips_print_extra_frame_info (struct frame_info *fi)
-{
- if (fi
- && get_frame_extra_info (fi)
- && get_frame_extra_info (fi)->proc_desc
- && get_frame_extra_info (fi)->proc_desc->pdr.framereg < NUM_REGS)
- printf_filtered (" frame pointer is at %s+%s\n",
- REGISTER_NAME (get_frame_extra_info (fi)->proc_desc->pdr.framereg),
- paddr_d (get_frame_extra_info (fi)->proc_desc->pdr.frameoffset));
-}
-
/* Number of bytes of storage in the actual machine representation for
register N. NOTE: This indirectly defines the register size
transfered by the GDB protocol. */
@@ -654,9 +642,9 @@ mips_register_raw_size (int regnum)
NOTE: cagney/2003-06-15: This is so bogus. The register's
raw size is changing according to the ABI
(FP_REGISTER_DOUBLE). Also, GDB's protocol is defined by a
- combination of REGISTER_RAW_SIZE and DEPRECATED_REGISTER_BYTE. */
+ combination of DEPRECATED_REGISTER_RAW_SIZE and DEPRECATED_REGISTER_BYTE. */
if (mips64_transfers_32bit_regs_p)
- return REGISTER_VIRTUAL_SIZE (regnum);
+ return DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum);
else if (regnum >= FP0_REGNUM && regnum < FP0_REGNUM + 32
&& FP_REGISTER_DOUBLE)
/* For MIPS_ABI_N32 (for example) we need 8 byte floating point
@@ -679,7 +667,7 @@ mips_register_raw_size (int regnum)
/* Register offset in a buffer for each register.
FIXME: cagney/2003-06-15: This is so bogus. Instead REGISTER_TYPE
- should strictly return the layout of the buffer. Unfortunatly
+ should strictly return the layout of the buffer. Unfortunately
remote.c and the MIPS have come to rely on a custom layout that
doesn't 1:1 map onto the register type. */
@@ -717,7 +705,7 @@ mips_register_convertible (int reg_nr)
if (mips64_transfers_32bit_regs_p)
return 0;
else
- return (REGISTER_RAW_SIZE (reg_nr) > REGISTER_VIRTUAL_SIZE (reg_nr));
+ return (DEPRECATED_REGISTER_RAW_SIZE (reg_nr) > DEPRECATED_REGISTER_VIRTUAL_SIZE (reg_nr));
}
static void
@@ -726,7 +714,7 @@ mips_register_convert_to_virtual (int n, struct type *virtual_type,
{
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
memcpy (virt_buf,
- raw_buf + (REGISTER_RAW_SIZE (n) - TYPE_LENGTH (virtual_type)),
+ raw_buf + (DEPRECATED_REGISTER_RAW_SIZE (n) - TYPE_LENGTH (virtual_type)),
TYPE_LENGTH (virtual_type));
else
memcpy (virt_buf,
@@ -738,9 +726,9 @@ static void
mips_register_convert_to_raw (struct type *virtual_type, int n,
const char *virt_buf, char *raw_buf)
{
- memset (raw_buf, 0, REGISTER_RAW_SIZE (n));
+ memset (raw_buf, 0, DEPRECATED_REGISTER_RAW_SIZE (n));
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- memcpy (raw_buf + (REGISTER_RAW_SIZE (n) - TYPE_LENGTH (virtual_type)),
+ memcpy (raw_buf + (DEPRECATED_REGISTER_RAW_SIZE (n) - TYPE_LENGTH (virtual_type)),
virt_buf,
TYPE_LENGTH (virtual_type));
else
@@ -753,7 +741,7 @@ static int
mips_convert_register_p (int regnum, struct type *type)
{
return (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && REGISTER_RAW_SIZE (regnum) == 4
+ && DEPRECATED_REGISTER_RAW_SIZE (regnum) == 4
&& (regnum) >= FP0_REGNUM && (regnum) < FP0_REGNUM + 32
&& TYPE_CODE(type) == TYPE_CODE_FLT
&& TYPE_LENGTH(type) == 8);
@@ -763,8 +751,8 @@ static void
mips_register_to_value (struct frame_info *frame, int regnum,
struct type *type, void *to)
{
- frame_read_register (frame, regnum + 0, (char *) to + 4);
- frame_read_register (frame, regnum + 1, (char *) to + 0);
+ get_frame_register (frame, regnum + 0, (char *) to + 4);
+ get_frame_register (frame, regnum + 1, (char *) to + 0);
}
static void
@@ -1570,7 +1558,7 @@ mips_find_saved_regs (struct frame_info *fci)
t_inst inst;
CORE_ADDR *saved_regs;
- if (get_frame_saved_regs (fci) != NULL)
+ if (deprecated_get_frame_saved_regs (fci) != NULL)
return;
saved_regs = frame_saved_regs_zalloc (fci);
@@ -1741,7 +1729,7 @@ mips_find_saved_regs (struct frame_info *fci)
stored first leading to the memory order $f[N] and
then $f[N+1].
- Unfortunatly, when big-endian the most significant
+ 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
@@ -2733,7 +2721,7 @@ mips_init_extra_frame_info (int fromleaf, struct frame_info *fci)
get_frame_base (fci));
set_reg_offset (temp_saved_regs, PC_REGNUM,
temp_saved_regs[RA_REGNUM]);
- memcpy (get_frame_saved_regs (fci), temp_saved_regs,
+ memcpy (deprecated_get_frame_saved_regs (fci), temp_saved_regs,
SIZEOF_FRAME_SAVED_REGS);
}
}
@@ -2822,18 +2810,12 @@ mips_type_needs_double_align (struct type *type)
return 0;
}
-/* Macros to round N up or down to the next A boundary;
- A must be a power of two. */
-
-#define ROUND_DOWN(n,a) ((n) & ~((a)-1))
-#define ROUND_UP(n,a) (((n)+(a)-1) & ~((a)-1))
-
/* Adjust the address downward (direction of stack growth) so that it
is correctly aligned for a new stack frame. */
static CORE_ADDR
mips_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr)
{
- return ROUND_DOWN (addr, 16);
+ return align_down (addr, 16);
}
static CORE_ADDR
@@ -2862,21 +2844,21 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
aligned. For n32 and n64, stack frames need to be 128-bit
aligned, so we round to this widest known alignment. */
- sp = ROUND_DOWN (sp, 16);
- struct_addr = ROUND_DOWN (struct_addr, 16);
+ sp = align_down (sp, 16);
+ struct_addr = align_down (struct_addr, 16);
/* Now make space on the stack for the args. We allocate more
than necessary for EABI, because the first few arguments are
passed in registers, but that's OK. */
for (argnum = 0; argnum < nargs; argnum++)
- len += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
+ len += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
MIPS_STACK_ARGSIZE);
- sp -= ROUND_UP (len, 16);
+ sp -= align_up (len, 16);
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_eabi_push_dummy_call: sp=0x%s allocated %d\n",
- paddr_nz (sp), ROUND_UP (len, 16));
+ "mips_eabi_push_dummy_call: sp=0x%s allocated %ld\n",
+ paddr_nz (sp), (long) align_up (len, 16));
/* Initialize the integer and float register pointers. */
argreg = A0_REGNUM;
@@ -3083,7 +3065,7 @@ mips_eabi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
only needs to be adjusted when it has been used. */
if (stack_used_p)
- stack_offset += ROUND_UP (partial_len, MIPS_STACK_ARGSIZE);
+ stack_offset += align_up (partial_len, MIPS_STACK_ARGSIZE);
}
}
if (mips_debug)
@@ -3124,19 +3106,19 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
aligned. For n32 and n64, stack frames need to be 128-bit
aligned, so we round to this widest known alignment. */
- sp = ROUND_DOWN (sp, 16);
- struct_addr = ROUND_DOWN (struct_addr, 16);
+ sp = align_down (sp, 16);
+ struct_addr = align_down (struct_addr, 16);
/* Now make space on the stack for the args. */
for (argnum = 0; argnum < nargs; argnum++)
- len += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
+ len += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
MIPS_STACK_ARGSIZE);
- sp -= ROUND_UP (len, 16);
+ sp -= align_up (len, 16);
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_n32n64_push_dummy_call: sp=0x%s allocated %d\n",
- paddr_nz (sp), ROUND_UP (len, 16));
+ "mips_n32n64_push_dummy_call: sp=0x%s allocated %ld\n",
+ paddr_nz (sp), (long) align_up (len, 16));
/* Initialize the integer and float register pointers. */
argreg = A0_REGNUM;
@@ -3314,7 +3296,7 @@ mips_n32n64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
adjusted when it has been used. */
if (stack_used_p)
- stack_offset += ROUND_UP (partial_len, MIPS_STACK_ARGSIZE);
+ stack_offset += align_up (partial_len, MIPS_STACK_ARGSIZE);
}
}
if (mips_debug)
@@ -3355,19 +3337,19 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
aligned. For n32 and n64, stack frames need to be 128-bit
aligned, so we round to this widest known alignment. */
- sp = ROUND_DOWN (sp, 16);
- struct_addr = ROUND_DOWN (struct_addr, 16);
+ sp = align_down (sp, 16);
+ struct_addr = align_down (struct_addr, 16);
/* Now make space on the stack for the args. */
for (argnum = 0; argnum < nargs; argnum++)
- len += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
+ len += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
MIPS_STACK_ARGSIZE);
- sp -= ROUND_UP (len, 16);
+ sp -= align_up (len, 16);
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o32_push_dummy_call: sp=0x%s allocated %d\n",
- paddr_nz (sp), ROUND_UP (len, 16));
+ "mips_o32_push_dummy_call: sp=0x%s allocated %ld\n",
+ paddr_nz (sp), (long) align_up (len, 16));
/* Initialize the integer and float register pointers. */
argreg = A0_REGNUM;
@@ -3478,7 +3460,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
argreg += FP_REGISTER_DOUBLE ? 1 : 2;
}
/* Reserve space for the FP register. */
- stack_offset += ROUND_UP (len, MIPS_STACK_ARGSIZE);
+ stack_offset += align_up (len, MIPS_STACK_ARGSIZE);
}
else
{
@@ -3622,7 +3604,7 @@ mips_o32_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
refered to as their "home". Consequently, space is
always allocated. */
- stack_offset += ROUND_UP (partial_len, MIPS_STACK_ARGSIZE);
+ stack_offset += align_up (partial_len, MIPS_STACK_ARGSIZE);
}
}
if (mips_debug)
@@ -3663,19 +3645,19 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
aligned. For n32 and n64, stack frames need to be 128-bit
aligned, so we round to this widest known alignment. */
- sp = ROUND_DOWN (sp, 16);
- struct_addr = ROUND_DOWN (struct_addr, 16);
+ sp = align_down (sp, 16);
+ struct_addr = align_down (struct_addr, 16);
/* Now make space on the stack for the args. */
for (argnum = 0; argnum < nargs; argnum++)
- len += ROUND_UP (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
+ len += align_up (TYPE_LENGTH (VALUE_TYPE (args[argnum])),
MIPS_STACK_ARGSIZE);
- sp -= ROUND_UP (len, 16);
+ sp -= align_up (len, 16);
if (mips_debug)
fprintf_unfiltered (gdb_stdlog,
- "mips_o64_push_dummy_call: sp=0x%s allocated %d\n",
- paddr_nz (sp), ROUND_UP (len, 16));
+ "mips_o64_push_dummy_call: sp=0x%s allocated %ld\n",
+ paddr_nz (sp), (long) align_up (len, 16));
/* Initialize the integer and float register pointers. */
argreg = A0_REGNUM;
@@ -3786,7 +3768,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
argreg += FP_REGISTER_DOUBLE ? 1 : 2;
}
/* Reserve space for the FP register. */
- stack_offset += ROUND_UP (len, MIPS_STACK_ARGSIZE);
+ stack_offset += align_up (len, MIPS_STACK_ARGSIZE);
}
else
{
@@ -3930,7 +3912,7 @@ mips_o64_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
refered to as their "home". Consequently, space is
always allocated. */
- stack_offset += ROUND_UP (partial_len, MIPS_STACK_ARGSIZE);
+ stack_offset += align_up (partial_len, MIPS_STACK_ARGSIZE);
}
}
if (mips_debug)
@@ -3963,18 +3945,18 @@ mips_pop_frame (void)
mips_find_saved_regs (frame);
for (regnum = 0; regnum < NUM_REGS; regnum++)
if (regnum != SP_REGNUM && regnum != PC_REGNUM
- && get_frame_saved_regs (frame)[regnum])
+ && deprecated_get_frame_saved_regs (frame)[regnum])
{
/* Floating point registers must not be sign extended,
in case MIPS_SAVED_REGSIZE = 4 but sizeof (FP0_REGNUM) == 8. */
if (FP0_REGNUM <= regnum && regnum < FP0_REGNUM + 32)
write_register (regnum,
- read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
+ read_memory_unsigned_integer (deprecated_get_frame_saved_regs (frame)[regnum],
MIPS_SAVED_REGSIZE));
else
write_register (regnum,
- read_memory_integer (get_frame_saved_regs (frame)[regnum],
+ read_memory_integer (deprecated_get_frame_saved_regs (frame)[regnum],
MIPS_SAVED_REGSIZE));
}
@@ -4071,7 +4053,7 @@ static void
mips_read_fp_register_single (struct frame_info *frame, int regno,
char *rare_buffer)
{
- int raw_size = REGISTER_RAW_SIZE (regno);
+ int raw_size = DEPRECATED_REGISTER_RAW_SIZE (regno);
char *raw_buffer = alloca (raw_size);
if (!frame_register_read (frame, regno, raw_buffer))
@@ -4103,7 +4085,7 @@ static void
mips_read_fp_register_double (struct frame_info *frame, int regno,
char *rare_buffer)
{
- int raw_size = REGISTER_RAW_SIZE (regno);
+ int raw_size = DEPRECATED_REGISTER_RAW_SIZE (regno);
if (raw_size == 8 && !mips2_fp_compat ())
{
@@ -4142,13 +4124,13 @@ mips_print_fp_register (struct ui_file *file, struct frame_info *frame,
double doub, flt1, flt2; /* doubles extracted from raw hex data */
int inv1, inv2, namelen;
- raw_buffer = (char *) alloca (2 * REGISTER_RAW_SIZE (FP0_REGNUM));
+ raw_buffer = (char *) alloca (2 * DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM));
fprintf_filtered (file, "%s:", REGISTER_NAME (regnum));
fprintf_filtered (file, "%*s", 4 - (int) strlen (REGISTER_NAME (regnum)),
"");
- if (REGISTER_RAW_SIZE (regnum) == 4 || mips2_fp_compat ())
+ if (DEPRECATED_REGISTER_RAW_SIZE (regnum) == 4 || mips2_fp_compat ())
{
/* 4-byte registers: Print hex and floating. Also print even
numbered registers as doubles. */
@@ -4235,7 +4217,7 @@ mips_print_register (struct ui_file *file, struct frame_info *frame,
fprintf_filtered (file, ": ");
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- offset = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum);
+ offset = DEPRECATED_REGISTER_RAW_SIZE (regnum) - DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum);
else
offset = 0;
@@ -4303,16 +4285,16 @@ print_gp_register_row (struct ui_file *file, struct frame_info *frame,
if (!frame_register_read (frame, regnum, raw_buffer))
error ("can't read register %d (%s)", regnum, REGISTER_NAME (regnum));
/* pad small registers */
- for (byte = 0; byte < (MIPS_REGSIZE - REGISTER_VIRTUAL_SIZE (regnum)); byte++)
+ for (byte = 0; byte < (MIPS_REGSIZE - DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum)); byte++)
printf_filtered (" ");
/* Now print the register value in hex, endian order. */
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- for (byte = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum);
- byte < REGISTER_RAW_SIZE (regnum);
+ for (byte = DEPRECATED_REGISTER_RAW_SIZE (regnum) - DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum);
+ byte < DEPRECATED_REGISTER_RAW_SIZE (regnum);
byte++)
fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[byte]);
else
- for (byte = REGISTER_VIRTUAL_SIZE (regnum) - 1;
+ for (byte = DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum) - 1;
byte >= 0;
byte--)
fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[byte]);
@@ -4647,7 +4629,7 @@ return_value_location (struct type *valtype,
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
- && REGISTER_RAW_SIZE (FP0_REGNUM) == 8)
+ && DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) == 8)
? 4 : 0);
hi->reg_offset = lo->reg_offset;
lo->reg = FP0_REGNUM + 0;
@@ -4660,7 +4642,7 @@ return_value_location (struct type *valtype,
/* The floating point value fits in a single floating-point
register. */
lo->reg_offset = ((TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && REGISTER_RAW_SIZE (FP0_REGNUM) == 8
+ && DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) == 8
&& len == 4)
? 4 : 0);
lo->reg = FP0_REGNUM;
@@ -4716,7 +4698,7 @@ return_value_location (struct type *valtype,
}
}
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
- && REGISTER_RAW_SIZE (regnum) == 8
+ && DEPRECATED_REGISTER_RAW_SIZE (regnum) == 8
&& MIPS_SAVED_REGSIZE == 4)
{
/* Account for the fact that only the least-signficant part
@@ -4784,14 +4766,14 @@ mips_eabi_store_return_value (struct type *valtype, char *valbuf)
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len);
deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (lo.reg), raw_buffer,
- REGISTER_RAW_SIZE (lo.reg));
+ DEPRECATED_REGISTER_RAW_SIZE (lo.reg));
if (hi.len > 0)
{
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len);
deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (hi.reg), raw_buffer,
- REGISTER_RAW_SIZE (hi.reg));
+ DEPRECATED_REGISTER_RAW_SIZE (hi.reg));
}
}
@@ -4806,14 +4788,14 @@ mips_o64_store_return_value (struct type *valtype, char *valbuf)
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + lo.reg_offset, valbuf + lo.buf_offset, lo.len);
deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (lo.reg), raw_buffer,
- REGISTER_RAW_SIZE (lo.reg));
+ DEPRECATED_REGISTER_RAW_SIZE (lo.reg));
if (hi.len > 0)
{
memset (raw_buffer, 0, sizeof (raw_buffer));
memcpy (raw_buffer + hi.reg_offset, valbuf + hi.buf_offset, hi.len);
deprecated_write_register_bytes (DEPRECATED_REGISTER_BYTE (hi.reg), raw_buffer,
- REGISTER_RAW_SIZE (hi.reg));
+ DEPRECATED_REGISTER_RAW_SIZE (hi.reg));
}
}
@@ -4908,9 +4890,9 @@ mips_o32_xfer_return_value (struct type *type,
int regnum;
for (offset = 0, regnum = V0_REGNUM;
offset < TYPE_LENGTH (type);
- offset += REGISTER_RAW_SIZE (regnum), regnum++)
+ offset += DEPRECATED_REGISTER_RAW_SIZE (regnum), regnum++)
{
- int xfer = REGISTER_RAW_SIZE (regnum);
+ int xfer = DEPRECATED_REGISTER_RAW_SIZE (regnum);
if (offset + xfer > TYPE_LENGTH (type))
xfer = TYPE_LENGTH (type) - offset;
if (mips_debug)
@@ -5019,9 +5001,9 @@ mips_n32n64_xfer_return_value (struct type *type,
int regnum;
for (offset = 0, regnum = V0_REGNUM;
offset < TYPE_LENGTH (type);
- offset += REGISTER_RAW_SIZE (regnum), regnum++)
+ offset += DEPRECATED_REGISTER_RAW_SIZE (regnum), regnum++)
{
- int xfer = REGISTER_RAW_SIZE (regnum);
+ int xfer = DEPRECATED_REGISTER_RAW_SIZE (regnum);
if (offset + xfer > TYPE_LENGTH (type))
xfer = TYPE_LENGTH (type) - offset;
if (mips_debug)
@@ -5039,9 +5021,9 @@ mips_n32n64_xfer_return_value (struct type *type,
int regnum;
for (offset = 0, regnum = V0_REGNUM;
offset < TYPE_LENGTH (type);
- offset += REGISTER_RAW_SIZE (regnum), regnum++)
+ offset += DEPRECATED_REGISTER_RAW_SIZE (regnum), regnum++)
{
- int xfer = REGISTER_RAW_SIZE (regnum);
+ int xfer = DEPRECATED_REGISTER_RAW_SIZE (regnum);
int pos = 0;
if (offset + xfer > TYPE_LENGTH (type))
xfer = TYPE_LENGTH (type) - offset;
@@ -6047,11 +6029,8 @@ mips_gdbarch_init (struct gdbarch_info info,
/* MIPS version of register names. NOTE: At present the MIPS
register name management is part way between the old -
- #undef/#define REGISTER_NAMES and the new REGISTER_NAME(nr).
+ #undef/#define MIPS_REGISTER_NAMES and the new REGISTER_NAME(nr).
Further work on it is required. */
- /* NOTE: many targets (esp. embedded) do not go thru the
- gdbarch_register_name vector at all, instead bypassing it
- by defining REGISTER_NAMES. */
set_gdbarch_register_name (gdbarch, mips_register_name);
set_gdbarch_read_pc (gdbarch, mips_read_pc);
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
@@ -6065,7 +6044,6 @@ mips_gdbarch_init (struct gdbarch_info info,
/* There's a mess in stack frame creation. See comments in
blockframe.c near reference to DEPRECATED_INIT_FRAME_PC_FIRST. */
set_gdbarch_deprecated_init_frame_pc_first (gdbarch, mips_init_frame_pc_first);
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
/* Map debug register numbers onto internal register numbers. */
set_gdbarch_stab_reg_to_regnum (gdbarch, mips_stab_reg_to_regnum);
@@ -6370,9 +6348,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
"mips_dump_tdep: PRID_REGNUM = %d\n",
PRID_REGNUM);
fprintf_unfiltered (file,
- "mips_dump_tdep: PRINT_EXTRA_FRAME_INFO # %s\n",
- XSTRING (PRINT_EXTRA_FRAME_INFO (FRAME)));
- fprintf_unfiltered (file,
"mips_dump_tdep: PROC_DESC_IS_DUMMY = function?\n");
fprintf_unfiltered (file,
"mips_dump_tdep: PROC_FRAME_ADJUST = function?\n");
@@ -6402,12 +6377,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"mips_dump_tdep: RA_REGNUM = %d\n",
RA_REGNUM);
- fprintf_unfiltered (file,
- "mips_dump_tdep: REGISTER_NAMES = delete?\n");
- fprintf_unfiltered (file,
- "mips_dump_tdep: ROUND_DOWN = function?\n");
- fprintf_unfiltered (file,
- "mips_dump_tdep: ROUND_UP = function?\n");
#ifdef SAVED_BYTES
fprintf_unfiltered (file,
"mips_dump_tdep: SAVED_BYTES = %d\n",
@@ -6511,11 +6480,6 @@ mips_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
fprintf_unfiltered (file,
"mips_dump_tdep: VM_MIN_ADDRESS = %ld\n",
(long) VM_MIN_ADDRESS);
-#ifdef VX_NUM_REGS
- fprintf_unfiltered (file,
- "mips_dump_tdep: VX_NUM_REGS = %d (used?)\n",
- VX_NUM_REGS);
-#endif
fprintf_unfiltered (file,
"mips_dump_tdep: ZERO_REGNUM = %d\n",
ZERO_REGNUM);
diff --git a/gdb/mipsm3-nat.c b/gdb/mipsm3-nat.c
deleted file mode 100644
index f1fd859..0000000
--- a/gdb/mipsm3-nat.c
+++ /dev/null
@@ -1,386 +0,0 @@
-// OBSOLETE /* Definitions to make GDB run on a mips box under Mach 3.0
-// OBSOLETE Copyright 1992, 1993, 1998, 2000, 2001 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 /* Mach specific routines for little endian mips (e.g. pmax)
-// OBSOLETE * running Mach 3.0
-// OBSOLETE *
-// OBSOLETE * Author: Jukka Virtanen <jtv@hut.fi>
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #include "defs.h"
-// OBSOLETE #include "inferior.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE #include <stdio.h>
-// OBSOLETE
-// OBSOLETE #include <mach.h>
-// OBSOLETE #include <mach/message.h>
-// OBSOLETE #include <mach/exception.h>
-// OBSOLETE #include <mach_error.h>
-// OBSOLETE
-// OBSOLETE /* Find offsets to thread states at compile time.
-// OBSOLETE * If your compiler does not grok this, check the hand coded
-// OBSOLETE * offsets and use them.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #if 1
-// OBSOLETE
-// OBSOLETE #define REG_OFFSET(reg) (int)(&((struct mips_thread_state *)0)->reg)
-// OBSOLETE #define CREG_OFFSET(reg) (int)(&((struct mips_float_state *)0)->reg)
-// OBSOLETE #define EREG_OFFSET(reg) (int)(&((struct mips_exc_state *)0)->reg)
-// OBSOLETE
-// OBSOLETE /* at reg_offset[i] is the offset to the mips_thread_state
-// OBSOLETE * location where the gdb registers[i] is stored.
-// OBSOLETE *
-// OBSOLETE * -1 means mach does not save it anywhere.
-// OBSOLETE */
-// OBSOLETE static int reg_offset[] =
-// OBSOLETE {
-// OBSOLETE /* zero at v0 v1 */
-// OBSOLETE -1, REG_OFFSET (r1), REG_OFFSET (r2), REG_OFFSET (r3),
-// OBSOLETE
-// OBSOLETE /* a0 a1 a2 a3 */
-// OBSOLETE REG_OFFSET (r4), REG_OFFSET (r5), REG_OFFSET (r6), REG_OFFSET (r7),
-// OBSOLETE
-// OBSOLETE /* t0 t1 t2 t3 */
-// OBSOLETE REG_OFFSET (r8), REG_OFFSET (r9), REG_OFFSET (r10), REG_OFFSET (r11),
-// OBSOLETE
-// OBSOLETE /* t4 t5 t6 t7 */
-// OBSOLETE REG_OFFSET (r12), REG_OFFSET (r13), REG_OFFSET (r14), REG_OFFSET (r15),
-// OBSOLETE
-// OBSOLETE /* s0 s1 s2 s3 */
-// OBSOLETE REG_OFFSET (r16), REG_OFFSET (r17), REG_OFFSET (r18), REG_OFFSET (r19),
-// OBSOLETE
-// OBSOLETE /* s4 s5 s6 s7 */
-// OBSOLETE REG_OFFSET (r20), REG_OFFSET (r21), REG_OFFSET (r22), REG_OFFSET (r23),
-// OBSOLETE
-// OBSOLETE /* t8 t9 k0 k1 */
-// OBSOLETE REG_OFFSET (r24), REG_OFFSET (r25), REG_OFFSET (r26), REG_OFFSET (r27),
-// OBSOLETE
-// OBSOLETE /* gp sp s8(30) == fp(72) ra */
-// OBSOLETE REG_OFFSET (r28), REG_OFFSET (r29), REG_OFFSET (r30), REG_OFFSET (r31),
-// OBSOLETE
-// OBSOLETE /* sr(32) PS_REGNUM */
-// OBSOLETE EREG_OFFSET (coproc_state),
-// OBSOLETE
-// OBSOLETE /* lo(33) hi(34) */
-// OBSOLETE REG_OFFSET (mdlo), REG_OFFSET (mdhi),
-// OBSOLETE
-// OBSOLETE /* bad(35) cause(36) pc(37) */
-// OBSOLETE EREG_OFFSET (address), EREG_OFFSET (cause), REG_OFFSET (pc),
-// OBSOLETE
-// OBSOLETE /* f0(38) f1(39) f2(40) f3(41) */
-// OBSOLETE CREG_OFFSET (r0), CREG_OFFSET (r1), CREG_OFFSET (r2), CREG_OFFSET (r3),
-// OBSOLETE CREG_OFFSET (r4), CREG_OFFSET (r5), CREG_OFFSET (r6), CREG_OFFSET (r7),
-// OBSOLETE CREG_OFFSET (r8), CREG_OFFSET (r9), CREG_OFFSET (r10), CREG_OFFSET (r11),
-// OBSOLETE CREG_OFFSET (r12), CREG_OFFSET (r13), CREG_OFFSET (r14), CREG_OFFSET (r15),
-// OBSOLETE CREG_OFFSET (r16), CREG_OFFSET (r17), CREG_OFFSET (r18), CREG_OFFSET (r19),
-// OBSOLETE CREG_OFFSET (r20), CREG_OFFSET (r21), CREG_OFFSET (r22), CREG_OFFSET (r23),
-// OBSOLETE CREG_OFFSET (r24), CREG_OFFSET (r25), CREG_OFFSET (r26), CREG_OFFSET (r27),
-// OBSOLETE CREG_OFFSET (r28), CREG_OFFSET (r29), CREG_OFFSET (r30), CREG_OFFSET (r31),
-// OBSOLETE
-// OBSOLETE /* fsr(70) fir(71) fp(72) == s8(30) */
-// OBSOLETE CREG_OFFSET (csr), CREG_OFFSET (esr), REG_OFFSET (r30)
-// OBSOLETE };
-// OBSOLETE #else
-// OBSOLETE /* If the compiler does not grok the above defines */
-// OBSOLETE static int reg_offset[] =
-// OBSOLETE {
-// OBSOLETE /* mach_thread_state offsets: */
-// OBSOLETE -1, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56,
-// OBSOLETE 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120,
-// OBSOLETE /*sr, lo, hi,addr,cause,pc */
-// OBSOLETE 8, 124, 128, 4, 0, 132,
-// OBSOLETE /* mach_float_state offsets: */
-// OBSOLETE 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60,
-// OBSOLETE 64, 68, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 124,
-// OBSOLETE /*fsr,fir */
-// OBSOLETE 128, 132,
-// OBSOLETE /* FP_REGNUM pseudo maps to s8==r30 in mach_thread_state */
-// OBSOLETE 116
-// OBSOLETE };
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* Fetch COUNT contiguous registers from thread STATE starting from REGNUM
-// OBSOLETE * Caller knows that the regs handled in one transaction are of same size.
-// OBSOLETE */
-// OBSOLETE #define FETCH_REGS(state, regnum, count) \
-// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (regnum)], \
-// OBSOLETE (char *)state+reg_offset[ regnum ], \
-// OBSOLETE count*REGISTER_SIZE)
-// OBSOLETE
-// OBSOLETE /* Store COUNT contiguous registers to thread STATE starting from REGNUM */
-// OBSOLETE #define STORE_REGS(state, regnum, count) \
-// OBSOLETE memcpy ((char *)state+reg_offset[ regnum ], \
-// OBSOLETE &deprecated_registers[REGISTER_BYTE (regnum)], \
-// OBSOLETE count*REGISTER_SIZE)
-// OBSOLETE
-// OBSOLETE #define REGS_ALL -1
-// OBSOLETE #define REGS_NORMAL 1
-// OBSOLETE #define REGS_EXC 2
-// OBSOLETE #define REGS_COP1 4
-// OBSOLETE
-// OBSOLETE /* Hardware regs that matches FP_REGNUM */
-// OBSOLETE #define MACH_FP_REGNUM 30
-// OBSOLETE
-// OBSOLETE /* Fech thread's registers. if regno == -1, fetch all regs */
-// OBSOLETE void
-// OBSOLETE fetch_inferior_registers (int regno)
-// OBSOLETE {
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE thread_state_data_t state;
-// OBSOLETE struct mips_exc_state exc_state;
-// OBSOLETE
-// OBSOLETE int stateCnt = MIPS_THREAD_STATE_COUNT;
-// OBSOLETE
-// OBSOLETE int which_regs = 0; /* A bit mask */
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (current_thread))
-// OBSOLETE error ("fetch inferior registers: Invalid thread");
-// OBSOLETE
-// OBSOLETE if (regno < -1 || regno >= NUM_REGS)
-// OBSOLETE error ("invalid register %d supplied to fetch_inferior_registers", regno);
-// OBSOLETE
-// OBSOLETE if (regno == -1)
-// OBSOLETE which_regs = REGS_ALL;
-// OBSOLETE else if (regno == ZERO_REGNUM)
-// OBSOLETE {
-// OBSOLETE int zero = 0;
-// OBSOLETE supply_register (ZERO_REGNUM, &zero);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE else if ((ZERO_REGNUM < regno && regno < PS_REGNUM)
-// OBSOLETE || regno == FP_REGNUM
-// OBSOLETE || regno == LO_REGNUM
-// OBSOLETE || regno == HI_REGNUM
-// OBSOLETE || regno == PC_REGNUM)
-// OBSOLETE which_regs = REGS_NORMAL;
-// OBSOLETE else if (FP0_REGNUM <= regno && regno <= FCRIR_REGNUM)
-// OBSOLETE which_regs = REGS_COP1 | REGS_EXC;
-// OBSOLETE else
-// OBSOLETE which_regs = REGS_EXC;
-// OBSOLETE
-// OBSOLETE /* fetch regs saved to mips_thread_state */
-// OBSOLETE if (which_regs & REGS_NORMAL)
-// OBSOLETE {
-// OBSOLETE ret = thread_get_state (current_thread,
-// OBSOLETE MIPS_THREAD_STATE,
-// OBSOLETE state,
-// OBSOLETE &stateCnt);
-// OBSOLETE CHK ("fetch inferior registers: thread_get_state", ret);
-// OBSOLETE
-// OBSOLETE if (which_regs == REGS_NORMAL)
-// OBSOLETE {
-// OBSOLETE /* Fetch also FP_REGNUM if fetching MACH_FP_REGNUM and vice versa */
-// OBSOLETE if (regno == MACH_FP_REGNUM || regno == FP_REGNUM)
-// OBSOLETE {
-// OBSOLETE supply_register (FP_REGNUM,
-// OBSOLETE (char *) state + reg_offset[MACH_FP_REGNUM]);
-// OBSOLETE supply_register (MACH_FP_REGNUM,
-// OBSOLETE (char *) state + reg_offset[MACH_FP_REGNUM]);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE supply_register (regno,
-// OBSOLETE (char *) state + reg_offset[regno]);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* ZERO_REGNUM is always zero */
-// OBSOLETE *(int *) deprecated_registers = 0;
-// OBSOLETE
-// OBSOLETE /* Copy thread saved regs 1..31 to gdb's reg value array
-// OBSOLETE * Luckily, they are contiquous
-// OBSOLETE */
-// OBSOLETE FETCH_REGS (state, 1, 31);
-// OBSOLETE
-// OBSOLETE /* Copy mdlo and mdhi */
-// OBSOLETE FETCH_REGS (state, LO_REGNUM, 2);
-// OBSOLETE
-// OBSOLETE /* Copy PC */
-// OBSOLETE FETCH_REGS (state, PC_REGNUM, 1);
-// OBSOLETE
-// OBSOLETE /* Mach 3.0 saves FP to MACH_FP_REGNUM.
-// OBSOLETE * For some reason gdb wants to assign a pseudo register for it.
-// OBSOLETE */
-// OBSOLETE FETCH_REGS (state, FP_REGNUM, 1);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Read exc state. Also read if need to fetch floats */
-// OBSOLETE if (which_regs & REGS_EXC)
-// OBSOLETE {
-// OBSOLETE stateCnt = MIPS_EXC_STATE_COUNT;
-// OBSOLETE ret = thread_get_state (current_thread,
-// OBSOLETE MIPS_EXC_STATE,
-// OBSOLETE (thread_state_t) & exc_state,
-// OBSOLETE &stateCnt);
-// OBSOLETE CHK ("fetch inferior regs (exc): thread_get_state", ret);
-// OBSOLETE
-// OBSOLETE /* We need to fetch exc_state to see if the floating
-// OBSOLETE * state is valid for the thread.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /* cproc_state: Which coprocessors the thread uses */
-// OBSOLETE supply_register (PS_REGNUM,
-// OBSOLETE (char *) &exc_state + reg_offset[PS_REGNUM]);
-// OBSOLETE
-// OBSOLETE if (which_regs == REGS_EXC || which_regs == REGS_ALL)
-// OBSOLETE {
-// OBSOLETE supply_register (BADVADDR_REGNUM,
-// OBSOLETE (char *) &exc_state + reg_offset[BADVADDR_REGNUM]);
-// OBSOLETE
-// OBSOLETE supply_register (CAUSE_REGNUM,
-// OBSOLETE (char *) &exc_state + reg_offset[CAUSE_REGNUM]);
-// OBSOLETE if (which_regs == REGS_EXC)
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE if (which_regs & REGS_COP1)
-// OBSOLETE {
-// OBSOLETE /* If the thread does not have saved COPROC1, set regs to zero */
-// OBSOLETE
-// OBSOLETE if (!(exc_state.coproc_state & MIPS_STATUS_USE_COP1))
-// OBSOLETE bzero (&deprecated_registers[REGISTER_BYTE (FP0_REGNUM)],
-// OBSOLETE sizeof (struct mips_float_state));
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE stateCnt = MIPS_FLOAT_STATE_COUNT;
-// OBSOLETE ret = thread_get_state (current_thread,
-// OBSOLETE MIPS_FLOAT_STATE,
-// OBSOLETE state,
-// OBSOLETE &stateCnt);
-// OBSOLETE CHK ("fetch inferior regs (floats): thread_get_state", ret);
-// OBSOLETE
-// OBSOLETE if (regno != -1)
-// OBSOLETE {
-// OBSOLETE supply_register (regno,
-// OBSOLETE (char *) state + reg_offset[regno]);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE FETCH_REGS (state, FP0_REGNUM, 34);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* All registers are valid, if not returned yet */
-// OBSOLETE deprecated_registers_fetched ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Store gdb's view of registers to the thread.
-// OBSOLETE * All registers are always valid when entering here.
-// OBSOLETE * @@ ahem, maybe that is too strict, we could validate the necessary ones
-// OBSOLETE * here.
-// OBSOLETE *
-// OBSOLETE * Hmm. It seems that gdb set $reg=value command first reads everything,
-// OBSOLETE * then sets the reg and then stores everything. -> we must make sure
-// OBSOLETE * that the immutable registers are not changed by reading them first.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE store_inferior_registers (register int regno)
-// OBSOLETE {
-// OBSOLETE thread_state_data_t state;
-// OBSOLETE kern_return_t ret;
-// OBSOLETE
-// OBSOLETE if (!MACH_PORT_VALID (current_thread))
-// OBSOLETE error ("store inferior registers: Invalid thread");
-// OBSOLETE
-// OBSOLETE /* Check for read only regs.
-// OBSOLETE * @@ If some of these is can be changed, fix this
-// OBSOLETE */
-// OBSOLETE if (regno == ZERO_REGNUM ||
-// OBSOLETE regno == PS_REGNUM ||
-// OBSOLETE regno == BADVADDR_REGNUM ||
-// OBSOLETE regno == CAUSE_REGNUM ||
-// OBSOLETE regno == FCRIR_REGNUM)
-// OBSOLETE {
-// OBSOLETE message ("You can not alter read-only register `%s'",
-// OBSOLETE REGISTER_NAME (regno));
-// OBSOLETE fetch_inferior_registers (regno);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (regno == -1)
-// OBSOLETE {
-// OBSOLETE /* Don't allow these to change */
-// OBSOLETE
-// OBSOLETE /* ZERO_REGNUM */
-// OBSOLETE *(int *) deprecated_registers = 0;
-// OBSOLETE
-// OBSOLETE fetch_inferior_registers (PS_REGNUM);
-// OBSOLETE fetch_inferior_registers (BADVADDR_REGNUM);
-// OBSOLETE fetch_inferior_registers (CAUSE_REGNUM);
-// OBSOLETE fetch_inferior_registers (FCRIR_REGNUM);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (regno == -1 || (ZERO_REGNUM < regno && regno <= PC_REGNUM))
-// OBSOLETE {
-// OBSOLETE #if 1
-// OBSOLETE /* Mach 3.0 saves thread's FP to MACH_FP_REGNUM.
-// OBSOLETE * GDB wants assigns a pseudo register FP_REGNUM for frame pointer.
-// OBSOLETE *
-// OBSOLETE * @@@ Here I assume (!) that gdb's FP has the value that
-// OBSOLETE * should go to threads frame pointer. If not true, this
-// OBSOLETE * fails badly!!!!!
-// OBSOLETE */
-// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (MACH_FP_REGNUM)],
-// OBSOLETE &deprecated_registers[REGISTER_BYTE (FP_REGNUM)],
-// OBSOLETE REGISTER_RAW_SIZE (FP_REGNUM));
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE /* Save gdb's regs 1..31 to thread saved regs 1..31
-// OBSOLETE * Luckily, they are contiquous
-// OBSOLETE */
-// OBSOLETE STORE_REGS (state, 1, 31);
-// OBSOLETE
-// OBSOLETE /* Save mdlo, mdhi */
-// OBSOLETE STORE_REGS (state, LO_REGNUM, 2);
-// OBSOLETE
-// OBSOLETE /* Save PC */
-// OBSOLETE STORE_REGS (state, PC_REGNUM, 1);
-// OBSOLETE
-// OBSOLETE ret = thread_set_state (current_thread,
-// OBSOLETE MIPS_THREAD_STATE,
-// OBSOLETE state,
-// OBSOLETE MIPS_FLOAT_STATE_COUNT);
-// OBSOLETE CHK ("store inferior regs : thread_set_state", ret);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (regno == -1 || regno >= FP0_REGNUM)
-// OBSOLETE {
-// OBSOLETE /* If thread has floating state, save it */
-// OBSOLETE if (read_register (PS_REGNUM) & MIPS_STATUS_USE_COP1)
-// OBSOLETE {
-// OBSOLETE /* Do NOT save FCRIR_REGNUM */
-// OBSOLETE STORE_REGS (state, FP0_REGNUM, 33);
-// OBSOLETE
-// OBSOLETE ret = thread_set_state (current_thread,
-// OBSOLETE MIPS_FLOAT_STATE,
-// OBSOLETE state,
-// OBSOLETE MIPS_FLOAT_STATE_COUNT);
-// OBSOLETE CHK ("store inferior registers (floats): thread_set_state", ret);
-// OBSOLETE }
-// OBSOLETE else if (regno != -1)
-// OBSOLETE message
-// OBSOLETE ("Thread does not use floating point unit, floating regs not saved");
-// OBSOLETE }
-// OBSOLETE }
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index 1c75389..686d256 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -127,7 +127,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, REGISTER_RAW_SIZE (regi));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regi));
}
}
diff --git a/gdb/mn10200-tdep.c b/gdb/mn10200-tdep.c
deleted file mode 100644
index a484f02a..0000000
--- a/gdb/mn10200-tdep.c
+++ /dev/null
@@ -1,899 +0,0 @@
-// OBSOLETE /* Target-dependent code for the Matsushita MN10200 for GDB, the GNU debugger.
-// OBSOLETE
-// OBSOLETE Copyright 1997, 1998, 1999, 2000, 2001, 2003 Free Software
-// OBSOLETE 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 "defs.h"
-// OBSOLETE #include "frame.h"
-// OBSOLETE #include "inferior.h"
-// OBSOLETE #include "target.h"
-// OBSOLETE #include "value.h"
-// OBSOLETE #include "bfd.h"
-// OBSOLETE #include "gdb_string.h"
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include "symfile.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Should call_function allocate stack space for a struct return? */
-// OBSOLETE int
-// OBSOLETE mn10200_use_struct_convention (int gcc_p, struct type *type)
-// OBSOLETE {
-// OBSOLETE return (TYPE_NFIELDS (type) > 1 || TYPE_LENGTH (type) > 8);
-// OBSOLETE }
-// OBSOLETE /* *INDENT-OFF* */
-// OBSOLETE /* The main purpose of this file is dealing with prologues to extract
-// OBSOLETE information about stack frames and saved registers.
-// OBSOLETE
-// OBSOLETE For reference here's how prologues look on the mn10200:
-// OBSOLETE
-// OBSOLETE With frame pointer:
-// OBSOLETE mov fp,a0
-// OBSOLETE mov sp,fp
-// OBSOLETE add <size>,sp
-// OBSOLETE Register saves for d2, d3, a1, a2 as needed. Saves start
-// OBSOLETE at fp - <size> + <outgoing_args_size> and work towards higher
-// OBSOLETE addresses. Note that the saves are actually done off the stack
-// OBSOLETE pointer in the prologue! This makes for smaller code and easier
-// OBSOLETE prologue scanning as the displacement fields will unlikely
-// OBSOLETE be more than 8 bits!
-// OBSOLETE
-// OBSOLETE Without frame pointer:
-// OBSOLETE add <size>,sp
-// OBSOLETE Register saves for d2, d3, a1, a2 as needed. Saves start
-// OBSOLETE at sp + <outgoing_args_size> and work towards higher addresses.
-// OBSOLETE
-// OBSOLETE Out of line prologue:
-// OBSOLETE add <local size>,sp -- optional
-// OBSOLETE jsr __prologue
-// OBSOLETE add <outgoing_size>,sp -- optional
-// OBSOLETE
-// OBSOLETE The stack pointer remains constant throughout the life of most
-// OBSOLETE functions. As a result the compiler will usually omit the
-// OBSOLETE frame pointer, so we must handle frame pointerless functions. */
-// OBSOLETE
-// OBSOLETE /* Analyze the prologue to determine where registers are saved,
-// OBSOLETE the end of the prologue, etc etc. Return the end of the prologue
-// OBSOLETE scanned.
-// OBSOLETE
-// OBSOLETE We store into FI (if non-null) several tidbits of information:
-// OBSOLETE
-// OBSOLETE * stack_size -- size of this stack frame. Note that if we stop in
-// OBSOLETE certain parts of the prologue/epilogue we may claim the size of the
-// OBSOLETE current frame is zero. This happens when the current frame has
-// OBSOLETE not been allocated yet or has already been deallocated.
-// OBSOLETE
-// OBSOLETE * fsr -- Addresses of registers saved in the stack by this frame.
-// OBSOLETE
-// OBSOLETE * status -- A (relatively) generic status indicator. It's a bitmask
-// OBSOLETE with the following bits:
-// OBSOLETE
-// OBSOLETE MY_FRAME_IN_SP: The base of the current frame is actually in
-// OBSOLETE the stack pointer. This can happen for frame pointerless
-// OBSOLETE functions, or cases where we're stopped in the prologue/epilogue
-// OBSOLETE itself. For these cases mn10200_analyze_prologue will need up
-// OBSOLETE update fi->frame before returning or analyzing the register
-// OBSOLETE save instructions.
-// OBSOLETE
-// OBSOLETE MY_FRAME_IN_FP: The base of the current frame is in the
-// OBSOLETE frame pointer register ($a2).
-// OBSOLETE
-// OBSOLETE CALLER_A2_IN_A0: $a2 from the caller's frame is temporarily
-// OBSOLETE in $a0. This can happen if we're stopped in the prologue.
-// OBSOLETE
-// OBSOLETE NO_MORE_FRAMES: Set this if the current frame is "start" or
-// OBSOLETE if the first instruction looks like mov <imm>,sp. This tells
-// OBSOLETE frame chain to not bother trying to unwind past this frame. */
-// OBSOLETE /* *INDENT-ON* */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE #define MY_FRAME_IN_SP 0x1
-// OBSOLETE #define MY_FRAME_IN_FP 0x2
-// OBSOLETE #define CALLER_A2_IN_A0 0x4
-// OBSOLETE #define NO_MORE_FRAMES 0x8
-// OBSOLETE
-// OBSOLETE static CORE_ADDR
-// OBSOLETE mn10200_analyze_prologue (struct frame_info *fi, CORE_ADDR pc)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR func_addr, func_end, addr, stop;
-// OBSOLETE CORE_ADDR stack_size = 0;
-// OBSOLETE unsigned char buf[4];
-// OBSOLETE int status;
-// OBSOLETE char *name;
-// OBSOLETE int out_of_line_prologue = 0;
-// OBSOLETE
-// OBSOLETE /* Use the PC in the frame if it's provided to look up the
-// OBSOLETE start of this function. */
-// OBSOLETE pc = (fi ? get_frame_pc (fi) : pc);
-// OBSOLETE
-// OBSOLETE /* Find the start of this function. */
-// OBSOLETE status = find_pc_partial_function (pc, &name, &func_addr, &func_end);
-// OBSOLETE
-// OBSOLETE /* Do nothing if we couldn't find the start of this function or if we're
-// OBSOLETE stopped at the first instruction in the prologue. */
-// OBSOLETE if (status == 0)
-// OBSOLETE return pc;
-// OBSOLETE
-// OBSOLETE /* If we're in start, then give up. */
-// OBSOLETE if (strcmp (name, "start") == 0)
-// OBSOLETE {
-// OBSOLETE if (fi)
-// OBSOLETE fi->status = NO_MORE_FRAMES;
-// OBSOLETE return pc;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* At the start of a function our frame is in the stack pointer. */
-// OBSOLETE if (fi)
-// OBSOLETE fi->status = MY_FRAME_IN_SP;
-// OBSOLETE
-// OBSOLETE /* If we're physically on an RTS instruction, then our frame has already
-// OBSOLETE been deallocated.
-// OBSOLETE
-// OBSOLETE fi->frame is bogus, we need to fix it. */
-// OBSOLETE if (fi && get_frame_pc (fi) + 1 == func_end)
-// OBSOLETE {
-// OBSOLETE status = target_read_memory (get_frame_pc (fi), buf, 1);
-// OBSOLETE if (status != 0)
-// OBSOLETE {
-// OBSOLETE if (get_next_frame (fi) == NULL)
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return get_frame_pc (fi);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (buf[0] == 0xfe)
-// OBSOLETE {
-// OBSOLETE if (get_next_frame (fi) == NULL)
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return get_frame_pc (fi);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Similarly if we're stopped on the first insn of a prologue as our
-// OBSOLETE frame hasn't been allocated yet. */
-// OBSOLETE if (fi && get_frame_pc (fi) == func_addr)
-// OBSOLETE {
-// OBSOLETE if (get_next_frame (fi) == NULL)
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return get_frame_pc (fi);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Figure out where to stop scanning. */
-// OBSOLETE stop = fi ? get_frame_pc (fi) : func_end;
-// OBSOLETE
-// OBSOLETE /* Don't walk off the end of the function. */
-// OBSOLETE stop = stop > func_end ? func_end : stop;
-// OBSOLETE
-// OBSOLETE /* Start scanning on the first instruction of this function. */
-// OBSOLETE addr = func_addr;
-// OBSOLETE
-// OBSOLETE status = target_read_memory (addr, buf, 2);
-// OBSOLETE if (status != 0)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && fi->status & MY_FRAME_IN_SP)
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* First see if this insn sets the stack pointer; if so, it's something
-// OBSOLETE we won't understand, so quit now. */
-// OBSOLETE if (buf[0] == 0xdf
-// OBSOLETE || (buf[0] == 0xf4 && buf[1] == 0x77))
-// OBSOLETE {
-// OBSOLETE if (fi)
-// OBSOLETE fi->status = NO_MORE_FRAMES;
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Now see if we have a frame pointer.
-// OBSOLETE
-// OBSOLETE Search for mov a2,a0 (0xf278)
-// OBSOLETE then mov a3,a2 (0xf27e). */
-// OBSOLETE
-// OBSOLETE if (buf[0] == 0xf2 && buf[1] == 0x78)
-// OBSOLETE {
-// OBSOLETE /* Our caller's $a2 will be found in $a0 now. Note it for
-// OBSOLETE our callers. */
-// OBSOLETE if (fi)
-// OBSOLETE fi->status |= CALLER_A2_IN_A0;
-// OBSOLETE addr += 2;
-// OBSOLETE if (addr >= stop)
-// OBSOLETE {
-// OBSOLETE /* We still haven't allocated our local stack. Handle this
-// OBSOLETE as if we stopped on the first or last insn of a function. */
-// OBSOLETE if (fi && get_next_frame (fi) == NULL)
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE status = target_read_memory (addr, buf, 2);
-// OBSOLETE if (status != 0)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL)
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE if (buf[0] == 0xf2 && buf[1] == 0x7e)
-// OBSOLETE {
-// OBSOLETE addr += 2;
-// OBSOLETE
-// OBSOLETE /* Our frame pointer is valid now. */
-// OBSOLETE if (fi)
-// OBSOLETE {
-// OBSOLETE fi->status |= MY_FRAME_IN_FP;
-// OBSOLETE fi->status &= ~MY_FRAME_IN_SP;
-// OBSOLETE }
-// OBSOLETE if (addr >= stop)
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL)
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Next we should allocate the local frame.
-// OBSOLETE
-// OBSOLETE Search for add imm8,a3 (0xd3XX)
-// OBSOLETE or add imm16,a3 (0xf70bXXXX)
-// OBSOLETE or add imm24,a3 (0xf467XXXXXX).
-// OBSOLETE
-// OBSOLETE If none of the above was found, then this prologue has
-// OBSOLETE no stack, and therefore can't have any register saves,
-// OBSOLETE so quit now. */
-// OBSOLETE status = target_read_memory (addr, buf, 2);
-// OBSOLETE if (status != 0)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE if (buf[0] == 0xd3)
-// OBSOLETE {
-// OBSOLETE stack_size = extract_signed_integer (&buf[1], 1);
-// OBSOLETE if (fi)
-// OBSOLETE fi->stack_size = stack_size;
-// OBSOLETE addr += 2;
-// OBSOLETE if (addr >= stop)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else if (buf[0] == 0xf7 && buf[1] == 0x0b)
-// OBSOLETE {
-// OBSOLETE status = target_read_memory (addr + 2, buf, 2);
-// OBSOLETE if (status != 0)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE stack_size = extract_signed_integer (buf, 2);
-// OBSOLETE if (fi)
-// OBSOLETE fi->stack_size = stack_size;
-// OBSOLETE addr += 4;
-// OBSOLETE if (addr >= stop)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else if (buf[0] == 0xf4 && buf[1] == 0x67)
-// OBSOLETE {
-// OBSOLETE status = target_read_memory (addr + 2, buf, 3);
-// OBSOLETE if (status != 0)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE stack_size = extract_signed_integer (buf, 3);
-// OBSOLETE if (fi)
-// OBSOLETE fi->stack_size = stack_size;
-// OBSOLETE addr += 5;
-// OBSOLETE if (addr >= stop)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp () - stack_size);
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Now see if we have a call to __prologue for an out of line
-// OBSOLETE prologue. */
-// OBSOLETE status = target_read_memory (addr, buf, 2);
-// OBSOLETE if (status != 0)
-// OBSOLETE return addr;
-// OBSOLETE
-// OBSOLETE /* First check for 16bit pc-relative call to __prologue. */
-// OBSOLETE if (buf[0] == 0xfd)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR temp;
-// OBSOLETE status = target_read_memory (addr + 1, buf, 2);
-// OBSOLETE if (status != 0)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Get the PC this instruction will branch to. */
-// OBSOLETE temp = (extract_signed_integer (buf, 2) + addr + 3) & 0xffffff;
-// OBSOLETE
-// OBSOLETE /* Get the name of the function at the target address. */
-// OBSOLETE status = find_pc_partial_function (temp, &name, NULL, NULL);
-// OBSOLETE if (status == 0)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Note if it is an out of line prologue. */
-// OBSOLETE out_of_line_prologue = (strcmp (name, "__prologue") == 0);
-// OBSOLETE
-// OBSOLETE /* This sucks up 3 bytes of instruction space. */
-// OBSOLETE if (out_of_line_prologue)
-// OBSOLETE addr += 3;
-// OBSOLETE
-// OBSOLETE if (addr >= stop)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL)
-// OBSOLETE {
-// OBSOLETE fi->stack_size -= 16;
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
-// OBSOLETE }
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE /* Now check for the 24bit pc-relative call to __prologue. */
-// OBSOLETE else if (buf[0] == 0xf4 && buf[1] == 0xe1)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR temp;
-// OBSOLETE status = target_read_memory (addr + 2, buf, 3);
-// OBSOLETE if (status != 0)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Get the PC this instruction will branch to. */
-// OBSOLETE temp = (extract_signed_integer (buf, 3) + addr + 5) & 0xffffff;
-// OBSOLETE
-// OBSOLETE /* Get the name of the function at the target address. */
-// OBSOLETE status = find_pc_partial_function (temp, &name, NULL, NULL);
-// OBSOLETE if (status == 0)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp ());
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Note if it is an out of line prologue. */
-// OBSOLETE out_of_line_prologue = (strcmp (name, "__prologue") == 0);
-// OBSOLETE
-// OBSOLETE /* This sucks up 5 bytes of instruction space. */
-// OBSOLETE if (out_of_line_prologue)
-// OBSOLETE addr += 5;
-// OBSOLETE
-// OBSOLETE if (addr >= stop)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP))
-// OBSOLETE {
-// OBSOLETE fi->stack_size -= 16;
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
-// OBSOLETE }
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Now actually handle the out of line prologue. */
-// OBSOLETE if (out_of_line_prologue)
-// OBSOLETE {
-// OBSOLETE int outgoing_args_size = 0;
-// OBSOLETE
-// OBSOLETE /* First adjust the stack size for this function. The out of
-// OBSOLETE line prologue saves 4 registers (16bytes of data). */
-// OBSOLETE if (fi)
-// OBSOLETE fi->stack_size -= 16;
-// OBSOLETE
-// OBSOLETE /* Update fi->frame if necessary. */
-// OBSOLETE if (fi && get_next_frame (fi) == NULL)
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
-// OBSOLETE
-// OBSOLETE /* After the out of line prologue, there may be another
-// OBSOLETE stack adjustment for the outgoing arguments.
-// OBSOLETE
-// OBSOLETE Search for add imm8,a3 (0xd3XX)
-// OBSOLETE or add imm16,a3 (0xf70bXXXX)
-// OBSOLETE or add imm24,a3 (0xf467XXXXXX). */
-// OBSOLETE
-// OBSOLETE status = target_read_memory (addr, buf, 2);
-// OBSOLETE if (status != 0)
-// OBSOLETE {
-// OBSOLETE if (fi)
-// OBSOLETE {
-// OBSOLETE fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4;
-// OBSOLETE fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8;
-// OBSOLETE fi->fsr.regs[5] = get_frame_base (fi) + fi->stack_size + 12;
-// OBSOLETE fi->fsr.regs[6] = get_frame_base (fi) + fi->stack_size + 16;
-// OBSOLETE }
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (buf[0] == 0xd3)
-// OBSOLETE {
-// OBSOLETE outgoing_args_size = extract_signed_integer (&buf[1], 1);
-// OBSOLETE addr += 2;
-// OBSOLETE }
-// OBSOLETE else if (buf[0] == 0xf7 && buf[1] == 0x0b)
-// OBSOLETE {
-// OBSOLETE status = target_read_memory (addr + 2, buf, 2);
-// OBSOLETE if (status != 0)
-// OBSOLETE {
-// OBSOLETE if (fi)
-// OBSOLETE {
-// OBSOLETE fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4;
-// OBSOLETE fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8;
-// OBSOLETE fi->fsr.regs[5] = get_frame_base (fi) + fi->stack_size + 12;
-// OBSOLETE fi->fsr.regs[6] = get_frame_base (fi) + fi->stack_size + 16;
-// OBSOLETE }
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE outgoing_args_size = extract_signed_integer (buf, 2);
-// OBSOLETE addr += 4;
-// OBSOLETE }
-// OBSOLETE else if (buf[0] == 0xf4 && buf[1] == 0x67)
-// OBSOLETE {
-// OBSOLETE status = target_read_memory (addr + 2, buf, 3);
-// OBSOLETE if (status != 0)
-// OBSOLETE {
-// OBSOLETE if (fi && get_next_frame (fi) == NULL)
-// OBSOLETE {
-// OBSOLETE fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4;
-// OBSOLETE fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8;
-// OBSOLETE fi->fsr.regs[5] = get_frame_base (fi) + fi->stack_size + 12;
-// OBSOLETE fi->fsr.regs[6] = get_frame_base (fi) + fi->stack_size + 16;
-// OBSOLETE }
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE outgoing_args_size = extract_signed_integer (buf, 3);
-// OBSOLETE addr += 5;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE outgoing_args_size = 0;
-// OBSOLETE
-// OBSOLETE /* Now that we know the size of the outgoing arguments, fix
-// OBSOLETE fi->frame again if this is the innermost frame. */
-// OBSOLETE if (fi && get_next_frame (fi) == NULL)
-// OBSOLETE deprecated_update_frame_base_hack (fi, get_frame_base (fi) - outgoing_args_size);
-// OBSOLETE
-// OBSOLETE /* Note the register save information and update the stack
-// OBSOLETE size for this frame too. */
-// OBSOLETE if (fi)
-// OBSOLETE {
-// OBSOLETE fi->fsr.regs[2] = get_frame_base (fi) + fi->stack_size + 4;
-// OBSOLETE fi->fsr.regs[3] = get_frame_base (fi) + fi->stack_size + 8;
-// OBSOLETE fi->fsr.regs[5] = get_frame_base (fi) + fi->stack_size + 12;
-// OBSOLETE fi->fsr.regs[6] = get_frame_base (fi) + fi->stack_size + 16;
-// OBSOLETE fi->stack_size += outgoing_args_size;
-// OBSOLETE }
-// OBSOLETE /* There can be no more prologue insns, so return now. */
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* At this point fi->frame needs to be correct.
-// OBSOLETE
-// OBSOLETE If MY_FRAME_IN_SP is set and we're the innermost frame, then we
-// OBSOLETE need to fix fi->frame so that backtracing, find_frame_saved_regs,
-// OBSOLETE etc work correctly. */
-// OBSOLETE if (fi && get_next_frame (fi) == NULL && (fi->status & MY_FRAME_IN_SP) != 0)
-// OBSOLETE deprecated_update_frame_base_hack (fi, read_sp () - fi->stack_size);
-// OBSOLETE
-// OBSOLETE /* And last we have the register saves. These are relatively
-// OBSOLETE simple because they're physically done off the stack pointer,
-// OBSOLETE and thus the number of different instructions we need to
-// OBSOLETE check is greatly reduced because we know the displacements
-// OBSOLETE will be small.
-// OBSOLETE
-// OBSOLETE Search for movx d2,(X,a3) (0xf55eXX)
-// OBSOLETE then movx d3,(X,a3) (0xf55fXX)
-// OBSOLETE then mov a1,(X,a3) (0x5dXX) No frame pointer case
-// OBSOLETE then mov a2,(X,a3) (0x5eXX) No frame pointer case
-// OBSOLETE or mov a0,(X,a3) (0x5cXX) Frame pointer case. */
-// OBSOLETE
-// OBSOLETE status = target_read_memory (addr, buf, 2);
-// OBSOLETE if (status != 0)
-// OBSOLETE return addr;
-// OBSOLETE if (buf[0] == 0xf5 && buf[1] == 0x5e)
-// OBSOLETE {
-// OBSOLETE if (fi)
-// OBSOLETE {
-// OBSOLETE status = target_read_memory (addr + 2, buf, 1);
-// OBSOLETE if (status != 0)
-// OBSOLETE return addr;
-// OBSOLETE fi->fsr.regs[2] = (get_frame_base (fi) + stack_size
-// OBSOLETE + extract_signed_integer (buf, 1));
-// OBSOLETE }
-// OBSOLETE addr += 3;
-// OBSOLETE if (addr >= stop)
-// OBSOLETE return addr;
-// OBSOLETE status = target_read_memory (addr, buf, 2);
-// OBSOLETE if (status != 0)
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE if (buf[0] == 0xf5 && buf[1] == 0x5f)
-// OBSOLETE {
-// OBSOLETE if (fi)
-// OBSOLETE {
-// OBSOLETE status = target_read_memory (addr + 2, buf, 1);
-// OBSOLETE if (status != 0)
-// OBSOLETE return addr;
-// OBSOLETE fi->fsr.regs[3] = (get_frame_base (fi) + stack_size
-// OBSOLETE + extract_signed_integer (buf, 1));
-// OBSOLETE }
-// OBSOLETE addr += 3;
-// OBSOLETE if (addr >= stop)
-// OBSOLETE return addr;
-// OBSOLETE status = target_read_memory (addr, buf, 2);
-// OBSOLETE if (status != 0)
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE if (buf[0] == 0x5d)
-// OBSOLETE {
-// OBSOLETE if (fi)
-// OBSOLETE {
-// OBSOLETE status = target_read_memory (addr + 1, buf, 1);
-// OBSOLETE if (status != 0)
-// OBSOLETE return addr;
-// OBSOLETE fi->fsr.regs[5] = (get_frame_base (fi) + stack_size
-// OBSOLETE + extract_signed_integer (buf, 1));
-// OBSOLETE }
-// OBSOLETE addr += 2;
-// OBSOLETE if (addr >= stop)
-// OBSOLETE return addr;
-// OBSOLETE status = target_read_memory (addr, buf, 2);
-// OBSOLETE if (status != 0)
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE if (buf[0] == 0x5e || buf[0] == 0x5c)
-// OBSOLETE {
-// OBSOLETE if (fi)
-// OBSOLETE {
-// OBSOLETE status = target_read_memory (addr + 1, buf, 1);
-// OBSOLETE if (status != 0)
-// OBSOLETE return addr;
-// OBSOLETE fi->fsr.regs[6] = (get_frame_base (fi) + stack_size
-// OBSOLETE + extract_signed_integer (buf, 1));
-// OBSOLETE fi->status &= ~CALLER_A2_IN_A0;
-// OBSOLETE }
-// OBSOLETE addr += 2;
-// OBSOLETE if (addr >= stop)
-// OBSOLETE return addr;
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE return addr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Function: frame_chain
-// OBSOLETE Figure out and return the caller's frame pointer given current
-// OBSOLETE frame_info struct.
-// OBSOLETE
-// OBSOLETE We don't handle dummy frames yet but we would probably just return the
-// OBSOLETE stack pointer that was in use at the time the function call was made? */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE mn10200_frame_chain (struct frame_info *fi)
-// OBSOLETE {
-// OBSOLETE struct frame_info *dummy_frame = deprecated_frame_xmalloc ();
-// OBSOLETE struct cleanup *old_chain = make_cleanup (xfree, dummy_frame);
-// OBSOLETE CORE_ADDR ret;
-// OBSOLETE
-// OBSOLETE /* Walk through the prologue to determine the stack size,
-// OBSOLETE location of saved registers, end of the prologue, etc. */
-// OBSOLETE if (fi->status == 0)
-// OBSOLETE mn10200_analyze_prologue (fi, (CORE_ADDR) 0);
-// OBSOLETE
-// OBSOLETE /* Quit now if mn10200_analyze_prologue set NO_MORE_FRAMES. */
-// OBSOLETE if (fi->status & NO_MORE_FRAMES)
-// OBSOLETE return 0;
-// OBSOLETE
-// OBSOLETE /* Now that we've analyzed our prologue, determine the frame
-// OBSOLETE pointer for our caller.
-// OBSOLETE
-// OBSOLETE If our caller has a frame pointer, then we need to
-// OBSOLETE find the entry value of $a2 to our function.
-// OBSOLETE
-// OBSOLETE If CALLER_A2_IN_A0, then the chain is in $a0.
-// OBSOLETE
-// OBSOLETE If fsr.regs[6] is nonzero, then it's at the memory
-// OBSOLETE location pointed to by fsr.regs[6].
-// OBSOLETE
-// OBSOLETE Else it's still in $a2.
-// OBSOLETE
-// OBSOLETE If our caller does not have a frame pointer, then his
-// OBSOLETE frame base is fi->frame + -caller's stack size + 4. */
-// OBSOLETE
-// OBSOLETE /* The easiest way to get that info is to analyze our caller's frame.
-// OBSOLETE
-// OBSOLETE So we set up a dummy frame and call mn10200_analyze_prologue to
-// OBSOLETE find stuff for us. */
-// OBSOLETE deprecated_update_frame_pc_hack (dummy_frame, FRAME_SAVED_PC (fi));
-// OBSOLETE deprecated_update_frame_base_hack (dummy_frame, get_frame_base (fi));
-// OBSOLETE memset (dummy_frame->fsr.regs, '\000', sizeof dummy_frame->fsr.regs);
-// OBSOLETE dummy_frame->status = 0;
-// OBSOLETE dummy_frame->stack_size = 0;
-// OBSOLETE mn10200_analyze_prologue (dummy_frame, 0);
-// OBSOLETE
-// OBSOLETE if (dummy_frame->status & MY_FRAME_IN_FP)
-// OBSOLETE {
-// OBSOLETE /* Our caller has a frame pointer. So find the frame in $a2, $a0,
-// OBSOLETE or in the stack. */
-// OBSOLETE if (fi->fsr.regs[6])
-// OBSOLETE ret = (read_memory_integer (fi->fsr.regs[FP_REGNUM], REGISTER_SIZE)
-// OBSOLETE & 0xffffff);
-// OBSOLETE else if (fi->status & CALLER_A2_IN_A0)
-// OBSOLETE ret = read_register (4);
-// OBSOLETE else
-// OBSOLETE ret = read_register (FP_REGNUM);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* Our caller does not have a frame pointer. So his frame starts
-// OBSOLETE at the base of our frame (fi->frame) + <his size> + 4 (saved pc). */
-// OBSOLETE ret = get_frame_base (fi) + -dummy_frame->stack_size + 4;
-// OBSOLETE }
-// OBSOLETE do_cleanups (old_chain);
-// OBSOLETE return ret;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Function: skip_prologue
-// OBSOLETE Return the address of the first inst past the prologue of the function. */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE mn10200_skip_prologue (CORE_ADDR pc)
-// OBSOLETE {
-// OBSOLETE /* We used to check the debug symbols, but that can lose if
-// OBSOLETE we have a null prologue. */
-// OBSOLETE return mn10200_analyze_prologue (NULL, pc);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Function: pop_frame
-// OBSOLETE This routine gets called when either the user uses the `return'
-// OBSOLETE command, or the call dummy breakpoint gets hit. */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE mn10200_pop_frame (struct frame_info *frame)
-// OBSOLETE {
-// OBSOLETE int regnum;
-// OBSOLETE
-// OBSOLETE if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-// OBSOLETE get_frame_base (frame),
-// OBSOLETE get_frame_base (frame)))
-// OBSOLETE generic_pop_dummy_frame ();
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE write_register (PC_REGNUM, FRAME_SAVED_PC (frame));
-// OBSOLETE
-// OBSOLETE /* Restore any saved registers. */
-// OBSOLETE for (regnum = 0; regnum < NUM_REGS; regnum++)
-// OBSOLETE if (frame->fsr.regs[regnum] != 0)
-// OBSOLETE {
-// OBSOLETE ULONGEST value;
-// OBSOLETE
-// OBSOLETE value = read_memory_unsigned_integer (frame->fsr.regs[regnum],
-// OBSOLETE REGISTER_RAW_SIZE (regnum));
-// OBSOLETE write_register (regnum, value);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Actually cut back the stack. */
-// OBSOLETE write_register (SP_REGNUM, get_frame_base (frame));
-// OBSOLETE
-// OBSOLETE /* Don't we need to set the PC?!? XXX FIXME. */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Throw away any cached frame information. */
-// OBSOLETE flush_cached_frames ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Function: push_arguments
-// OBSOLETE Setup arguments for a call to the target. Arguments go in
-// OBSOLETE order on the stack. */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE mn10200_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
-// OBSOLETE unsigned char struct_return, CORE_ADDR struct_addr)
-// OBSOLETE {
-// OBSOLETE int argnum = 0;
-// OBSOLETE int len = 0;
-// OBSOLETE int stack_offset = 0;
-// OBSOLETE int regsused = struct_return ? 1 : 0;
-// OBSOLETE
-// OBSOLETE /* This should be a nop, but align the stack just in case something
-// OBSOLETE went wrong. Stacks are two byte aligned on the mn10200. */
-// OBSOLETE sp &= ~1;
-// OBSOLETE
-// OBSOLETE /* Now make space on the stack for the args.
-// OBSOLETE
-// OBSOLETE XXX This doesn't appear to handle pass-by-invisible reference
-// OBSOLETE arguments. */
-// OBSOLETE for (argnum = 0; argnum < nargs; argnum++)
-// OBSOLETE {
-// OBSOLETE int arg_length = (TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 1) & ~1;
-// OBSOLETE
-// OBSOLETE /* If we've used all argument registers, then this argument is
-// OBSOLETE pushed. */
-// OBSOLETE if (regsused >= 2 || arg_length > 4)
-// OBSOLETE {
-// OBSOLETE regsused = 2;
-// OBSOLETE len += arg_length;
-// OBSOLETE }
-// OBSOLETE /* We know we've got some arg register space left. If this argument
-// OBSOLETE will fit entirely in regs, then put it there. */
-// OBSOLETE else if (arg_length <= 2
-// OBSOLETE || TYPE_CODE (VALUE_TYPE (args[argnum])) == TYPE_CODE_PTR)
-// OBSOLETE {
-// OBSOLETE regsused++;
-// OBSOLETE }
-// OBSOLETE else if (regsused == 0)
-// OBSOLETE {
-// OBSOLETE regsused = 2;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE regsused = 2;
-// OBSOLETE len += arg_length;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Allocate stack space. */
-// OBSOLETE sp -= len;
-// OBSOLETE
-// OBSOLETE regsused = struct_return ? 1 : 0;
-// OBSOLETE /* Push all arguments onto the stack. */
-// OBSOLETE for (argnum = 0; argnum < nargs; argnum++)
-// OBSOLETE {
-// OBSOLETE int len;
-// OBSOLETE char *val;
-// OBSOLETE
-// OBSOLETE /* XXX Check this. What about UNIONS? */
-// OBSOLETE if (TYPE_CODE (VALUE_TYPE (*args)) == TYPE_CODE_STRUCT
-// OBSOLETE && TYPE_LENGTH (VALUE_TYPE (*args)) > 8)
-// OBSOLETE {
-// OBSOLETE /* XXX Wrong, we want a pointer to this argument. */
-// OBSOLETE len = TYPE_LENGTH (VALUE_TYPE (*args));
-// OBSOLETE val = (char *) VALUE_CONTENTS (*args);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE len = TYPE_LENGTH (VALUE_TYPE (*args));
-// OBSOLETE val = (char *) VALUE_CONTENTS (*args);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (regsused < 2
-// OBSOLETE && (len <= 2
-// OBSOLETE || TYPE_CODE (VALUE_TYPE (*args)) == TYPE_CODE_PTR))
-// OBSOLETE {
-// OBSOLETE write_register (regsused, extract_unsigned_integer (val, 4));
-// OBSOLETE regsused++;
-// OBSOLETE }
-// OBSOLETE else if (regsused == 0 && len == 4)
-// OBSOLETE {
-// OBSOLETE write_register (regsused, extract_unsigned_integer (val, 2));
-// OBSOLETE write_register (regsused + 1, extract_unsigned_integer (val + 2, 2));
-// OBSOLETE regsused = 2;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE regsused = 2;
-// OBSOLETE while (len > 0)
-// OBSOLETE {
-// OBSOLETE write_memory (sp + stack_offset, val, 2);
-// OBSOLETE
-// OBSOLETE len -= 2;
-// OBSOLETE val += 2;
-// OBSOLETE stack_offset += 2;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE args++;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return sp;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Function: push_return_address (pc)
-// OBSOLETE Set up the return address for the inferior function call.
-// OBSOLETE Needed for targets where we don't actually execute a JSR/BSR instruction */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE mn10200_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
-// OBSOLETE {
-// OBSOLETE unsigned char buf[4];
-// OBSOLETE
-// OBSOLETE store_unsigned_integer (buf, 4, CALL_DUMMY_ADDRESS ());
-// OBSOLETE write_memory (sp - 4, buf, 4);
-// OBSOLETE return sp - 4;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Function: store_struct_return (addr,sp)
-// OBSOLETE Store the structure value return address for an inferior function
-// OBSOLETE call. */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE mn10200_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-// OBSOLETE {
-// OBSOLETE /* The structure return address is passed as the first argument. */
-// OBSOLETE write_register (0, addr);
-// OBSOLETE return sp;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Function: frame_saved_pc
-// OBSOLETE Find the caller of this frame. We do this by seeing if RP_REGNUM
-// OBSOLETE is saved in the stack anywhere, otherwise we get it from the
-// OBSOLETE registers. If the inner frame is a dummy frame, return its PC
-// OBSOLETE instead of RP, because that's where "caller" of the dummy-frame
-// OBSOLETE will be found. */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE mn10200_frame_saved_pc (struct frame_info *fi)
-// OBSOLETE {
-// OBSOLETE /* The saved PC will always be at the base of the current frame. */
-// OBSOLETE return (read_memory_integer (get_frame_base (fi), REGISTER_SIZE) & 0xffffff);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Function: init_extra_frame_info
-// OBSOLETE Setup the frame's frame pointer, pc, and frame addresses for saved
-// OBSOLETE registers. Most of the work is done in mn10200_analyze_prologue().
-// OBSOLETE
-// OBSOLETE Note that when we are called for the last frame (currently active frame),
-// OBSOLETE that get_frame_pc (fi) and fi->frame will already be setup. However, fi->frame will
-// OBSOLETE be valid only if this routine uses FP. For previous frames, fi-frame will
-// OBSOLETE always be correct. mn10200_analyze_prologue will fix fi->frame if
-// OBSOLETE it's not valid.
-// OBSOLETE
-// OBSOLETE We can be called with the PC in the call dummy under two circumstances.
-// OBSOLETE First, during normal backtracing, second, while figuring out the frame
-// OBSOLETE pointer just prior to calling the target function (see run_stack_dummy). */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE mn10200_init_extra_frame_info (struct frame_info *fi)
-// OBSOLETE {
-// OBSOLETE if (get_next_frame (fi))
-// OBSOLETE deprecated_update_frame_pc_hack (fi, FRAME_SAVED_PC (get_next_frame (fi)));
-// OBSOLETE
-// OBSOLETE memset (fi->fsr.regs, '\000', sizeof fi->fsr.regs);
-// OBSOLETE fi->status = 0;
-// OBSOLETE fi->stack_size = 0;
-// OBSOLETE
-// OBSOLETE mn10200_analyze_prologue (fi, 0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE _initialize_mn10200_tdep (void)
-// OBSOLETE {
-// OBSOLETE tm_print_insn = print_insn_mn10200;
-// OBSOLETE }
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 2385d37..42c54fc 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -134,7 +134,7 @@ static CORE_ADDR
mn10300_extract_struct_value_address (char *regbuf)
{
return extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (4),
- REGISTER_RAW_SIZE (4));
+ DEPRECATED_REGISTER_RAW_SIZE (4));
}
static void
@@ -169,7 +169,7 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame)
deprecated_update_frame_base_hack (dummy, frame);
get_frame_extra_info (dummy)->status = 0;
get_frame_extra_info (dummy)->stack_size = 0;
- memset (get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS);
+ memset (deprecated_get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS);
mn10300_analyze_prologue (dummy, pc);
return dummy;
}
@@ -237,59 +237,59 @@ set_movm_offsets (struct frame_info *fi, int movm_args)
/* The `other' bit leaves a blank area of four bytes at the
beginning of its block of saved registers, making it 32 bytes
long in total. */
- get_frame_saved_regs (fi)[LAR_REGNUM] = get_frame_base (fi) + offset + 4;
- get_frame_saved_regs (fi)[LIR_REGNUM] = get_frame_base (fi) + offset + 8;
- get_frame_saved_regs (fi)[MDR_REGNUM] = get_frame_base (fi) + offset + 12;
- get_frame_saved_regs (fi)[A0_REGNUM + 1] = get_frame_base (fi) + offset + 16;
- get_frame_saved_regs (fi)[A0_REGNUM] = get_frame_base (fi) + offset + 20;
- get_frame_saved_regs (fi)[D0_REGNUM + 1] = get_frame_base (fi) + offset + 24;
- get_frame_saved_regs (fi)[D0_REGNUM] = get_frame_base (fi) + offset + 28;
+ deprecated_get_frame_saved_regs (fi)[LAR_REGNUM] = get_frame_base (fi) + offset + 4;
+ deprecated_get_frame_saved_regs (fi)[LIR_REGNUM] = get_frame_base (fi) + offset + 8;
+ deprecated_get_frame_saved_regs (fi)[MDR_REGNUM] = get_frame_base (fi) + offset + 12;
+ deprecated_get_frame_saved_regs (fi)[A0_REGNUM + 1] = get_frame_base (fi) + offset + 16;
+ deprecated_get_frame_saved_regs (fi)[A0_REGNUM] = get_frame_base (fi) + offset + 20;
+ deprecated_get_frame_saved_regs (fi)[D0_REGNUM + 1] = get_frame_base (fi) + offset + 24;
+ deprecated_get_frame_saved_regs (fi)[D0_REGNUM] = get_frame_base (fi) + offset + 28;
offset += 32;
}
if (movm_args & movm_a3_bit)
{
- get_frame_saved_regs (fi)[A3_REGNUM] = get_frame_base (fi) + offset;
+ deprecated_get_frame_saved_regs (fi)[A3_REGNUM] = get_frame_base (fi) + offset;
offset += 4;
}
if (movm_args & movm_a2_bit)
{
- get_frame_saved_regs (fi)[A2_REGNUM] = get_frame_base (fi) + offset;
+ deprecated_get_frame_saved_regs (fi)[A2_REGNUM] = get_frame_base (fi) + offset;
offset += 4;
}
if (movm_args & movm_d3_bit)
{
- get_frame_saved_regs (fi)[D3_REGNUM] = get_frame_base (fi) + offset;
+ deprecated_get_frame_saved_regs (fi)[D3_REGNUM] = get_frame_base (fi) + offset;
offset += 4;
}
if (movm_args & movm_d2_bit)
{
- get_frame_saved_regs (fi)[D2_REGNUM] = get_frame_base (fi) + offset;
+ deprecated_get_frame_saved_regs (fi)[D2_REGNUM] = get_frame_base (fi) + offset;
offset += 4;
}
if (AM33_MODE)
{
if (movm_args & movm_exother_bit)
{
- get_frame_saved_regs (fi)[MCVF_REGNUM] = get_frame_base (fi) + offset;
- get_frame_saved_regs (fi)[MCRL_REGNUM] = get_frame_base (fi) + offset + 4;
- get_frame_saved_regs (fi)[MCRH_REGNUM] = get_frame_base (fi) + offset + 8;
- get_frame_saved_regs (fi)[MDRQ_REGNUM] = get_frame_base (fi) + offset + 12;
- get_frame_saved_regs (fi)[E0_REGNUM + 1] = get_frame_base (fi) + offset + 16;
- get_frame_saved_regs (fi)[E0_REGNUM + 0] = get_frame_base (fi) + offset + 20;
+ deprecated_get_frame_saved_regs (fi)[MCVF_REGNUM] = get_frame_base (fi) + offset;
+ deprecated_get_frame_saved_regs (fi)[MCRL_REGNUM] = get_frame_base (fi) + offset + 4;
+ deprecated_get_frame_saved_regs (fi)[MCRH_REGNUM] = get_frame_base (fi) + offset + 8;
+ deprecated_get_frame_saved_regs (fi)[MDRQ_REGNUM] = get_frame_base (fi) + offset + 12;
+ deprecated_get_frame_saved_regs (fi)[E0_REGNUM + 1] = get_frame_base (fi) + offset + 16;
+ deprecated_get_frame_saved_regs (fi)[E0_REGNUM + 0] = get_frame_base (fi) + offset + 20;
offset += 24;
}
if (movm_args & movm_exreg1_bit)
{
- get_frame_saved_regs (fi)[E0_REGNUM + 7] = get_frame_base (fi) + offset;
- get_frame_saved_regs (fi)[E0_REGNUM + 6] = get_frame_base (fi) + offset + 4;
- get_frame_saved_regs (fi)[E0_REGNUM + 5] = get_frame_base (fi) + offset + 8;
- get_frame_saved_regs (fi)[E0_REGNUM + 4] = get_frame_base (fi) + offset + 12;
+ deprecated_get_frame_saved_regs (fi)[E0_REGNUM + 7] = get_frame_base (fi) + offset;
+ deprecated_get_frame_saved_regs (fi)[E0_REGNUM + 6] = get_frame_base (fi) + offset + 4;
+ deprecated_get_frame_saved_regs (fi)[E0_REGNUM + 5] = get_frame_base (fi) + offset + 8;
+ deprecated_get_frame_saved_regs (fi)[E0_REGNUM + 4] = get_frame_base (fi) + offset + 12;
offset += 16;
}
if (movm_args & movm_exreg0_bit)
{
- get_frame_saved_regs (fi)[E0_REGNUM + 3] = get_frame_base (fi) + offset;
- get_frame_saved_regs (fi)[E0_REGNUM + 2] = get_frame_base (fi) + offset + 4;
+ deprecated_get_frame_saved_regs (fi)[E0_REGNUM + 3] = get_frame_base (fi) + offset;
+ deprecated_get_frame_saved_regs (fi)[E0_REGNUM + 2] = get_frame_base (fi) + offset + 4;
offset += 8;
}
}
@@ -648,14 +648,14 @@ saved_regs_size (struct frame_info *fi)
/* Reserve four bytes for every register saved. */
for (i = 0; i < NUM_REGS; i++)
- if (get_frame_saved_regs (fi)[i])
+ if (deprecated_get_frame_saved_regs (fi)[i])
adjust += 4;
/* If we saved LIR, then it's most likely we used a `movm'
instruction with the `other' bit set, in which case the SP is
decremented by an extra four bytes, "to simplify calculation
of the transfer area", according to the processor manual. */
- if (get_frame_saved_regs (fi)[LIR_REGNUM])
+ if (deprecated_get_frame_saved_regs (fi)[LIR_REGNUM])
adjust += 4;
return adjust;
@@ -705,8 +705,8 @@ mn10300_frame_chain (struct frame_info *fi)
{
/* Our caller has a frame pointer. So find the frame in $a3 or
in the stack. */
- if (get_frame_saved_regs (fi)[A3_REGNUM])
- return (read_memory_integer (get_frame_saved_regs (fi)[A3_REGNUM],
+ if (deprecated_get_frame_saved_regs (fi)[A3_REGNUM])
+ return (read_memory_integer (deprecated_get_frame_saved_regs (fi)[A3_REGNUM],
DEPRECATED_REGISTER_SIZE));
else
return read_register (A3_REGNUM);
@@ -744,12 +744,12 @@ mn10300_pop_frame_regular (struct frame_info *frame)
/* Restore any saved registers. */
for (regnum = 0; regnum < NUM_REGS; regnum++)
- if (get_frame_saved_regs (frame)[regnum] != 0)
+ if (deprecated_get_frame_saved_regs (frame)[regnum] != 0)
{
ULONGEST value;
- value = read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
- REGISTER_RAW_SIZE (regnum));
+ value = read_memory_unsigned_integer (deprecated_get_frame_saved_regs (frame)[regnum],
+ DEPRECATED_REGISTER_RAW_SIZE (regnum));
write_register (regnum, value);
}
@@ -1039,14 +1039,14 @@ mn10300_print_register (const char *name, int regnum, int reg_width)
int byte;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
{
- for (byte = REGISTER_RAW_SIZE (regnum) - REGISTER_VIRTUAL_SIZE (regnum);
- byte < REGISTER_RAW_SIZE (regnum);
+ for (byte = DEPRECATED_REGISTER_RAW_SIZE (regnum) - DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum);
+ byte < DEPRECATED_REGISTER_RAW_SIZE (regnum);
byte++)
printf_filtered ("%02x", (unsigned char) raw_buffer[byte]);
}
else
{
- for (byte = REGISTER_VIRTUAL_SIZE (regnum) - 1;
+ for (byte = DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum) - 1;
byte >= 0;
byte--)
printf_filtered ("%02x", (unsigned char) raw_buffer[byte]);
@@ -1189,7 +1189,6 @@ mn10300_gdbarch_init (struct gdbarch_info info,
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_deprecated_saved_pc_after_call (gdbarch, mn10300_saved_pc_after_call);
set_gdbarch_deprecated_init_extra_frame_info (gdbarch, mn10300_init_extra_frame_info);
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop);
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);
diff --git a/gdb/monitor.c b/gdb/monitor.c
index ee2280d..198155f 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -521,7 +521,6 @@ monitor_expect (char *string, char *buf, int buflen)
char *p = string;
int obuflen = buflen;
int c;
- extern struct target_ops *targ_ops;
if (monitor_debug_p)
{
@@ -569,14 +568,6 @@ monitor_expect (char *string, char *buf, int buflen)
return 0;
}
}
-#if 0
- // OBSOLETE else if ((c == '\021' || c == '\023') &&
- // OBSOLETE (STREQ (targ_ops->to_shortname, "m32r")
- // OBSOLETE || STREQ (targ_ops->to_shortname, "mon2000")))
- // OBSOLETE { /* m32r monitor emits random DC1/DC3 chars */
- // OBSOLETE continue;
- // OBSOLETE }
-#endif
else
{
/* We got a character that doesn't match the string. We need to
@@ -930,7 +921,7 @@ monitor_supply_register (int regno, char *valstr)
/* supply register stores in target byte order, so swap here */
- store_unsigned_integer (regbuf, REGISTER_RAW_SIZE (regno), val);
+ store_unsigned_integer (regbuf, DEPRECATED_REGISTER_RAW_SIZE (regno), val);
supply_register (regno, regbuf);
@@ -1236,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 < REGISTER_RAW_SIZE (regno) * 2; i++)
+ for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno) * 2; i++)
{
int c;
c = readchar (timeout);
@@ -1353,7 +1344,7 @@ monitor_store_register (int regno)
val = read_register (regno);
monitor_debug ("MON storeg %d %s\n", regno,
- phex (val, REGISTER_RAW_SIZE (regno)));
+ phex (val, DEPRECATED_REGISTER_RAW_SIZE (regno)));
/* send the register deposit command */
diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c
index 2485276..d426113 100644
--- a/gdb/ns32k-tdep.c
+++ b/gdb/ns32k-tdep.c
@@ -370,7 +370,7 @@ ns32k_frame_init_saved_regs (struct frame_info *frame)
int localcount;
CORE_ADDR enter_addr, next_addr;
- if (get_frame_saved_regs (frame))
+ if (deprecated_get_frame_saved_regs (frame))
return;
frame_saved_regs_zalloc (frame);
@@ -385,18 +385,18 @@ ns32k_frame_init_saved_regs (struct frame_info *frame)
for (regnum = 0; regnum < 8; regnum++)
{
if (regmask & (1 << regnum))
- get_frame_saved_regs (frame)[regnum] = next_addr -= 4;
+ deprecated_get_frame_saved_regs (frame)[regnum] = next_addr -= 4;
}
- get_frame_saved_regs (frame)[SP_REGNUM] = get_frame_base (frame) + 4;
- get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_base (frame) + 4;
- get_frame_saved_regs (frame)[DEPRECATED_FP_REGNUM] = read_memory_integer (get_frame_base (frame), 4);
+ deprecated_get_frame_saved_regs (frame)[SP_REGNUM] = get_frame_base (frame) + 4;
+ deprecated_get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_base (frame) + 4;
+ deprecated_get_frame_saved_regs (frame)[DEPRECATED_FP_REGNUM] = read_memory_integer (get_frame_base (frame), 4);
}
else if (enter_addr == 1)
{
CORE_ADDR sp = read_register (SP_REGNUM);
- get_frame_saved_regs (frame)[PC_REGNUM] = sp;
- get_frame_saved_regs (frame)[SP_REGNUM] = sp + 4;
+ deprecated_get_frame_saved_regs (frame)[PC_REGNUM] = sp;
+ deprecated_get_frame_saved_regs (frame)[SP_REGNUM] = sp + 4;
}
}
@@ -427,9 +427,9 @@ ns32k_pop_frame (void)
DEPRECATED_FRAME_INIT_SAVED_REGS (frame);
for (regnum = 0; regnum < 8; regnum++)
- if (get_frame_saved_regs (frame)[regnum])
+ if (deprecated_get_frame_saved_regs (frame)[regnum])
write_register (regnum,
- read_memory_integer (get_frame_saved_regs (frame)[regnum], 4));
+ read_memory_integer (deprecated_get_frame_saved_regs (frame)[regnum], 4));
write_register (DEPRECATED_FP_REGNUM, read_memory_integer (fp, 4));
write_register (PC_REGNUM, read_memory_integer (fp + 4, 4));
@@ -498,7 +498,7 @@ ns32k_store_return_value (struct type *valtype, char *valbuf)
static CORE_ADDR
ns32k_extract_struct_value_address (char *regbuf)
{
- return (extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (0), REGISTER_RAW_SIZE (0)));
+ return (extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (0), DEPRECATED_REGISTER_RAW_SIZE (0)));
}
void
@@ -542,7 +542,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* NOTE: cagney/2002-12-06: This can be deleted when this arch is
ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
+ set_gdbarch_deprecated_init_frame_pc (gdbarch, deprecated_init_frame_pc_default);
/* Register info */
ns32k_gdbarch_init_32082 (gdbarch);
diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y
index 1c3e2a4..057833b 100644
--- a/gdb/objc-exp.y
+++ b/gdb/objc-exp.y
@@ -770,7 +770,7 @@ variable: name_not_typename
else
{
struct minimal_symbol *msymbol;
- register char *arg = copy_name ($1.stoken);
+ char *arg = copy_name ($1.stoken);
msymbol =
lookup_minimal_symbol_linkage_or_natural (arg);
@@ -993,21 +993,21 @@ name_not_typename : NAME
static int
parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
+ char *p;
+ int len;
int parsed_float;
YYSTYPE *putithere;
{
/* FIXME: Shouldn't these be unsigned? We don't deal with negative
values here, and we do kind of silly things like cast to
unsigned. */
- register LONGEST n = 0;
- register LONGEST prevn = 0;
+ LONGEST n = 0;
+ LONGEST prevn = 0;
unsigned LONGEST un;
- register int i = 0;
- register int c;
- register int base = input_radix;
+ int i = 0;
+ int c;
+ int base = input_radix;
int unsigned_p = 0;
/* Number of "L" suffixes encountered. */
@@ -1363,7 +1363,7 @@ yylex ()
/* It's a number. */
int got_dot = 0, got_e = 0, toktype = FLOAT;
/* Initialize toktype to anything other than ERROR. */
- register char *p = tokstart;
+ char *p = tokstart;
int hex = input_radix > 10;
int local_radix = input_radix;
if (tokchr == '0' && (p[1] == 'x' || p[1] == 'X'))
@@ -1593,7 +1593,7 @@ yylex ()
if (STREQN (tokstart, "unsigned", 8))
return UNSIGNED;
if (current_language->la_language == language_cplus
- && STREQN (tokstart, "template", 8))
+ && strncmp (tokstart, "template", 8) == 0)
return TEMPLATE;
if (STREQN (tokstart, "volatile", 8))
return VOLATILE_KEYWORD;
@@ -1610,7 +1610,7 @@ yylex ()
break;
case 5:
if ((current_language->la_language == language_cplus)
- && STREQN (tokstart, "class", 5))
+ && strncmp (tokstart, "class", 5) == 0)
return CLASS;
if (STREQN (tokstart, "union", 5))
return UNION;
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index d4e070d..657b563 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -659,9 +659,9 @@ const struct language_defn objc_language_defn = {
range_check_off,
type_check_off,
case_sensitive_on,
+ &exp_descriptor_standard,
objc_parse,
objc_error,
- evaluate_subexp_standard,
objc_printchar, /* Print a character constant */
objc_printstr, /* Function to print string constant */
objc_emit_char,
@@ -681,6 +681,7 @@ const struct language_defn objc_language_defn = {
1, /* C-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
@@ -1540,8 +1541,8 @@ print_object_command (char *args, int from_tty)
make_cleanup (free_current_contents, &expr);
int pc = 0;
- object = expr->language_defn->evaluate_exp (builtin_type_void_data_ptr,
- expr, &pc, EVAL_NORMAL);
+ object = expr->language_defn->la_exp_desc->evaluate_exp
+ (builtin_type_void_data_ptr, expr, &pc, EVAL_NORMAL);
do_cleanups (old_chain);
}
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index ce927fc..0a5ed81 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -60,8 +60,6 @@ static void *map_to_file (int);
#endif /* defined(USE_MMALLOC) && defined(HAVE_MMAP) */
-static void add_to_objfile_sections (bfd *, sec_ptr, void *);
-
static void objfile_alloc_data (struct objfile *objfile);
static void objfile_free_data (struct objfile *objfile);
@@ -89,7 +87,8 @@ int mapped_symbol_files; /* Try to use mapped symbol files */
the end of the table (objfile->sections_end). */
static void
-add_to_objfile_sections (bfd *abfd, sec_ptr asect, void *objfile_p_char)
+add_to_objfile_sections (struct bfd *abfd, struct bfd_section *asect,
+ void *objfile_p_char)
{
struct objfile *objfile = (struct objfile *) objfile_p_char;
struct obj_section section;
@@ -1044,14 +1043,14 @@ map_to_file (int fd)
#endif /* defined(USE_MMALLOC) && defined(HAVE_MMAP) */
-/* Returns a section whose range includes PC and SECTION,
- or NULL if none found. Note the distinction between the return type,
- struct obj_section (which is defined in gdb), and the input type
- struct sec (which is a bfd-defined data type). The obj_section
- contains a pointer to the bfd struct sec section. */
+/* Returns a section whose range includes PC and SECTION, or NULL if
+ none found. Note the distinction between the return type, struct
+ obj_section (which is defined in gdb), and the input type "struct
+ bfd_section" (which is a bfd-defined data type). The obj_section
+ contains a pointer to the "struct bfd_section". */
struct obj_section *
-find_pc_sect_section (CORE_ADDR pc, struct sec *section)
+find_pc_sect_section (CORE_ADDR pc, struct bfd_section *section)
{
struct obj_section *s;
struct objfile *objfile;
@@ -1088,7 +1087,7 @@ in_plt_section (CORE_ADDR pc, char *name)
retval = (s != NULL
&& s->the_bfd_section->name != NULL
- && STREQ (s->the_bfd_section->name, ".plt"));
+ && strcmp (s->the_bfd_section->name, ".plt") == 0);
return (retval);
}
@@ -1166,6 +1165,13 @@ objfile_free_data (struct objfile *objfile)
}
void
+clear_objfile_data (struct objfile *objfile)
+{
+ gdb_assert (objfile->data != NULL);
+ memset (objfile->data, 0, objfile->num_data * sizeof (void *));
+}
+
+void
set_objfile_data (struct objfile *objfile, const struct objfile_data *data,
void *value)
{
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index fe54f6d..ebc10b3 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -178,7 +178,7 @@ struct obj_section
addresses. */
CORE_ADDR offset;
- sec_ptr the_bfd_section; /* BFD section pointer */
+ struct bfd_section *the_bfd_section; /* BFD section pointer */
/* Objfile this section is part of. */
struct objfile *objfile;
@@ -599,6 +599,7 @@ extern int is_in_import_list (char *, struct objfile *);
modules. */
extern const struct objfile_data *register_objfile_data (void);
+extern void clear_objfile_data (struct objfile *objfile);
extern void set_objfile_data (struct objfile *objfile,
const struct objfile_data *data, void *value);
extern void *objfile_data (struct objfile *objfile,
diff --git a/gdb/ocd.c b/gdb/ocd.c
index 6b38159..4155d73 100644
--- a/gdb/ocd.c
+++ b/gdb/ocd.c
@@ -159,7 +159,6 @@ ocd_thread_alive (ptid_t th)
/* Clean up connection to a remote debugger. */
-/* ARGSUSED */
void
ocd_close (int quitting)
{
@@ -737,7 +736,6 @@ ocd_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
nonzero. Returns length of data written or read; 0 for error. TARGET
is ignored. */
-/* ARGSUSED */
int
ocd_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int should_write,
struct mem_attrib *attrib, struct target_ops *target)
diff --git a/gdb/osabi.c b/gdb/osabi.c
index dbba578..ee13277 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -283,11 +283,28 @@ gdbarch_lookup_osabi (bfd *abfd)
return match;
}
+
+/* Return non-zero if architecture A can run code written for
+ architecture B. */
+static int
+can_run_code_for (const struct bfd_arch_info *a, const struct bfd_arch_info *b)
+{
+ /* BFD's 'A->compatible (A, B)' functions return zero if A and B are
+ incompatible. But if they are compatible, it returns the 'more
+ featureful' of the two arches. That is, if A can run code
+ written for B, but B can't run code written for A, then it'll
+ return A.
+
+ struct bfd_arch_info objects are singletons: that is, there's
+ supposed to be exactly one instance for a given machine. So you
+ can tell whether two are equivalent by comparing pointers. */
+ return (a == b || a->compatible (a, b) == a);
+}
+
+
void
gdbarch_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
- const struct bfd_arch_info *arch_info = gdbarch_bfd_arch_info (gdbarch);
- const struct bfd_arch_info *compatible;
struct gdb_osabi_handler *handler;
if (info.osabi == GDB_OSABI_UNKNOWN)
@@ -303,29 +320,38 @@ gdbarch_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch)
if (handler->osabi != info.osabi)
continue;
- /* Check whether the machine type and architecture of the
- handler are compatible with the desired machine type and
- architecture.
+ /* If the architecture described by ARCH_INFO can run code for
+ the architcture we registered the handler for, then the
+ handler is applicable. Note, though, that if the handler is
+ for an architecture that is a superset of ARCH_INFO, we can't
+ use that --- it would be perfectly correct for it to install
+ gdbarch methods that refer to registers / instructions /
+ other facilities ARCH_INFO doesn't have.
- NOTE: kettenis/20021027: There may be more than one machine
+ NOTE: kettenis/20021027: There may be more than one machine
type that is compatible with the desired machine type. Right
now we simply return the first match, which is fine for now.
However, we might want to do something smarter in the future. */
- compatible = arch_info->compatible (arch_info, handler->arch_info);
- if (compatible == handler->arch_info)
+ /* NOTE: cagney/2003-10-23: The code for "a can_run_code_for b"
+ is implemented using BFD's compatible method (a->compatible
+ (b) == a -- the lowest common denominator between a and b is
+ a). That method's definition of compatible may not be as you
+ expect. For instance the test "amd64 can run code for i386"
+ (or more generally "64-bit ISA can run code for the 32-bit
+ ISA"). BFD doesn't normally consider 32-bit and 64-bit
+ "compatible" so it doesn't succeed. */
+ if (can_run_code_for (info.bfd_arch_info, handler->arch_info))
{
(*handler->init_osabi) (info, gdbarch);
return;
}
}
- fprintf_filtered
- (gdb_stderr,
- "A handler for the OS ABI \"%s\" is not built into this "
- "configuration of GDB. "
- "Attempting to continue with the default %s settings",
- gdbarch_osabi_name (info.osabi),
- bfd_printable_arch_mach (arch_info->arch, arch_info->mach));
+ warning ("A handler for the OS ABI \"%s\" is not built into this "
+ "configuration of GDB. "
+ "Attempting to continue with the default %s settings",
+ gdbarch_osabi_name (info.osabi),
+ info.bfd_arch_info->printable_name);
}
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index 22b3dcd..b03241f 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -686,7 +686,7 @@ variable: name_not_typename
else
{
struct minimal_symbol *msymbol;
- register char *arg = copy_name ($1.stoken);
+ char *arg = copy_name ($1.stoken);
msymbol =
lookup_minimal_symbol_linkage_or_natural (arg);
@@ -765,20 +765,20 @@ name_not_typename : NAME
static int
parse_number (p, len, parsed_float, putithere)
- register char *p;
- register int len;
+ char *p;
+ int len;
int parsed_float;
YYSTYPE *putithere;
{
/* FIXME: Shouldn't these be unsigned? We don't deal with negative values
here, and we do kind of silly things like cast to unsigned. */
- register LONGEST n = 0;
- register LONGEST prevn = 0;
+ LONGEST n = 0;
+ LONGEST prevn = 0;
ULONGEST un;
- register int i = 0;
- register int c;
- register int base = input_radix;
+ int i = 0;
+ int c;
+ int base = input_radix;
int unsigned_p = 0;
/* Number of "L" suffixes encountered. */
@@ -1190,7 +1190,7 @@ yylex ()
{
/* It's a number. */
int got_dot = 0, got_e = 0, toktype;
- register char *p = tokstart;
+ char *p = tokstart;
int hex = input_radix > 10;
if (c == '0' && (p[1] == 'x' || p[1] == 'X'))
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index 836f5f3..3ebb433 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -451,9 +451,9 @@ const struct language_defn pascal_language_defn =
range_check_on,
type_check_on,
case_sensitive_on,
+ &exp_descriptor_standard,
pascal_parse,
pascal_error,
- evaluate_subexp_standard,
pascal_printchar, /* Print a character constant */
pascal_printstr, /* Function to print string constant */
pascal_emit_char, /* Print a single char */
@@ -473,6 +473,7 @@ const struct language_defn pascal_language_defn =
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index d1b6b36..c45a167 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -553,8 +553,8 @@ pascal_value_print (struct value *val, struct ui_file *stream, int format,
type is indicated by the quoted string anyway. */
if (TYPE_CODE (type) == TYPE_CODE_PTR &&
TYPE_NAME (type) == NULL &&
- TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL &&
- STREQ (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char"))
+ TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL
+ && strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char") == 0)
{
/* Print nothing */
}
@@ -694,7 +694,7 @@ pascal_object_is_vtbl_ptr_type (struct type *type)
const char *typename = type_name_no_tag (type);
return (typename != NULL
- && (STREQ (typename, pascal_vtbl_ptr_name)));
+ && strcmp (typename, pascal_vtbl_ptr_name) == 0);
}
/* Return truth value for the assertion that TYPE is of the type
diff --git a/gdb/pa64solib.c b/gdb/pa64solib.c
index b67532d..8a5cae1 100644
--- a/gdb/pa64solib.c
+++ b/gdb/pa64solib.c
@@ -1,6 +1,7 @@
/* Handle HP ELF shared libraries for GDB, the GNU Debugger.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
+ Inc.
This file is part of GDB.
@@ -50,6 +51,7 @@
#include "gdbcmd.h"
#include "language.h"
#include "regcache.h"
+#include "exec.h"
#include <fcntl.h>
@@ -57,9 +59,6 @@
#define O_BINARY 0
#endif
-/* Defined in exec.c; used to prevent dangling pointer bug. */
-extern struct target_ops exec_ops;
-
static CORE_ADDR bfd_lookup_symbol (bfd *, char *);
/* This lives in hppa-tdep.c. */
extern struct unwind_table_entry *find_unwind_entry (CORE_ADDR pc);
@@ -110,7 +109,7 @@ typedef struct
{
CORE_ADDR dld_flags_addr;
LONGEST dld_flags;
- sec_ptr dyninfo_sect;
+ struct bfd_section *dyninfo_sect;
int have_read_dld_descriptor;
int is_valid;
CORE_ADDR load_map;
diff --git a/gdb/parse.c b/gdb/parse.c
index 61be543..e12fa20 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -50,6 +50,17 @@
#include "gdb_assert.h"
#include "block.h"
+/* Standard set of definitions for printing, dumping, prefixifying,
+ * and evaluating expressions. */
+
+const struct exp_descriptor exp_descriptor_standard =
+ {
+ print_subexp_standard,
+ operator_length_standard,
+ op_name_standard,
+ dump_subexp_body_standard,
+ evaluate_subexp_standard
+ };
/* Symbols which architectures can redefine. */
@@ -783,18 +794,48 @@ prefixify_expression (struct expression *expr)
prefixify_subexp (temp, expr, inpos, outpos);
}
-/* Return the number of exp_elements in the subexpression of EXPR
- whose last exp_element is at index ENDPOS - 1 in EXPR. */
+/* Return the number of exp_elements in the postfix subexpression
+ of EXPR whose operator is at index ENDPOS - 1 in EXPR. */
int
length_of_subexp (struct expression *expr, int endpos)
{
+ int oplen, args, i;
+
+ operator_length (expr, endpos, &oplen, &args);
+
+ while (args > 0)
+ {
+ oplen += length_of_subexp (expr, endpos - oplen);
+ args--;
+ }
+
+ return oplen;
+}
+
+/* Sets *OPLENP to the length of the operator whose (last) index is
+ ENDPOS - 1 in EXPR, and sets *ARGSP to the number of arguments that
+ operator takes. */
+
+void
+operator_length (struct expression *expr, int endpos, int *oplenp, int *argsp)
+{
+ expr->language_defn->la_exp_desc->operator_length (expr, endpos,
+ oplenp, argsp);
+}
+
+/* Default value for operator_length in exp_descriptor vectors. */
+
+void
+operator_length_standard (struct expression *expr, int endpos,
+ int *oplenp, int *argsp)
+{
int oplen = 1;
int args = 0;
int i;
if (endpos < 1)
- error ("?error in length_of_subexp");
+ error ("?error in operator_length_standard");
i = (int) expr->elts[endpos - 1].opcode;
@@ -915,13 +956,8 @@ length_of_subexp (struct expression *expr, int endpos)
args = 1 + (i < (int) BINOP_END);
}
- while (args > 0)
- {
- oplen += length_of_subexp (expr, endpos - oplen);
- args--;
- }
-
- return oplen;
+ *oplenp = oplen;
+ *argsp = args;
}
/* Copy the subexpression ending just before index INEND in INEXPR
@@ -932,132 +968,13 @@ static void
prefixify_subexp (struct expression *inexpr,
struct expression *outexpr, int inend, int outbeg)
{
- int oplen = 1;
- int args = 0;
+ int oplen;
+ int args;
int i;
int *arglens;
enum exp_opcode opcode;
- /* Compute how long the last operation is (in OPLEN),
- and also how many preceding subexpressions serve as
- arguments for it (in ARGS). */
-
- opcode = inexpr->elts[inend - 1].opcode;
- switch (opcode)
- {
- /* C++ */
- case OP_SCOPE:
- oplen = longest_to_int (inexpr->elts[inend - 2].longconst);
- oplen = 5 + BYTES_TO_EXP_ELEM (oplen + 1);
- break;
-
- case OP_LONG:
- case OP_DOUBLE:
- case OP_VAR_VALUE:
- oplen = 4;
- break;
-
- case OP_TYPE:
- case OP_BOOL:
- case OP_LAST:
- case OP_REGISTER:
- case OP_INTERNALVAR:
- oplen = 3;
- break;
-
- case OP_COMPLEX:
- oplen = 1;
- args = 2;
- break;
-
- case OP_FUNCALL:
- case OP_F77_UNDETERMINED_ARGLIST:
- oplen = 3;
- args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
- break;
-
- case OP_OBJC_MSGCALL: /* Objective C message (method) call */
- oplen = 4;
- args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
- break;
-
- case UNOP_MIN:
- case UNOP_MAX:
- oplen = 3;
- break;
-
- case UNOP_CAST:
- case UNOP_MEMVAL:
- oplen = 3;
- args = 1;
- break;
-
- case UNOP_ABS:
- case UNOP_CAP:
- case UNOP_CHR:
- case UNOP_FLOAT:
- case UNOP_HIGH:
- case UNOP_ODD:
- case UNOP_ORD:
- case UNOP_TRUNC:
- oplen = 1;
- args = 1;
- break;
-
- case STRUCTOP_STRUCT:
- case STRUCTOP_PTR:
- case OP_LABELED:
- args = 1;
- /* fall through */
- case OP_M2_STRING:
- case OP_STRING:
- case OP_OBJC_NSSTRING: /* Objective C Foundation Class NSString constant */
- case OP_OBJC_SELECTOR: /* Objective C "@selector" pseudo-op */
- case OP_NAME:
- case OP_EXPRSTRING:
- oplen = longest_to_int (inexpr->elts[inend - 2].longconst);
- oplen = 4 + BYTES_TO_EXP_ELEM (oplen + 1);
- break;
-
- case OP_BITSTRING:
- oplen = longest_to_int (inexpr->elts[inend - 2].longconst);
- oplen = (oplen + HOST_CHAR_BIT - 1) / HOST_CHAR_BIT;
- oplen = 4 + BYTES_TO_EXP_ELEM (oplen);
- break;
-
- case OP_ARRAY:
- oplen = 4;
- args = longest_to_int (inexpr->elts[inend - 2].longconst);
- args -= longest_to_int (inexpr->elts[inend - 3].longconst);
- args += 1;
- break;
-
- case TERNOP_COND:
- case TERNOP_SLICE:
- case TERNOP_SLICE_COUNT:
- args = 3;
- break;
-
- case BINOP_ASSIGN_MODIFY:
- oplen = 3;
- args = 2;
- break;
-
- /* Modula-2 */
- case MULTI_SUBSCRIPT:
- oplen = 3;
- args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
- break;
-
- /* C++ */
- case OP_THIS:
- case OP_OBJC_SELF:
- oplen = 2;
- break;
-
- default:
- args = 1 + ((int) opcode < (int) BINOP_END);
- }
+ operator_length (inexpr, inend, &oplen, &args);
/* Copy the final operator itself, from the end of the input
to the beginning of the output. */
@@ -1155,14 +1072,13 @@ parse_exp_1 (char **stringptr, struct block *block, int comma)
parser, to a prefix form. */
if (expressiondebug)
- dump_prefix_expression (expout, gdb_stdlog,
- "before conversion to prefix form");
+ dump_raw_expression (expout, gdb_stdlog,
+ "before conversion to prefix form");
prefixify_expression (expout);
if (expressiondebug)
- dump_postfix_expression (expout, gdb_stdlog,
- "after conversion to prefix form");
+ dump_prefix_expression (expout, gdb_stdlog);
*stringptr = lexptr;
return expout;
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index f03f537..c84fcad 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -159,6 +159,17 @@ extern int pop_type_int (void);
extern int length_of_subexp (struct expression *, int);
+extern int dump_subexp (struct expression *, struct ui_file *, int);
+
+extern int dump_subexp_body_standard (struct expression *,
+ struct ui_file *, int);
+
+extern void operator_length (struct expression *, int, int *, int *);
+
+extern void operator_length_standard (struct expression *, int, int *, int *);
+
+extern char *op_name_standard (enum exp_opcode);
+
extern struct type *follow_types (struct type *);
/* During parsing of a C expression, the pointer to the next character
@@ -220,6 +231,46 @@ struct op_print
int right_assoc;
};
+/* Information needed to print, prefixify, and evaluate expressions for
+ a given language. */
+
+struct exp_descriptor
+ {
+ /* Print subexpression. */
+ void (*print_subexp) (struct expression *, int *, struct ui_file *,
+ enum precedence);
+
+ /* Returns number of exp_elements needed to represent an operator and
+ the number of subexpressions it takes. */
+ void (*operator_length) (struct expression*, int, int*, int *);
+
+ /* Name of this operator for dumping purposes. */
+ char *(*op_name) (enum exp_opcode);
+
+ /* Dump the rest of this (prefix) expression after the operator
+ itself has been printed. See dump_subexp_body_standard in
+ (expprint.c). */
+ int (*dump_subexp_body) (struct expression *, struct ui_file *, int);
+
+ /* Evaluate an expression. */
+ struct value *(*evaluate_exp) (struct type *, struct expression *,
+ int *, enum noside);
+ };
+
+
+/* Default descriptor containing standard definitions of all
+ elements. */
+extern const struct exp_descriptor exp_descriptor_standard;
+
+/* Functions used by language-specific extended operators to (recursively)
+ print/dump subexpressions. */
+
+extern void print_subexp (struct expression *, int *, struct ui_file *,
+ enum precedence);
+
+extern void print_subexp_standard (struct expression *, int *,
+ struct ui_file *, enum precedence);
+
/* Function used to avoid direct calls to fprintf
in the code generated by the bison parser. */
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index be278f9..8227aa8 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -178,7 +178,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 = REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
+ int vrregsize = DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
ret = ptrace (PTRACE_GETVRREGS, tid, 0, &regs);
if (ret < 0)
@@ -196,7 +196,7 @@ 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 - REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
+ offset = vrregsize - DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
supply_register (regno,
regs + (regno - tdep->ppc_vr0_regnum) * vrregsize + offset);
@@ -230,12 +230,12 @@ fetch_register (int tid, int regno)
if (regaddr == -1)
{
- memset (buf, '\0', REGISTER_RAW_SIZE (regno)); /* Supply zeroes */
+ memset (buf, '\0', DEPRECATED_REGISTER_RAW_SIZE (regno)); /* Supply zeroes */
supply_register (regno, buf);
return;
}
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+ for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
*(PTRACE_XFER_TYPE *) & buf[i] = ptrace (PT_READ_U, tid,
@@ -257,8 +257,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 = REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
- int offset = vrregsize - REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
+ int vrregsize = DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
+ int offset = vrregsize - DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
for (i = 0; i < num_of_vrregs; i++)
{
@@ -335,7 +335,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 = REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
+ int vrregsize = DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
ret = ptrace (PTRACE_GETVRREGS, tid, 0, &regs);
if (ret < 0)
@@ -351,7 +351,7 @@ 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 - REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
+ offset = vrregsize - DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
regcache_collect (regno,
regs + (regno - tdep->ppc_vr0_regnum) * vrregsize + offset);
@@ -381,7 +381,7 @@ store_register (int tid, int regno)
return;
regcache_collect (regno, buf);
- for (i = 0; i < REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
+ for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
ptrace (PT_WRITE_U, tid, (PTRACE_ARG3_TYPE) regaddr,
@@ -410,8 +410,8 @@ 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 = REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
- int offset = vrregsize - REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
+ int vrregsize = DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
+ int offset = vrregsize - DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vrsave_regnum);
for (i = 0; i < num_of_vrregs; i++)
{
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 22ebfd2..c094efe 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -331,7 +331,7 @@ ppc_linux_skip_trampoline_code (CORE_ADDR pc)
/* This might not work right if we have multiple symbols with the
same name; the only way to really get it right is to perform
the same sort of lookup as the dynamic linker. */
- msymbol = lookup_minimal_symbol_text (symname, NULL, NULL);
+ msymbol = lookup_minimal_symbol_text (symname, NULL);
if (!msymbol)
return 0;
@@ -402,7 +402,7 @@ ppc_linux_frame_init_saved_regs (struct frame_info *fi)
{
CORE_ADDR regs_addr;
int i;
- if (get_frame_saved_regs (fi))
+ if (deprecated_get_frame_saved_regs (fi))
return;
frame_saved_regs_zalloc (fi);
@@ -410,24 +410,24 @@ ppc_linux_frame_init_saved_regs (struct frame_info *fi)
regs_addr =
read_memory_integer (get_frame_base (fi)
+ PPC_LINUX_REGS_PTR_OFFSET, 4);
- get_frame_saved_regs (fi)[PC_REGNUM] = regs_addr + 4 * PPC_LINUX_PT_NIP;
- get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ps_regnum] =
+ deprecated_get_frame_saved_regs (fi)[PC_REGNUM] = regs_addr + 4 * PPC_LINUX_PT_NIP;
+ deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ps_regnum] =
regs_addr + 4 * PPC_LINUX_PT_MSR;
- get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_cr_regnum] =
+ deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_cr_regnum] =
regs_addr + 4 * PPC_LINUX_PT_CCR;
- get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_lr_regnum] =
+ deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_lr_regnum] =
regs_addr + 4 * PPC_LINUX_PT_LNK;
- get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ctr_regnum] =
+ deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_ctr_regnum] =
regs_addr + 4 * PPC_LINUX_PT_CTR;
- get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_xer_regnum] =
+ deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_xer_regnum] =
regs_addr + 4 * PPC_LINUX_PT_XER;
- get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_mq_regnum] =
+ deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_mq_regnum] =
regs_addr + 4 * PPC_LINUX_PT_MQ;
for (i = 0; i < 32; i++)
- get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + i] =
+ deprecated_get_frame_saved_regs (fi)[gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + i] =
regs_addr + 4 * PPC_LINUX_PT_R0 + 4 * i;
for (i = 0; i < 32; i++)
- get_frame_saved_regs (fi)[FP0_REGNUM + i] = regs_addr + 4 * PPC_LINUX_PT_FPR0 + 8 * i;
+ deprecated_get_frame_saved_regs (fi)[FP0_REGNUM + i] = regs_addr + 4 * PPC_LINUX_PT_FPR0 + 8 * i;
}
else
rs6000_frame_init_saved_regs (fi);
@@ -596,13 +596,17 @@ ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache)
structures, no matter their size, are put in memory. Vectors,
which were added later, do get returned in a register though. */
-static int
-ppc_linux_use_struct_convention (int gcc_p, struct type *value_type)
+static enum return_value_convention
+ppc_linux_return_value (struct gdbarch *gdbarch, struct type *valtype,
+ struct regcache *regcache, const void *inval, void *outval)
{
- if ((TYPE_LENGTH (value_type) == 16 || TYPE_LENGTH (value_type) == 8)
- && TYPE_VECTOR (value_type))
- return 0;
- return 1;
+ if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
+ || TYPE_CODE (valtype) == TYPE_CODE_UNION)
+ && !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8)
+ && TYPE_VECTOR (valtype)))
+ return RETURN_VALUE_STRUCT_CONVENTION;
+ else
+ return ppc_sysv_abi_return_value (gdbarch, valtype, regcache, inval, outval);
}
/* Fetch (and possibly build) an appropriate link_map_offsets
@@ -908,7 +912,8 @@ ppc64_skip_trampoline_code (CORE_ADDR pc)
}
-/* Support for CONVERT_FROM_FUNC_PTR_ADDR(ADDR) on PPC64 GNU/Linux.
+/* Support for CONVERT_FROM_FUNC_PTR_ADDR (ARCH, ADDR, TARG) on PPC64
+ GNU/Linux.
Usually a function pointer's representation is simply the address
of the function. On GNU/Linux on the 64-bit PowerPC however, a
@@ -925,21 +930,23 @@ ppc64_skip_trampoline_code (CORE_ADDR pc)
find_function_addr uses this function to get the function address
from a function pointer. */
-/* Return real function address if ADDR (a function pointer) is in the data
- space and is therefore a special function pointer. */
+/* If ADDR points at what is clearly a function descriptor, transform
+ it into the address of the corresponding function. Be
+ conservative, otherwize GDB will do the transformation on any
+ random addresses such as occures when there is no symbol table. */
static CORE_ADDR
-ppc64_linux_convert_from_func_ptr_addr (CORE_ADDR addr)
+ppc64_linux_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
+ CORE_ADDR addr,
+ struct target_ops *targ)
{
- struct obj_section *s;
+ struct section_table *s = target_section_by_addr (targ, addr);
- s = find_pc_section (addr);
- if (s && s->the_bfd_section->flags & SEC_CODE)
- return addr;
+ /* Check if ADDR points to a function descriptor. */
+ if (s && strcmp (s->the_bfd_section->name, ".opd") == 0)
+ return get_target_memory_unsigned (targ, addr, 8);
- /* ADDR is in the data space, so it's a pointer to a descriptor, not
- the entry point. */
- return ppc64_desc_entry_point (addr);
+ return addr;
}
@@ -1040,7 +1047,7 @@ ppc_linux_init_abi (struct gdbarch_info info,
(well ignoring vectors that is). When this was corrected, it
wasn't fixed for GNU/Linux native platform. Use the
PowerOpen struct convention. */
- set_gdbarch_use_struct_convention (gdbarch, ppc_linux_use_struct_convention);
+ set_gdbarch_return_value (gdbarch, ppc_linux_return_value);
/* Note: kevinb/2002-04-12: See note in rs6000_gdbarch_init regarding
*_push_arguments(). The same remarks hold for the methods below. */
@@ -1080,7 +1087,13 @@ ppc_linux_init_abi (struct gdbarch_info info,
void
_initialize_ppc_linux_tdep (void)
{
- gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_LINUX,
- ppc_linux_init_abi);
+ /* Register for all sub-familes of the POWER/PowerPC: 32-bit and
+ 64-bit PowerPC, and the older rs6k. */
+ gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc, GDB_OSABI_LINUX,
+ ppc_linux_init_abi);
+ gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc64, GDB_OSABI_LINUX,
+ ppc_linux_init_abi);
+ gdbarch_register_osabi (bfd_arch_rs6000, bfd_mach_rs6k, GDB_OSABI_LINUX,
+ ppc_linux_init_abi);
add_core_fns (&ppc_linux_regset_core_fns);
}
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index 622bc65..01438c1 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -1,7 +1,7 @@
/* Target-dependent code for PowerPC systems using the SVR4 ABI
for GDB, the GNU debugger.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -26,23 +26,9 @@
#include "regcache.h"
#include "value.h"
#include "gdb_string.h"
-
+#include "gdb_assert.h"
#include "ppc-tdep.h"
-
-/* Ensure that X is aligned to an S byte boundary (assuming that S is
- a power of 2) rounding up/down where necessary. */
-
-static ULONGEST
-align_up (ULONGEST x, int s)
-{
- return (x + s - 1) & -s;
-}
-
-static ULONGEST
-align_down (ULONGEST x, int s)
-{
- return (x & -s);
-}
+#include "target.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
@@ -94,9 +80,9 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
int structoffset = argoffset + argspace;
/* If the function is returning a `struct', then the first word
- (which will be passed in r3) is used for struct return
- address. In that case we should advance one word and start
- from r4 register to copy parameters. */
+ (which will be passed in r3) is used for struct return
+ address. In that case we should advance one word and start
+ from r4 register to copy parameters. */
if (struct_return)
{
if (write_pass)
@@ -114,18 +100,17 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
char *val = VALUE_CONTENTS (arg);
if (TYPE_CODE (type) == TYPE_CODE_FLT
- && ppc_floating_point_unit_p (current_gdbarch)
- && len <= 8)
+ && ppc_floating_point_unit_p (current_gdbarch) && len <= 8)
{
/* Floating point value converted to "double" then
- passed in an FP register, when the registers run out,
- 8 byte aligned stack is used. */
+ passed in an FP register, when the registers run out,
+ 8 byte aligned stack is used. */
if (freg <= 8)
{
if (write_pass)
{
/* Always store the floating point value using
- the register's floating-point format. */
+ the register's floating-point format. */
char regval[MAX_REGISTER_SIZE];
struct type *regtype
= register_type (gdbarch, FP0_REGNUM + freg);
@@ -138,7 +123,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
else
{
/* SysV ABI converts floats to doubles before
- writing them to an 8 byte aligned stack location. */
+ writing them to an 8 byte aligned stack location. */
argoffset = align_up (argoffset, 8);
if (write_pass)
{
@@ -161,16 +146,14 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
argoffset += 8;
}
}
- else if (len == 8
- && (TYPE_CODE (type) == TYPE_CODE_INT /* long long */
- || (!ppc_floating_point_unit_p (current_gdbarch)
- && TYPE_CODE (type) == TYPE_CODE_FLT))) /* double */
+ else if (len == 8 && (TYPE_CODE (type) == TYPE_CODE_INT /* long long */
+ || (!ppc_floating_point_unit_p (current_gdbarch) && TYPE_CODE (type) == TYPE_CODE_FLT))) /* double */
{
/* "long long" or "double" passed in an odd/even
- register pair with the low addressed word in the odd
- register and the high addressed word in the even
- register, or when the registers run out an 8 byte
- aligned stack location. */
+ register pair with the low addressed word in the odd
+ register and the high addressed word in the even
+ register, or when the registers run out an 8 byte
+ aligned stack location. */
if (greg > 9)
{
/* Just in case GREG was 10. */
@@ -184,8 +167,7 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
{
if (write_pass)
regcache_cooked_write (regcache,
- tdep->ppc_gp0_regnum + greg,
- val);
+ tdep->ppc_gp0_regnum + greg, val);
greg += 1;
}
else
@@ -207,17 +189,15 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
}
else if (len == 16
&& TYPE_CODE (type) == TYPE_CODE_ARRAY
- && TYPE_VECTOR (type)
- && tdep->ppc_vr0_regnum >= 0)
+ && TYPE_VECTOR (type) && tdep->ppc_vr0_regnum >= 0)
{
/* Vector parameter passed in an Altivec register, or
- when that runs out, 16 byte aligned stack location. */
+ when that runs out, 16 byte aligned stack location. */
if (vreg <= 13)
{
if (write_pass)
regcache_cooked_write (current_regcache,
- tdep->ppc_vr0_regnum + vreg,
- val);
+ tdep->ppc_vr0_regnum + vreg, val);
vreg++;
}
else
@@ -228,38 +208,36 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
argoffset += 16;
}
}
- else if (len == 8
+ else if (len == 8
&& TYPE_CODE (type) == TYPE_CODE_ARRAY
- && TYPE_VECTOR (type)
- && tdep->ppc_ev0_regnum >= 0)
- {
+ && TYPE_VECTOR (type) && tdep->ppc_ev0_regnum >= 0)
+ {
/* Vector parameter passed in an e500 register, or when
- that runs out, 8 byte aligned stack location. Note
- that since e500 vector and general purpose registers
- both map onto the same underlying register set, a
- "greg" and not a "vreg" is consumed here. A cooked
- write stores the value in the correct locations
- within the raw register cache. */
- if (greg <= 10)
- {
+ that runs out, 8 byte aligned stack location. Note
+ that since e500 vector and general purpose registers
+ both map onto the same underlying register set, a
+ "greg" and not a "vreg" is consumed here. A cooked
+ write stores the value in the correct locations
+ within the raw register cache. */
+ if (greg <= 10)
+ {
if (write_pass)
regcache_cooked_write (current_regcache,
- tdep->ppc_ev0_regnum + greg,
- val);
- greg++;
- }
- else
- {
+ tdep->ppc_ev0_regnum + greg, val);
+ greg++;
+ }
+ else
+ {
argoffset = align_up (argoffset, 8);
if (write_pass)
write_memory (sp + argoffset, val, 8);
- argoffset += 8;
- }
- }
+ argoffset += 8;
+ }
+ }
else
{
/* Reduce the parameter down to something that fits in a
- "word". */
+ "word". */
char word[MAX_REGISTER_SIZE];
memset (word, 0, MAX_REGISTER_SIZE);
if (len > tdep->wordsize
@@ -267,12 +245,12 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
|| TYPE_CODE (type) == TYPE_CODE_UNION)
{
/* Structs and large values are put on an 8 byte
- aligned stack ... */
+ aligned stack ... */
structoffset = align_up (structoffset, 8);
if (write_pass)
write_memory (sp + structoffset, val, len);
/* ... and then a "word" pointing to that address is
- passed as the parameter. */
+ passed as the parameter. */
store_unsigned_integer (word, tdep->wordsize,
sp + structoffset);
structoffset += len;
@@ -285,13 +263,12 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
/* Always goes in the low address. */
memcpy (word, val, len);
/* Store that "word" in a register, or on the stack.
- The words have "4" byte alignment. */
+ The words have "4" byte alignment. */
if (greg <= 10)
{
if (write_pass)
regcache_cooked_write (regcache,
- tdep->ppc_gp0_regnum + greg,
- word);
+ tdep->ppc_gp0_regnum + greg, word);
greg++;
}
else
@@ -329,14 +306,685 @@ ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch, CORE_ADDR func_addr,
return sp;
}
-/* Structures 8 bytes or less long are returned in the r3 & r4
- registers, according to the SYSV ABI. */
-int
-ppc_sysv_abi_use_struct_convention (int gcc_p, struct type *value_type)
+/* Handle the return-value conventions specified by the SysV 32-bit
+ PowerPC ABI (including all the supplements):
+
+ no floating-point: floating-point values returned using 32-bit
+ general-purpose registers.
+
+ Altivec: 128-bit vectors returned using vector registers.
+
+ e500: 64-bit vectors returned using the full full 64 bit EV
+ register, floating-point values returned using 32-bit
+ general-purpose registers.
+
+ GCC (broken): Small struct values right (instead of left) aligned
+ when returned in general-purpose registers. */
+
+static enum return_value_convention
+do_ppc_sysv_return_value (struct gdbarch *gdbarch, struct type *type,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf, int broken_gcc)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ gdb_assert (tdep->wordsize == 4);
+ if (TYPE_CODE (type) == TYPE_CODE_FLT
+ && TYPE_LENGTH (type) <= 8
+ && ppc_floating_point_unit_p (gdbarch))
+ {
+ if (readbuf)
+ {
+ /* 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);
+ convert_typed_floating (regval, regtype, readbuf, type);
+ }
+ if (writebuf)
+ {
+ /* 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);
+ convert_typed_floating (writebuf, type, regval, regtype);
+ regcache_cooked_write (regcache, FP0_REGNUM + 1, regval);
+ }
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ if ((TYPE_CODE (type) == TYPE_CODE_INT && TYPE_LENGTH (type) == 8)
+ || (TYPE_CODE (type) == TYPE_CODE_FLT && TYPE_LENGTH (type) == 8))
+ {
+ if (readbuf)
+ {
+ /* A long long, or a double stored in the 32 bit r3/r4. */
+ regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3,
+ (bfd_byte *) readbuf + 0);
+ regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 4,
+ (bfd_byte *) readbuf + 4);
+ }
+ if (writebuf)
+ {
+ /* A long long, or a double stored in the 32 bit r3/r4. */
+ regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 3,
+ (const bfd_byte *) writebuf + 0);
+ regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 4,
+ (const bfd_byte *) writebuf + 4);
+ }
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ if (TYPE_CODE (type) == TYPE_CODE_INT
+ && TYPE_LENGTH (type) <= tdep->wordsize)
+ {
+ if (readbuf)
+ {
+ /* Some sort of integer stored in r3. Since TYPE isn't
+ bigger than the register, sign extension isn't a problem
+ - just do everything unsigned. */
+ ULONGEST regval;
+ regcache_cooked_read_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
+ &regval);
+ store_unsigned_integer (readbuf, TYPE_LENGTH (type), regval);
+ }
+ if (writebuf)
+ {
+ /* Some sort of integer stored in r3. Use unpack_long since
+ that should handle any required sign extension. */
+ regcache_cooked_write_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
+ unpack_long (type, writebuf));
+ }
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ if (TYPE_LENGTH (type) == 16
+ && TYPE_CODE (type) == TYPE_CODE_ARRAY
+ && TYPE_VECTOR (type) && tdep->ppc_vr0_regnum >= 0)
+ {
+ if (readbuf)
+ {
+ /* Altivec places the return value in "v2". */
+ regcache_cooked_read (regcache, tdep->ppc_vr0_regnum + 2, readbuf);
+ }
+ if (writebuf)
+ {
+ /* Altivec places the return value in "v2". */
+ regcache_cooked_write (regcache, tdep->ppc_vr0_regnum + 2, writebuf);
+ }
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ if (TYPE_LENGTH (type) == 8
+ && TYPE_CODE (type) == TYPE_CODE_ARRAY
+ && TYPE_VECTOR (type) && tdep->ppc_ev0_regnum >= 0)
+ {
+ /* The e500 ABI places return values for the 64-bit DSP types
+ (__ev64_opaque__) in r3. However, in GDB-speak, ev3
+ corresponds to the entire r3 value for e500, whereas GDB's r3
+ only corresponds to the least significant 32-bits. So place
+ the 64-bit DSP type's value in ev3. */
+ if (readbuf)
+ regcache_cooked_read (regcache, tdep->ppc_ev0_regnum + 3, readbuf);
+ if (writebuf)
+ regcache_cooked_write (regcache, tdep->ppc_ev0_regnum + 3, writebuf);
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ if (broken_gcc && TYPE_LENGTH (type) <= 8)
+ {
+ if (readbuf)
+ {
+ /* GCC screwed up. The last register isn't "left" aligned.
+ Need to extract the least significant part of each
+ register and then store that. */
+ /* Transfer any full words. */
+ int word = 0;
+ while (1)
+ {
+ ULONGEST reg;
+ int len = TYPE_LENGTH (type) - word * tdep->wordsize;
+ if (len <= 0)
+ break;
+ if (len > tdep->wordsize)
+ len = tdep->wordsize;
+ regcache_cooked_read_unsigned (regcache,
+ tdep->ppc_gp0_regnum + 3 + word,
+ &reg);
+ store_unsigned_integer (((bfd_byte *) readbuf
+ + word * tdep->wordsize), len, reg);
+ word++;
+ }
+ }
+ if (writebuf)
+ {
+ /* GCC screwed up. The last register isn't "left" aligned.
+ Need to extract the least significant part of each
+ register and then store that. */
+ /* Transfer any full words. */
+ int word = 0;
+ while (1)
+ {
+ ULONGEST reg;
+ int len = TYPE_LENGTH (type) - word * tdep->wordsize;
+ if (len <= 0)
+ break;
+ if (len > tdep->wordsize)
+ len = tdep->wordsize;
+ reg = extract_unsigned_integer (((const bfd_byte *) writebuf
+ + word * tdep->wordsize), len);
+ regcache_cooked_write_unsigned (regcache,
+ tdep->ppc_gp0_regnum + 3 + word,
+ reg);
+ word++;
+ }
+ }
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ if (TYPE_LENGTH (type) <= 8)
+ {
+ if (readbuf)
+ {
+ /* This matches SVr4 PPC, it does not match GCC. */
+ /* The value is right-padded to 8 bytes and then loaded, as
+ two "words", into r3/r4. */
+ char regvals[MAX_REGISTER_SIZE * 2];
+ regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3,
+ regvals + 0 * tdep->wordsize);
+ if (TYPE_LENGTH (type) > tdep->wordsize)
+ regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 4,
+ regvals + 1 * tdep->wordsize);
+ memcpy (readbuf, regvals, TYPE_LENGTH (type));
+ }
+ if (writebuf)
+ {
+ /* This matches SVr4 PPC, it does not match GCC. */
+ /* The value is padded out to 8 bytes and then loaded, as
+ two "words" into r3/r4. */
+ char regvals[MAX_REGISTER_SIZE * 2];
+ memset (regvals, 0, sizeof regvals);
+ memcpy (regvals, writebuf, TYPE_LENGTH (type));
+ regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 3,
+ regvals + 0 * tdep->wordsize);
+ if (TYPE_LENGTH (type) > tdep->wordsize)
+ regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 4,
+ regvals + 1 * tdep->wordsize);
+ }
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ return RETURN_VALUE_STRUCT_CONVENTION;
+}
+
+enum return_value_convention
+ppc_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
+{
+ return do_ppc_sysv_return_value (gdbarch, valtype, regcache, readbuf,
+ writebuf, 0);
+}
+
+enum return_value_convention
+ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
+ struct type *valtype,
+ struct regcache *regcache,
+ void *readbuf, const void *writebuf)
+{
+ return do_ppc_sysv_return_value (gdbarch, valtype, regcache, readbuf,
+ writebuf, 1);
+}
+
+/* Pass the arguments in either registers, or in the stack. Using the
+ ppc 64 bit SysV ABI.
+
+ This implements a dumbed down version of the ABI. It always writes
+ values to memory, GPR and FPR, even when not necessary. Doing this
+ greatly simplifies the logic. */
+
+CORE_ADDR
+ppc64_sysv_abi_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)
+{
+ 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
+ before this and use that as the BACK_CHAIN. */
+ const CORE_ADDR back_chain = read_sp ();
+ /* See for-loop comment below. */
+ int write_pass;
+ /* Size of the Altivec's vector parameter region, the final value is
+ computed in the for-loop below. */
+ LONGEST vparam_size = 0;
+ /* Size of the general parameter region, the final value is computed
+ in the for-loop below. */
+ LONGEST gparam_size = 0;
+ /* Kevin writes ... I don't mind seeing tdep->wordsize used in the
+ calls to align_up(), align_down(), etc. because this makes it
+ easier to reuse this code (in a copy/paste sense) in the future,
+ but it is a 64-bit ABI and asserting that the wordsize is 8 bytes
+ at some point makes it easier to verify that this function is
+ correct without having to do a non-local analysis to figure out
+ the possible values of tdep->wordsize. */
+ gdb_assert (tdep->wordsize == 8);
+
+ /* Go through the argument list twice.
+
+ Pass 1: Compute the function call's stack space and register
+ requirements.
+
+ Pass 2: Replay the same computation but this time also write the
+ values out to the target. */
+
+ for (write_pass = 0; write_pass < 2; write_pass++)
+ {
+ int argno;
+ /* Next available floating point register for float and double
+ arguments. */
+ int freg = 1;
+ /* Next available general register for non-vector (but possibly
+ float) arguments. */
+ int greg = 3;
+ /* Next available vector register for vector arguments. */
+ int vreg = 2;
+ /* The address, at which the next general purpose parameter
+ (integer, struct, float, ...) should be saved. */
+ CORE_ADDR gparam;
+ /* Address, at which the next Altivec vector parameter should be
+ saved. */
+ CORE_ADDR vparam;
+
+ if (!write_pass)
+ {
+ /* During the first pass, GPARAM and VPARAM are more like
+ offsets (start address zero) than addresses. That way
+ the accumulate the total stack space each region
+ requires. */
+ gparam = 0;
+ vparam = 0;
+ }
+ else
+ {
+ /* Decrement the stack pointer making space for the Altivec
+ and general on-stack parameters. Set vparam and gparam
+ to their corresponding regions. */
+ vparam = align_down (sp - vparam_size, 16);
+ gparam = align_down (vparam - gparam_size, 16);
+ /* Add in space for the TOC, link editor double word,
+ compiler double word, LR save area, CR save area. */
+ sp = align_down (gparam - 48, 16);
+ }
+
+ /* If the function is returning a `struct', then there is an
+ extra hidden parameter (which will be passed in r3)
+ containing the address of that struct.. In that case we
+ should advance one word and start from r4 register to copy
+ parameters. This also consumes one on-stack parameter slot. */
+ if (struct_return)
+ {
+ if (write_pass)
+ regcache_cooked_write_signed (regcache,
+ tdep->ppc_gp0_regnum + greg,
+ struct_addr);
+ greg++;
+ gparam = align_up (gparam + tdep->wordsize, tdep->wordsize);
+ }
+
+ for (argno = 0; argno < nargs; argno++)
+ {
+ struct value *arg = args[argno];
+ struct type *type = check_typedef (VALUE_TYPE (arg));
+ char *val = VALUE_CONTENTS (arg);
+ if (TYPE_CODE (type) == TYPE_CODE_FLT && TYPE_LENGTH (type) <= 8)
+ {
+ /* Floats and Doubles go in f1 .. f13. They also
+ consume a left aligned GREG,, and can end up in
+ memory. */
+ if (write_pass)
+ {
+ if (ppc_floating_point_unit_p (current_gdbarch)
+ && freg <= 13)
+ {
+ char regval[MAX_REGISTER_SIZE];
+ struct type *regtype = register_type (gdbarch,
+ FP0_REGNUM);
+ convert_typed_floating (val, type, regval, regtype);
+ regcache_cooked_write (regcache, FP0_REGNUM + freg,
+ regval);
+ }
+ if (greg <= 10)
+ {
+ /* The ABI states "Single precision floating
+ point values are mapped to the first word in
+ a single doubleword" and "... floating point
+ values mapped to the first eight doublewords
+ of the parameter save area are also passed in
+ general registers").
+
+ This code interprets that to mean: store it,
+ left aligned, in the general register. */
+ char regval[MAX_REGISTER_SIZE];
+ memset (regval, 0, sizeof regval);
+ memcpy (regval, val, TYPE_LENGTH (type));
+ regcache_cooked_write (regcache,
+ tdep->ppc_gp0_regnum + greg,
+ regval);
+ }
+ write_memory (gparam, val, TYPE_LENGTH (type));
+ }
+ /* Always consume parameter stack space. */
+ freg++;
+ greg++;
+ gparam = align_up (gparam + TYPE_LENGTH (type), tdep->wordsize);
+ }
+ else if (TYPE_LENGTH (type) == 16 && TYPE_VECTOR (type)
+ && TYPE_CODE (type) == TYPE_CODE_ARRAY
+ && tdep->ppc_vr0_regnum >= 0)
+ {
+ /* In the Altivec ABI, vectors go in the vector
+ registers v2 .. v13, or when that runs out, a vector
+ annex which goes above all the normal parameters.
+ NOTE: cagney/2003-09-21: This is a guess based on the
+ PowerOpen Altivec ABI. */
+ if (vreg <= 13)
+ {
+ if (write_pass)
+ regcache_cooked_write (regcache,
+ tdep->ppc_vr0_regnum + vreg, val);
+ vreg++;
+ }
+ else
+ {
+ if (write_pass)
+ write_memory (vparam, val, TYPE_LENGTH (type));
+ vparam = align_up (vparam + TYPE_LENGTH (type), 16);
+ }
+ }
+ else if ((TYPE_CODE (type) == TYPE_CODE_INT
+ || TYPE_CODE (type) == TYPE_CODE_ENUM)
+ && TYPE_LENGTH (type) <= 8)
+ {
+ /* Scalars get sign[un]extended and go in gpr3 .. gpr10.
+ They can also end up in memory. */
+ if (write_pass)
+ {
+ /* Sign extend the value, then store it unsigned. */
+ ULONGEST word = unpack_long (type, val);
+ if (greg <= 10)
+ regcache_cooked_write_unsigned (regcache,
+ tdep->ppc_gp0_regnum +
+ greg, word);
+ write_memory_unsigned_integer (gparam, tdep->wordsize,
+ word);
+ }
+ greg++;
+ gparam = align_up (gparam + TYPE_LENGTH (type), tdep->wordsize);
+ }
+ else
+ {
+ int byte;
+ for (byte = 0; byte < TYPE_LENGTH (type);
+ byte += tdep->wordsize)
+ {
+ if (write_pass && greg <= 10)
+ {
+ char regval[MAX_REGISTER_SIZE];
+ int len = TYPE_LENGTH (type) - byte;
+ if (len > tdep->wordsize)
+ len = tdep->wordsize;
+ memset (regval, 0, sizeof regval);
+ /* WARNING: cagney/2003-09-21: As best I can
+ tell, the ABI specifies that the value should
+ be left aligned. Unfortunately, GCC doesn't
+ do this - it instead right aligns even sized
+ values and puts odd sized values on the
+ stack. Work around that by putting both a
+ left and right aligned value into the
+ register (hopefully no one notices :-^).
+ Arrrgh! */
+ /* Left aligned (8 byte values such as pointers
+ fill the buffer). */
+ memcpy (regval, val + byte, len);
+ /* Right aligned (but only if even). */
+ if (len == 1 || len == 2 || len == 4)
+ memcpy (regval + tdep->wordsize - len,
+ val + byte, len);
+ regcache_cooked_write (regcache, greg, regval);
+ }
+ greg++;
+ }
+ if (write_pass)
+ /* WARNING: cagney/2003-09-21: Strictly speaking, this
+ isn't necessary, unfortunately, GCC appears to get
+ "struct convention" parameter passing wrong putting
+ odd sized structures in memory instead of in a
+ register. Work around this by always writing the
+ value to memory. Fortunately, doing this
+ simplifies the code. */
+ write_memory (gparam, val, TYPE_LENGTH (type));
+ /* Always consume parameter stack space. */
+ gparam = align_up (gparam + TYPE_LENGTH (type), tdep->wordsize);
+ }
+ }
+
+ if (!write_pass)
+ {
+ /* Save the true region sizes ready for the second pass. */
+ vparam_size = vparam;
+ /* Make certain that the general parameter save area is at
+ least the minimum 8 registers (or doublewords) in size. */
+ if (greg < 8)
+ gparam_size = 8 * tdep->wordsize;
+ else
+ gparam_size = gparam;
+ }
+ }
+
+ /* Update %sp. */
+ regcache_cooked_write_signed (regcache, SP_REGNUM, sp);
+
+ /* Write the backchain (it occupies WORDSIZED bytes). */
+ write_memory_signed_integer (sp, tdep->wordsize, back_chain);
+
+ /* Point the inferior function call's return address at the dummy's
+ breakpoint. */
+ regcache_cooked_write_signed (regcache, tdep->ppc_lr_regnum, bp_addr);
+
+ /* Find a value for the TOC register. Every symbol should have both
+ ".FN" and "FN" in the minimal symbol table. "FN" points at the
+ FN's descriptor, while ".FN" points at the entry point (which
+ matches FUNC_ADDR). Need to reverse from FUNC_ADDR back to the
+ FN's descriptor address. */
+ {
+ /* Find the minimal symbol that corresponds to FUNC_ADDR (should
+ have the name ".FN"). */
+ struct minimal_symbol *dot_fn = lookup_minimal_symbol_by_pc (func_addr);
+ if (dot_fn != NULL && SYMBOL_LINKAGE_NAME (dot_fn)[0] == '.')
+ {
+ /* Now find the corresponding "FN" (dropping ".") minimal
+ symbol's address. */
+ struct minimal_symbol *fn =
+ lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (dot_fn) + 1, NULL,
+ NULL);
+ if (fn != NULL)
+ {
+ /* Got the address of that descriptor. The TOC is the
+ second double word. */
+ CORE_ADDR toc =
+ read_memory_unsigned_integer (SYMBOL_VALUE_ADDRESS (fn) +
+ tdep->wordsize, tdep->wordsize);
+ regcache_cooked_write_unsigned (regcache,
+ tdep->ppc_gp0_regnum + 2, toc);
+ }
+ }
+ }
+
+ return sp;
+}
+
+
+/* The 64 bit ABI retun value convention.
+
+ Return non-zero if the return-value is stored in a register, return
+ 0 if the return-value is instead stored on the stack (a.k.a.,
+ struct return convention).
+
+ For a return-value stored in a register: when WRITEBUF is non-NULL,
+ copy the buffer to the corresponding register return-value location
+ location; when READBUF is non-NULL, fill the buffer from the
+ corresponding register return-value location. */
+enum return_value_convention
+ppc64_sysv_abi_return_value (struct gdbarch *gdbarch, struct type *valtype,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
{
- if ((TYPE_LENGTH (value_type) == 16 || TYPE_LENGTH (value_type) == 8)
- && TYPE_VECTOR (value_type))
- return 0;
+ struct gdbarch_tdep *tdep = gdbarch_tdep (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);
+ if (writebuf != NULL)
+ {
+ convert_typed_floating (writebuf, valtype, regval, regtype);
+ regcache_cooked_write (regcache, FP0_REGNUM + 1, regval);
+ }
+ if (readbuf != NULL)
+ {
+ regcache_cooked_read (regcache, FP0_REGNUM + 1, regval);
+ convert_typed_floating (regval, regtype, readbuf, valtype);
+ }
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ if (TYPE_CODE (valtype) == TYPE_CODE_INT && TYPE_LENGTH (valtype) <= 8)
+ {
+ /* Integers in r3. */
+ if (writebuf != NULL)
+ {
+ /* Be careful to sign extend the value. */
+ regcache_cooked_write_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
+ unpack_long (valtype, writebuf));
+ }
+ if (readbuf != NULL)
+ {
+ /* Extract the integer from r3. Since this is truncating the
+ value, there isn't a sign extension problem. */
+ ULONGEST regval;
+ regcache_cooked_read_unsigned (regcache, tdep->ppc_gp0_regnum + 3,
+ &regval);
+ store_unsigned_integer (readbuf, TYPE_LENGTH (valtype), regval);
+ }
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ /* All pointers live in r3. */
+ if (TYPE_CODE (valtype) == TYPE_CODE_PTR)
+ {
+ /* All pointers live in r3. */
+ if (writebuf != NULL)
+ regcache_cooked_write (regcache, tdep->ppc_gp0_regnum + 3, writebuf);
+ if (readbuf != NULL)
+ regcache_cooked_read (regcache, tdep->ppc_gp0_regnum + 3, readbuf);
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ if (TYPE_CODE (valtype) == TYPE_CODE_ARRAY
+ && TYPE_LENGTH (valtype) <= 8
+ && TYPE_CODE (TYPE_TARGET_TYPE (valtype)) == TYPE_CODE_INT
+ && TYPE_LENGTH (TYPE_TARGET_TYPE (valtype)) == 1)
+ {
+ /* Small character arrays are returned, right justified, in r3. */
+ int offset = (register_size (gdbarch, tdep->ppc_gp0_regnum + 3)
+ - TYPE_LENGTH (valtype));
+ if (writebuf != NULL)
+ regcache_cooked_write_part (regcache, tdep->ppc_gp0_regnum + 3,
+ offset, TYPE_LENGTH (valtype), writebuf);
+ if (readbuf != NULL)
+ regcache_cooked_read_part (regcache, tdep->ppc_gp0_regnum + 3,
+ offset, TYPE_LENGTH (valtype), readbuf);
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ /* Big floating point values get stored in adjacent floating
+ point registers. */
+ if (TYPE_CODE (valtype) == TYPE_CODE_FLT
+ && (TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 32))
+ {
+ if (writebuf || readbuf != NULL)
+ {
+ int i;
+ for (i = 0; i < TYPE_LENGTH (valtype) / 8; i++)
+ {
+ if (writebuf != NULL)
+ regcache_cooked_write (regcache, FP0_REGNUM + 1 + i,
+ (const bfd_byte *) writebuf + i * 8);
+ if (readbuf != NULL)
+ regcache_cooked_read (regcache, FP0_REGNUM + 1 + i,
+ (bfd_byte *) readbuf + i * 8);
+ }
+ }
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ /* Complex values get returned in f1:f2, need to convert. */
+ if (TYPE_CODE (valtype) == TYPE_CODE_COMPLEX
+ && (TYPE_LENGTH (valtype) == 8 || TYPE_LENGTH (valtype) == 16))
+ {
+ if (regcache != NULL)
+ {
+ int i;
+ for (i = 0; i < 2; i++)
+ {
+ char regval[MAX_REGISTER_SIZE];
+ struct type *regtype =
+ register_type (current_gdbarch, 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,
+ regval);
+ }
+ if (readbuf != NULL)
+ {
+ regcache_cooked_read (regcache, FP0_REGNUM + 1 + i, regval);
+ convert_typed_floating (regval, regtype,
+ (bfd_byte *) readbuf +
+ i * (TYPE_LENGTH (valtype) / 2),
+ valtype);
+ }
+ }
+ }
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ /* Big complex values get stored in f1:f4. */
+ if (TYPE_CODE (valtype) == TYPE_CODE_COMPLEX && TYPE_LENGTH (valtype) == 32)
+ {
+ if (regcache != NULL)
+ {
+ int i;
+ for (i = 0; i < 4; i++)
+ {
+ if (writebuf != NULL)
+ regcache_cooked_write (regcache, FP0_REGNUM + 1 + i,
+ (const bfd_byte *) writebuf + i * 8);
+ if (readbuf != NULL)
+ regcache_cooked_read (regcache, FP0_REGNUM + 1 + i,
+ (bfd_byte *) readbuf + i * 8);
+ }
+ }
+ return RETURN_VALUE_REGISTER_CONVENTION;
+ }
+ return RETURN_VALUE_STRUCT_CONVENTION;
+}
- return (TYPE_LENGTH (value_type) > 8);
-}
+CORE_ADDR
+ppc64_sysv_abi_adjust_breakpoint_address (struct gdbarch *gdbarch,
+ CORE_ADDR bpaddr)
+{
+ /* PPC64 SYSV specifies that the minimal-symbol "FN" should point at
+ a function-descriptor while the corresponding minimal-symbol
+ ".FN" should point at the entry point. Consequently, a command
+ like "break FN" applied to an object file with only minimal
+ symbols, will insert the breakpoint into the descriptor at "FN"
+ and not the function at ".FN". Avoid this confusion by adjusting
+ any attempt to set a descriptor breakpoint into a corresponding
+ function breakpoint. Note that GDB warns the user when this
+ adjustment is applied - that's ok as otherwise the user will have
+ no way of knowing why their breakpoint at "FN" resulted in the
+ program stopping at ".FN". */
+ return gdbarch_convert_from_func_ptr_addr (gdbarch, bpaddr, &current_target);
+}
diff --git a/gdb/ppc-tdep.h b/gdb/ppc-tdep.h
index dd84fd1..1c1c9ef 100644
--- a/gdb/ppc-tdep.h
+++ b/gdb/ppc-tdep.h
@@ -26,6 +26,7 @@ struct gdbarch;
struct frame_info;
struct value;
struct regcache;
+struct type;
/* From ppc-linux-tdep.c... */
CORE_ADDR ppc_linux_frame_saved_pc (struct frame_info *fi);
@@ -33,8 +34,16 @@ void ppc_linux_init_extra_frame_info (int fromleaf, struct frame_info *);
int ppc_linux_frameless_function_invocation (struct frame_info *);
void ppc_linux_frame_init_saved_regs (struct frame_info *);
CORE_ADDR ppc_linux_frame_chain (struct frame_info *);
-int ppc_sysv_abi_use_struct_convention (int, struct type *);
-int ppc_sysv_abi_broken_use_struct_convention (int, struct type *);
+enum return_value_convention ppc_sysv_abi_return_value (struct gdbarch *gdbarch,
+ struct type *valtype,
+ struct regcache *regcache,
+ void *readbuf,
+ const void *writebuf);
+enum return_value_convention ppc_sysv_abi_broken_return_value (struct gdbarch *gdbarch,
+ struct type *valtype,
+ struct regcache *regcache,
+ void *readbuf,
+ const void *writebuf);
CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
CORE_ADDR func_addr,
struct regcache *regcache,
@@ -42,11 +51,25 @@ CORE_ADDR ppc_sysv_abi_push_dummy_call (struct gdbarch *gdbarch,
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 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_adjust_breakpoint_address (struct gdbarch *gdbarch,
+ CORE_ADDR bpaddr);
int ppc_linux_memory_remove_breakpoint (CORE_ADDR addr, char *contents_cache);
struct link_map_offsets *ppc_linux_svr4_fetch_link_map_offsets (void);
void ppc_linux_supply_gregset (char *buf);
void ppc_linux_supply_fpregset (char *buf);
+enum return_value_convention ppc64_sysv_abi_return_value (struct gdbarch *gdbarch,
+ struct type *valtype,
+ struct regcache *regcache,
+ void *readbuf,
+ const void *writebuf);
/* From rs6000-tdep.c... */
CORE_ADDR rs6000_frame_saved_pc (struct frame_info *fi);
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c
index 21ab858..adc2a4f 100644
--- a/gdb/ppcnbsd-tdep.c
+++ b/gdb/ppcnbsd-tdep.c
@@ -204,12 +204,37 @@ ppcnbsd_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
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!. */
+
+static enum return_value_convention
+ppcnbsd_return_value (struct gdbarch *gdbarch, struct type *valtype,
+ struct regcache *regcache, void *readbuf,
+ const void *writebuf)
+{
+ if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
+ || TYPE_CODE (valtype) == TYPE_CODE_UNION)
+ && !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8)
+ && TYPE_VECTOR (valtype))
+ && !(TYPE_LENGTH (valtype) == 1
+ || TYPE_LENGTH (valtype) == 2
+ || TYPE_LENGTH (valtype) == 4
+ || TYPE_LENGTH (valtype) == 8))
+ return RETURN_VALUE_STRUCT_CONVENTION;
+ else
+ return ppc_sysv_abi_broken_return_value (gdbarch, valtype, regcache,
+ readbuf, writebuf);
+}
+
static void
ppcnbsd_init_abi (struct gdbarch_info info,
struct gdbarch *gdbarch)
{
set_gdbarch_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);
}
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 6e4765a..3f992e8 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -943,7 +943,6 @@ print_command_1 (char *exp, int inspect, int voidprint)
inspect_it = 0; /* Reset print routines to normal */
}
-/* ARGSUSED */
static void
print_command (char *exp, int from_tty)
{
@@ -951,7 +950,6 @@ print_command (char *exp, int from_tty)
}
/* Same as print, except in epoch, it gets its own window */
-/* ARGSUSED */
static void
inspect_command (char *exp, int from_tty)
{
@@ -961,14 +959,12 @@ inspect_command (char *exp, int from_tty)
}
/* Same as print, except it doesn't print void results. */
-/* ARGSUSED */
static void
call_command (char *exp, int from_tty)
{
print_command_1 (exp, 0, 0);
}
-/* ARGSUSED */
void
output_command (char *exp, int from_tty)
{
@@ -1003,7 +999,6 @@ output_command (char *exp, int from_tty)
do_cleanups (old_chain);
}
-/* ARGSUSED */
static void
set_command (char *exp, int from_tty)
{
@@ -1014,7 +1009,6 @@ set_command (char *exp, int from_tty)
do_cleanups (old_chain);
}
-/* ARGSUSED */
static void
sym_info (char *arg, int from_tty)
{
@@ -1059,7 +1053,6 @@ sym_info (char *arg, int from_tty)
printf_filtered ("No symbol matches %s.\n", arg);
}
-/* ARGSUSED */
static void
address_info (char *exp, int from_tty)
{
@@ -1695,7 +1688,6 @@ enable_display (char *args, int from_tty)
}
}
-/* ARGSUSED */
static void
disable_display_command (char *args, int from_tty)
{
@@ -1738,7 +1730,6 @@ print_variable_value (struct symbol *var, struct frame_info *frame,
value_print (val, stream, 0, Val_pretty_default);
}
-/* ARGSUSED */
static void
printf_command (char *arg, int from_tty)
{
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 11fa6f3..a92b849 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -5519,7 +5519,6 @@ mappingflags (long flags)
* Callback function, does the actual work for 'info proc mappings'.
*/
-/* ARGSUSED */
static int
info_mappings_callback (struct prmap *map, int (*ignore) (), void *unused)
{
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 3561d7c..62c0de5 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -107,14 +107,14 @@ init_legacy_regcache_descr (struct gdbarch *gdbarch,
for (i = 0; i < descr->nr_cooked_registers; i++)
{
/* FIXME: cagney/2001-12-04: This code shouldn't need to use
- DEPRECATED_REGISTER_BYTE(). Unfortunatly, legacy code likes
+ 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] = REGISTER_RAW_SIZE (i);
- gdb_assert (MAX_REGISTER_SIZE >= REGISTER_RAW_SIZE (i));
- gdb_assert (MAX_REGISTER_SIZE >= REGISTER_VIRTUAL_SIZE (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
@@ -138,7 +138,7 @@ init_legacy_regcache_descr (struct gdbarch *gdbarch,
descr->sizeof_cooked_registers = regend;
}
/* FIXME: cagney/2002-05-11: Shouldn't be including pseudo-registers
- in the register cache. Unfortunatly some architectures still
+ 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;
}
@@ -167,11 +167,11 @@ init_regcache_descr (struct gdbarch *gdbarch)
{
if (gdbarch_register_type_p (gdbarch))
{
- gdb_assert (!REGISTER_VIRTUAL_TYPE_P ()); /* OK */
+ gdb_assert (!DEPRECATED_REGISTER_VIRTUAL_TYPE_P ()); /* OK */
descr->register_type[i] = gdbarch_register_type (gdbarch, i);
}
else
- descr->register_type[i] = REGISTER_VIRTUAL_TYPE (i); /* OK */
+ descr->register_type[i] = DEPRECATED_REGISTER_VIRTUAL_TYPE (i); /* OK */
}
/* Construct a strictly RAW register cache. Don't allow pseudo's
@@ -187,7 +187,7 @@ init_regcache_descr (struct gdbarch *gdbarch)
/* 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
- REGISTER_RAW_SIZE are still present, things are most likely
+ 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
@@ -196,7 +196,8 @@ init_regcache_descr (struct gdbarch *gdbarch)
if ((!gdbarch_pseudo_register_read_p (gdbarch)
&& !gdbarch_pseudo_register_write_p (gdbarch)
&& !gdbarch_register_type_p (gdbarch))
- || DEPRECATED_REGISTER_BYTE_P () || REGISTER_RAW_SIZE_P ())
+ || DEPRECATED_REGISTER_BYTE_P ()
+ || DEPRECATED_REGISTER_RAW_SIZE_P ())
{
descr->legacy_p = 1;
init_legacy_regcache_descr (gdbarch, descr);
@@ -228,7 +229,7 @@ init_regcache_descr (struct gdbarch *gdbarch)
}
/* FIXME: cagney/2002-05-22: Should only need to allocate space for
- the raw registers. Unfortunatly some code still accesses the
+ the raw registers. Unfortunately some code still accesses the
register array directly using the global registers[]. Until that
code has been purged, play safe and over allocating the register
buffer. Ulgh! */
@@ -242,8 +243,8 @@ init_regcache_descr (struct gdbarch *gdbarch)
if (DEPRECATED_REGISTER_BYTE_P ())
gdb_assert (descr->register_offset[i] == DEPRECATED_REGISTER_BYTE (i));
#if 0
- gdb_assert (descr->sizeof_register[i] == REGISTER_RAW_SIZE (i));
- gdb_assert (descr->sizeof_register[i] == REGISTER_VIRTUAL_SIZE (i));
+ 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)); */
@@ -278,9 +279,9 @@ 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 REGISTER_RAW_SIZE, if not provided, defaults
+ /* NB: The deprecated DEPRECATED_REGISTER_RAW_SIZE, if not provided, defaults
to the size of the register's type. */
- gdb_assert (size == REGISTER_RAW_SIZE (regnum)); /* OK */
+ 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;
@@ -344,6 +345,14 @@ make_cleanup_regcache_xfree (struct regcache *regcache)
return make_cleanup (do_regcache_xfree, regcache);
}
+/* Return REGCACHE's architecture. */
+
+struct gdbarch *
+get_regcache_arch (const struct regcache *regcache)
+{
+ return regcache->descr->gdbarch;
+}
+
/* Return a pointer to register REGNUM's buffer cache. */
static char *
@@ -653,7 +662,7 @@ deprecated_read_register_bytes (int in_start, char *in_buf, int in_len)
int byte;
reg_start = DEPRECATED_REGISTER_BYTE (regnum);
- reg_len = REGISTER_RAW_SIZE (regnum);
+ reg_len = DEPRECATED_REGISTER_RAW_SIZE (regnum);
reg_end = reg_start + reg_len;
if (reg_end <= in_start || in_end <= reg_start)
@@ -718,7 +727,7 @@ legacy_read_register_gen (int regnum, char *myaddr)
target_fetch_registers (regnum);
memcpy (myaddr, register_buffer (current_regcache, regnum),
- REGISTER_RAW_SIZE (regnum));
+ DEPRECATED_REGISTER_RAW_SIZE (regnum));
}
void
@@ -905,7 +914,7 @@ legacy_write_register_gen (int regnum, const void *myaddr)
registers_ptid = inferior_ptid;
}
- size = REGISTER_RAW_SIZE (regnum);
+ size = DEPRECATED_REGISTER_RAW_SIZE (regnum);
if (real_register (regnum))
{
@@ -1015,7 +1024,7 @@ deprecated_write_register_bytes (int myregstart, char *myaddr, int inlen)
int regstart, regend;
regstart = DEPRECATED_REGISTER_BYTE (regnum);
- regend = regstart + REGISTER_RAW_SIZE (regnum);
+ regend = regstart + DEPRECATED_REGISTER_RAW_SIZE (regnum);
/* Is this register completely outside the range the user is writing? */
if (myregend <= regstart || regend <= myregstart)
@@ -1144,9 +1153,9 @@ register_offset_hack (struct gdbarch *gdbarch, int regnum)
ULONGEST
read_register (int regnum)
{
- char *buf = alloca (REGISTER_RAW_SIZE (regnum));
+ char *buf = alloca (DEPRECATED_REGISTER_RAW_SIZE (regnum));
deprecated_read_register_gen (regnum, buf);
- return (extract_unsigned_integer (buf, REGISTER_RAW_SIZE (regnum)));
+ return (extract_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (regnum)));
}
ULONGEST
@@ -1177,7 +1186,7 @@ write_register (int regnum, LONGEST val)
{
void *buf;
int size;
- size = REGISTER_RAW_SIZE (regnum);
+ size = DEPRECATED_REGISTER_RAW_SIZE (regnum);
buf = alloca (size);
store_signed_integer (buf, size, (LONGEST) val);
deprecated_write_register_gen (regnum, buf);
@@ -1407,7 +1416,6 @@ deprecated_read_fp (void)
internal_error (__FILE__, __LINE__, "deprecated_read_fp");
}
-/* ARGSUSED */
static void
reg_flush_command (char *command, int from_tty)
{
@@ -1544,9 +1552,9 @@ regcache_dump (struct regcache *regcache, struct ui_file *file,
fprintf_unfiltered (file, " %5ld",
regcache->descr->sizeof_register[regnum]);
if ((regcache->descr->sizeof_register[regnum]
- != REGISTER_RAW_SIZE (regnum))
+ != DEPRECATED_REGISTER_RAW_SIZE (regnum))
|| (regcache->descr->sizeof_register[regnum]
- != REGISTER_VIRTUAL_SIZE (regnum))
+ != DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum))
|| (regcache->descr->sizeof_register[regnum]
!= TYPE_LENGTH (register_type (regcache->descr->gdbarch,
regnum)))
@@ -1602,7 +1610,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,
- REGISTER_RAW_SIZE (regnum));
+ DEPRECATED_REGISTER_RAW_SIZE (regnum));
}
}
@@ -1616,7 +1624,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,
- REGISTER_VIRTUAL_SIZE (regnum));
+ DEPRECATED_REGISTER_VIRTUAL_SIZE (regnum));
}
}
diff --git a/gdb/regcache.h b/gdb/regcache.h
index b8ac182..26a1b8a 100644
--- a/gdb/regcache.h
+++ b/gdb/regcache.h
@@ -32,6 +32,10 @@ void regcache_xfree (struct regcache *regcache);
struct cleanup *make_cleanup_regcache_xfree (struct regcache *regcache);
struct regcache *regcache_xmalloc (struct gdbarch *gdbarch);
+/* Return REGCACHE's architecture. */
+
+extern struct gdbarch *get_regcache_arch (const struct regcache *regcache);
+
/* Transfer a raw register [0..NUM_REGS) between core-gdb and the
regcache. */
@@ -117,9 +121,9 @@ extern int register_offset_hack (struct gdbarch *gdbarch, int regnum);
value stored in a table.
NOTE: cagney/2002-08-17: The original macro was called
- 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
+ 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
@@ -136,15 +140,15 @@ extern struct type *register_type (struct gdbarch *gdbarch, int regnum);
FIXME: cagney/2003-02-28:
- Unfortunatly, thanks to some legacy architectures, this doesn't
+ 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 REGISTER_VIRTUAL_SIZE in cooked
- code, but with the comment:
+ used? As a rule of thumb, use DEPRECATED_REGISTER_VIRTUAL_SIZE in
+ cooked code, but with the comment:
OK: REGISTER_VIRTUAL_SIZE
diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c
index 94985fe..10d7362 100644
--- a/gdb/remote-e7000.c
+++ b/gdb/remote-e7000.c
@@ -1,4 +1,4 @@
-/* Remote debugging interface for Hitachi E7000 ICE, for GDB
+/* 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.
@@ -24,8 +24,8 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-/* The E7000 is an in-circuit emulator for the Hitachi H8/300-H and
- Hitachi-SH processor. It has serial port and a lan port.
+/* The E7000 is an in-circuit emulator for the Renesas H8/300-H and
+ Renesas-SH processor. It has serial port and a lan port.
The monitor command set makes it difficult to load large ammounts of
data over the lan without using ftp - so try not to issue load
@@ -882,7 +882,7 @@ fetch_regs_from_dump (int (*nextchar) (), char *want)
internal_error (__FILE__, __LINE__, "failed internal consistency check");
}
store_signed_integer (buf,
- REGISTER_RAW_SIZE (regno),
+ DEPRECATED_REGISTER_RAW_SIZE (regno),
(LONGEST) get_hex (&thischar));
supply_register (regno, buf);
break;
@@ -1964,7 +1964,7 @@ sub2_from_pc (void)
char buf2[200];
store_signed_integer (buf,
- REGISTER_RAW_SIZE (PC_REGNUM),
+ DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM),
read_register (PC_REGNUM) - 2);
supply_register (PC_REGNUM, buf);
sprintf (buf2, ".PC %s\r", phex_nz (read_register (PC_REGNUM), 0));
@@ -2131,8 +2131,8 @@ static void
init_e7000_ops (void)
{
e7000_ops.to_shortname = "e7000";
- e7000_ops.to_longname = "Remote Hitachi e7000 target";
- e7000_ops.to_doc = "Use a remote Hitachi e7000 ICE connected by a serial line;\n\
+ e7000_ops.to_longname = "Remote Renesas e7000 target";
+ e7000_ops.to_doc = "Use a remote Renesas e7000 ICE connected by a serial line;\n\
or a network connection.\n\
Arguments are the name of the device for the serial line,\n\
the speed to connect at in bits per second.\n\
diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c
index cd7f4d3..ee40051 100644
--- a/gdb/remote-hms.c
+++ b/gdb/remote-hms.c
@@ -1,4 +1,4 @@
-/* Remote debugging interface for Hitachi HMS Monitor Version 1.0
+/* Remote debugging interface for Renesas HMS Monitor Version 1.0
Copyright 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Steve Chamberlain
@@ -149,7 +149,7 @@ _initialize_remote_hms (void)
init_monitor_ops (&hms_ops);
hms_ops.to_shortname = "hms";
- hms_ops.to_longname = "Hitachi Microsystems H8/300 debug monitor";
+ hms_ops.to_longname = "Renesas Microsystems H8/300 debug monitor";
hms_ops.to_doc = "Debug via the HMS monitor.\n\
Specify the serial device it is connected to (e.g. /dev/ttya).";
hms_ops.to_open = hms_open;
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 3dc3601..8512e444 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -1494,10 +1494,6 @@ mips_initialize (void)
the request itself succeeds or fails. */
mips_request ('r', 0, 0, &err, mips_receive_wait, NULL);
- /* FIXME: cagney/2002-11-29: Force the update of selected frame.
- This shouldn't be necessary, only many many places still refer to
- selected_frame directly (instead of using get_selected_frame(). */
- get_selected_frame (); /* Hack!!! */
}
/* Open a connection to the remote board. */
@@ -1793,16 +1789,16 @@ mips_wait (ptid_t ptid, struct target_waitstatus *status)
{
char buf[MAX_REGISTER_SIZE];
- store_unsigned_integer (buf, REGISTER_RAW_SIZE (PC_REGNUM), rpc);
+ store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM), rpc);
supply_register (PC_REGNUM, buf);
- store_unsigned_integer (buf, REGISTER_RAW_SIZE (PC_REGNUM), rfp);
+ 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_RAW_SIZE (SP_REGNUM), rsp);
+ store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (SP_REGNUM), rsp);
supply_register (SP_REGNUM, buf);
- store_unsigned_integer (buf, REGISTER_RAW_SIZE (DEPRECATED_FP_REGNUM), 0);
+ store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (DEPRECATED_FP_REGNUM), 0);
supply_register (DEPRECATED_FP_REGNUM, buf);
if (nfields == 9)
@@ -1976,7 +1972,7 @@ 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, REGISTER_RAW_SIZE (regno), val);
+ store_unsigned_integer (buf, DEPRECATED_REGISTER_RAW_SIZE (regno), val);
supply_register (regno, buf);
}
}
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c
index a868f38..bd208c1 100644
--- a/gdb/remote-rdi.c
+++ b/gdb/remote-rdi.c
@@ -524,7 +524,6 @@ arm_rdi_wait (ptid_t ptid, struct target_waitstatus *status)
/* Read the remote registers into the block REGS. */
-/* ARGSUSED */
static void
arm_rdi_fetch_registers (int regno)
{
@@ -624,7 +623,6 @@ arm_rdi_store_registers (int regno)
if SHOULD_WRITE is nonzero. Returns length of data written or
read; 0 for error. TARGET is unused. */
-/* ARGSUSED */
static int
arm_rdi_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
int should_write, struct mem_attrib *attrib,
diff --git a/gdb/remote-sds.c b/gdb/remote-sds.c
index a07827c..c920997 100644
--- a/gdb/remote-sds.c
+++ b/gdb/remote-sds.c
@@ -148,7 +148,6 @@ static int message_pending;
/* Clean up connection to a remote debugger. */
-/* ARGSUSED */
static void
sds_close (int quitting)
{
@@ -467,7 +466,6 @@ static unsigned char sprs[16];
/* Read the remote registers into the block REGS. */
/* Currently we just read all the registers, so we don't use regno. */
-/* ARGSUSED */
static void
sds_fetch_registers (int regno)
{
@@ -657,7 +655,6 @@ sds_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
if SHOULD_WRITE is nonzero. Returns length of data written or
read; 0 for error. TARGET is unused. */
-/* ARGSUSED */
static int
sds_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int should_write,
struct mem_attrib *attrib, struct target_ops *target)
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 11424bb..538f8a4 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -320,14 +320,14 @@ gdbsim_fetch_register (int regno)
memset (buf, 0, MAX_REGISTER_SIZE);
nr_bytes = sim_fetch_register (gdbsim_desc,
REGISTER_SIM_REGNO (regno),
- buf, REGISTER_RAW_SIZE (regno));
- if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno) && warn_user)
+ buf, DEPRECATED_REGISTER_RAW_SIZE (regno));
+ if (nr_bytes > 0 && nr_bytes != DEPRECATED_REGISTER_RAW_SIZE (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, REGISTER_RAW_SIZE (regno));
+ nr_bytes, DEPRECATED_REGISTER_RAW_SIZE (regno));
warn_user = 0;
}
/* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
@@ -340,7 +340,7 @@ gdbsim_fetch_register (int regno)
{
printf_filtered ("gdbsim_fetch_register: %d", regno);
/* FIXME: We could print something more intelligible. */
- dump_mem (buf, REGISTER_RAW_SIZE (regno));
+ dump_mem (buf, DEPRECATED_REGISTER_RAW_SIZE (regno));
}
break;
}
@@ -364,8 +364,8 @@ gdbsim_store_register (int regno)
deprecated_read_register_gen (regno, tmp);
nr_bytes = sim_store_register (gdbsim_desc,
REGISTER_SIM_REGNO (regno),
- tmp, REGISTER_RAW_SIZE (regno));
- if (nr_bytes > 0 && nr_bytes != REGISTER_RAW_SIZE (regno))
+ tmp, DEPRECATED_REGISTER_RAW_SIZE (regno));
+ if (nr_bytes > 0 && nr_bytes != DEPRECATED_REGISTER_RAW_SIZE (regno))
internal_error (__FILE__, __LINE__,
"Register size different to expected");
/* FIXME: cagney/2002-05-27: Should check `nr_bytes == 0'
@@ -375,7 +375,7 @@ gdbsim_store_register (int regno)
{
printf_filtered ("gdbsim_store_register: %d", regno);
/* FIXME: We could print something more intelligible. */
- dump_mem (tmp, REGISTER_RAW_SIZE (regno));
+ dump_mem (tmp, DEPRECATED_REGISTER_RAW_SIZE (regno));
}
}
}
diff --git a/gdb/remote-st.c b/gdb/remote-st.c
index 7c452a2..ce4c7ab 100644
--- a/gdb/remote-st.c
+++ b/gdb/remote-st.c
@@ -385,9 +385,10 @@ st2000_wait (ptid_t ptid, struct target_waitstatus *status)
return inferior_ptid;
}
-/* Return the name of register number REGNO in the form input and output by
- STDEBUG. Currently, REGISTER_NAMES just happens to contain exactly what
- STDEBUG wants. Lets take advantage of that just as long as possible! */
+/* Return the name of register number REGNO in the form input and
+ output by STDEBUG. Currently, REGISTER_NAME just happens return
+ exactly what STDEBUG wants. Lets take advantage of that just as
+ long as possible! */
static char *
get_reg_name (int regno)
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index 74665e8..fd51781 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -1335,7 +1335,6 @@ vx_close (int quitting)
}
/* A vxprocess target should be started via "run" not "target". */
-/*ARGSUSED */
static void
vx_proc_open (char *name, int from_tty)
{
diff --git a/gdb/remote-vx68.c b/gdb/remote-vx68.c
index 3e21fe6..8cdac6f 100644
--- a/gdb/remote-vx68.c
+++ b/gdb/remote-vx68.c
@@ -111,10 +111,10 @@ vx_read_register (int regno)
}
else
{
- bzero (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- MC68K_FPREG_SIZE * 8);
- bzero (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
- MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
+ memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
+ 0, MC68K_FPREG_SIZE * 8);
+ memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPC_REGNUM)],
+ 0, MC68K_FPREG_PLEN - (MC68K_FPREG_SIZE * 8));
}
/* Mark the register cache valid. */
diff --git a/gdb/remote-vxmips.c b/gdb/remote-vxmips.c
index 28a4070..6cc7ca5 100644
--- a/gdb/remote-vxmips.c
+++ b/gdb/remote-vxmips.c
@@ -131,20 +131,20 @@ vx_read_register (int regno)
bcopy (&mips_fpreg_packet[MIPS_R_FP0],
&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
+ DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
/* Copy the floating point control/status register (fpcsr). */
bcopy (&mips_fpreg_packet[MIPS_R_FPCSR],
&deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)],
- REGISTER_RAW_SIZE (FCRCS_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (FCRCS_REGNUM));
}
else
{
- bzero ((char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
- bzero ((char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)],
- REGISTER_RAW_SIZE (FCRCS_REGNUM));
+ memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
+ 0, DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
+ memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)],
+ 0, DEPRECATED_REGISTER_RAW_SIZE (FCRCS_REGNUM));
}
/* Mark the register cache valid. */
@@ -187,13 +187,13 @@ vx_write_register (int regno)
bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
&mips_fpreg_packet[MIPS_R_FP0],
- REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
+ DEPRECATED_REGISTER_RAW_SIZE (FP0_REGNUM) * 32);
/* Copy the floating point control/status register (fpcsr). */
bcopy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FCRCS_REGNUM)],
&mips_fpreg_packet[MIPS_R_FPCSR],
- REGISTER_RAW_SIZE (FCRCS_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (FCRCS_REGNUM));
net_write_registers (mips_fpreg_packet, MIPS_FPREG_PLEN,
PTRACE_SETFPREGS);
diff --git a/gdb/remote-vxsparc.c b/gdb/remote-vxsparc.c
index 339b99f..d313c8f 100644
--- a/gdb/remote-vxsparc.c
+++ b/gdb/remote-vxsparc.c
@@ -102,9 +102,9 @@ vx_read_register (int regno)
automatically; it greatly simplifies debugging. */
sp = extract_unsigned_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (SP_REGNUM)],
- REGISTER_RAW_SIZE (SP_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (SP_REGNUM));
write_memory (sp, &deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
- 16 * REGISTER_RAW_SIZE (L0_REGNUM));
+ 16 * DEPRECATED_REGISTER_RAW_SIZE (L0_REGNUM));
/* If the target has floating point registers, fetch them.
Otherwise, zero the floating point register values in
@@ -124,10 +124,10 @@ vx_read_register (int regno)
}
else
{
- bzero (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
- 32 * SPARC_FPREG_SIZE);
- bzero (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPS_REGNUM)],
- 1 * SPARC_FPREG_SIZE);
+ memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FP0_REGNUM)],
+ 0, 32 * SPARC_FPREG_SIZE);
+ memset (&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPS_REGNUM)],
+ 0, 1 * SPARC_FPREG_SIZE);
}
/* Mark the register cache valid. */
@@ -177,9 +177,9 @@ vx_write_register (int regno)
if (regno < 0 || (L0_REGNUM <= regno && regno <= I7_REGNUM))
{
sp = extract_unsigned_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (SP_REGNUM)],
- REGISTER_RAW_SIZE (SP_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (SP_REGNUM));
write_memory (sp, &deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
- 16 * REGISTER_RAW_SIZE (L0_REGNUM));
+ 16 * DEPRECATED_REGISTER_RAW_SIZE (L0_REGNUM));
}
}
diff --git a/gdb/remote.c b/gdb/remote.c
index ae17b53..80726bc 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -161,8 +161,6 @@ static int ishex (int ch, int *val);
static int stubhex (int ch);
-static int remote_query (int /*char */ , char *, char *, int *);
-
static int hexnumstr (char *, ULONGEST);
static int hexnumnstr (char *, ULONGEST, int);
@@ -206,7 +204,7 @@ void _initialize_remote (void);
/* Description of the remote protocol. Strictly speaking, when the
target is open()ed, remote.c should create a per-target description
of the remote protocol using that target's architecture.
- Unfortunatly, the target stack doesn't include local state. For
+ Unfortunately, the target stack doesn't include local state. For
the moment keep the information in the target's architecture
object. Sigh.. */
@@ -216,7 +214,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; == REGISTER_RAW_SIZE (regnum); at present. */
+ /* long size in bytes; == DEPRECATED_REGISTER_RAW_SIZE (regnum); at present. */
/* char *name; == REGISTER_NAME (regnum); at present. */
};
@@ -749,6 +747,23 @@ packet_ok (const char *buf, struct packet_config *config)
}
}
+/* Should we try the 'vCont' (descriptive resume) request? */
+static struct packet_config remote_protocol_vcont;
+
+static void
+set_remote_protocol_vcont_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
+{
+ update_packet_config (&remote_protocol_vcont);
+}
+
+static void
+show_remote_protocol_vcont_packet_cmd (char *args, int from_tty,
+ struct cmd_list_element *c)
+{
+ show_packet_config_cmd (&remote_protocol_vcont);
+}
+
/* Should we try the 'qSymbol' (target symbol lookup service) request? */
static struct packet_config remote_protocol_qSymbol;
@@ -1903,7 +1918,6 @@ extended_remote_restart (void)
/* Clean up connection to a remote debugger. */
-/* ARGSUSED */
static void
remote_close (int quitting)
{
@@ -2191,6 +2205,7 @@ init_all_packet_configs (void)
update_packet_config (&remote_protocol_E);
update_packet_config (&remote_protocol_P);
update_packet_config (&remote_protocol_qSymbol);
+ update_packet_config (&remote_protocol_vcont);
for (i = 0; i < NR_Z_PACKET_TYPES; i++)
update_packet_config (&remote_protocol_Z[i]);
/* Force remote_write_bytes to check whether target supports binary
@@ -2353,7 +2368,7 @@ remote_open_1 (char *name, int from_tty, struct target_ops *target,
FIXME: cagney/2002-05-19: Instead of re-throwing the exception,
this function should return an error indication letting the
- caller restore the previous state. Unfortunatly the command
+ caller restore the previous state. Unfortunately the command
``target remote'' is directly wired to this function making that
impossible. On a positive note, the CLI side of this problem has
been fixed - the function set_cmd_context() makes it possible for
@@ -2507,115 +2522,144 @@ bin2hex (const char *bin, char *hex, int count)
return i;
}
-/* Tell the remote machine to resume. */
-
-static enum target_signal last_sent_signal = TARGET_SIGNAL_0;
-
-static int last_sent_step;
+/* Check for the availability of vCont. This function should also check
+ the response. */
static void
-remote_resume (ptid_t ptid, int step, enum target_signal siggnal)
+remote_vcont_probe (struct remote_state *rs, char *buf)
{
- struct remote_state *rs = get_remote_state ();
- char *buf = alloca (rs->remote_packet_size);
- int pid = PIDGET (ptid);
- char *p;
+ strcpy (buf, "vCont?");
+ putpkt (buf);
+ getpkt (buf, rs->remote_packet_size, 0);
- if (pid == -1)
- set_thread (0, 0); /* run any thread */
- else
- set_thread (pid, 0); /* run this thread */
+ /* Make sure that the features we assume are supported. */
+ if (strncmp (buf, "vCont", 5) == 0)
+ {
+ char *p = &buf[5];
+ int support_s, support_S, support_c, support_C;
+
+ support_s = 0;
+ support_S = 0;
+ support_c = 0;
+ support_C = 0;
+ while (p && *p == ';')
+ {
+ p++;
+ if (*p == 's' && (*(p + 1) == ';' || *(p + 1) == 0))
+ support_s = 1;
+ else if (*p == 'S' && (*(p + 1) == ';' || *(p + 1) == 0))
+ support_S = 1;
+ else if (*p == 'c' && (*(p + 1) == ';' || *(p + 1) == 0))
+ support_c = 1;
+ else if (*p == 'C' && (*(p + 1) == ';' || *(p + 1) == 0))
+ support_C = 1;
+
+ p = strchr (p, ';');
+ }
- last_sent_signal = siggnal;
- last_sent_step = step;
+ /* If s, S, c, and C are not all supported, we can't use vCont. Clearing
+ BUF will make packet_ok disable the packet. */
+ if (!support_s || !support_S || !support_c || !support_C)
+ buf[0] = 0;
+ }
- /* A hook for when we need to do something at the last moment before
- resumption. */
- if (target_resume_hook)
- (*target_resume_hook) ();
+ packet_ok (buf, &remote_protocol_vcont);
+}
+/* Resume the remote inferior by using a "vCont" packet. The thread
+ to be resumed is PTID; STEP and SIGGNAL indicate whether the
+ resumed thread should be single-stepped and/or signalled. If PTID's
+ PID is -1, then all threads are resumed; the thread to be stepped and/or
+ signalled is given in the global INFERIOR_PTID. This function returns
+ non-zero iff it resumes the inferior.
- /* 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. */
+ This function issues a strict subset of all possible vCont commands at the
+ moment. */
- 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);
+static int
+remote_vcont_resume (ptid_t ptid, int step, enum target_signal siggnal)
+{
+ struct remote_state *rs = get_remote_state ();
+ int pid = PIDGET (ptid);
+ char *buf = NULL;
+ struct cleanup *old_cleanup;
- 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;
+ buf = xmalloc (rs->remote_packet_size);
+ old_cleanup = make_cleanup (xfree, buf);
- putpkt (buf);
- getpkt (buf, (rs->remote_packet_size), 0);
+ if (remote_protocol_vcont.support == PACKET_SUPPORT_UNKNOWN)
+ remote_vcont_probe (rs, buf);
- if (packet_ok (buf, &remote_protocol_e) == PACKET_OK)
- return;
- }
- }
+ if (remote_protocol_vcont.support == PACKET_DISABLE)
+ {
+ do_cleanups (old_cleanup);
+ return 0;
}
- if (siggnal != TARGET_SIGNAL_0)
+ /* If we could generate a wider range of packets, we'd have to worry
+ about overflowing BUF. Should there be a generic
+ "multi-part-packet" packet? */
+
+ if (PIDGET (inferior_ptid) == MAGIC_NULL_PID)
{
- buf[0] = step ? 'S' : 'C';
- buf[1] = tohex (((int) siggnal >> 4) & 0xf);
- buf[2] = tohex (((int) siggnal) & 0xf);
- buf[3] = '\0';
+ /* MAGIC_NULL_PTID means that we don't have any active threads, so we
+ don't have any PID numbers the inferior will understand. Make sure
+ to only send forms that do not specify a PID. */
+ if (step && siggnal != TARGET_SIGNAL_0)
+ sprintf (buf, "vCont;S%02x", siggnal);
+ else if (step)
+ sprintf (buf, "vCont;s");
+ else if (siggnal != TARGET_SIGNAL_0)
+ sprintf (buf, "vCont;C%02x", siggnal);
+ else
+ sprintf (buf, "vCont;c");
+ }
+ else if (pid == -1)
+ {
+ /* Resume all threads, with preference for INFERIOR_PTID. */
+ if (step && siggnal != TARGET_SIGNAL_0)
+ sprintf (buf, "vCont;S%02x:%x;c", siggnal, PIDGET (inferior_ptid));
+ else if (step)
+ sprintf (buf, "vCont;s:%x;c", PIDGET (inferior_ptid));
+ else if (siggnal != TARGET_SIGNAL_0)
+ sprintf (buf, "vCont;C%02x:%x;c", siggnal, PIDGET (inferior_ptid));
+ else
+ sprintf (buf, "vCont;c");
}
else
- strcpy (buf, step ? "s" : "c");
+ {
+ /* Scheduler locking; resume only PTID. */
+ if (step && siggnal != TARGET_SIGNAL_0)
+ sprintf (buf, "vCont;S%02x:%x", siggnal, pid);
+ else if (step)
+ sprintf (buf, "vCont;s:%x", pid);
+ else if (siggnal != TARGET_SIGNAL_0)
+ sprintf (buf, "vCont;C%02x:%x", siggnal, pid);
+ else
+ sprintf (buf, "vCont;c:%x", pid);
+ }
putpkt (buf);
+
+ do_cleanups (old_cleanup);
+
+ return 1;
}
-/* Same as remote_resume, but with async support. */
+/* Tell the remote machine to resume. */
+
+static enum target_signal last_sent_signal = TARGET_SIGNAL_0;
+
+static int last_sent_step;
+
static void
-remote_async_resume (ptid_t ptid, int step, enum target_signal siggnal)
+remote_resume (ptid_t ptid, int step, enum target_signal siggnal)
{
struct remote_state *rs = get_remote_state ();
char *buf = alloca (rs->remote_packet_size);
int pid = PIDGET (ptid);
char *p;
- if (pid == -1)
- set_thread (0, 0); /* run any thread */
- else
- set_thread (pid, 0); /* run this thread */
-
last_sent_signal = siggnal;
last_sent_step = step;
@@ -2624,6 +2668,16 @@ remote_async_resume (ptid_t ptid, int step, enum target_signal siggnal)
if (target_resume_hook)
(*target_resume_hook) ();
+ /* The vCont packet doesn't need to specify threads via Hc. */
+ if (remote_vcont_resume (ptid, step, siggnal))
+ return;
+
+ /* All other supported resume packets do use Hc, so call set_thread. */
+ if (pid == -1)
+ set_thread (0, 0); /* run any thread */
+ 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
@@ -2655,7 +2709,7 @@ remote_async_resume (ptid_t ptid, int step, enum target_signal siggnal)
getpkt (buf, (rs->remote_packet_size), 0);
if (packet_ok (buf, &remote_protocol_E) == PACKET_OK)
- goto register_event_loop;
+ return;
}
}
else
@@ -2673,7 +2727,7 @@ remote_async_resume (ptid_t ptid, int step, enum target_signal siggnal)
getpkt (buf, (rs->remote_packet_size), 0);
if (packet_ok (buf, &remote_protocol_e) == PACKET_OK)
- goto register_event_loop;
+ return;
}
}
}
@@ -2682,15 +2736,21 @@ remote_async_resume (ptid_t ptid, int step, enum target_signal siggnal)
{
buf[0] = step ? 'S' : 'C';
buf[1] = tohex (((int) siggnal >> 4) & 0xf);
- buf[2] = tohex ((int) siggnal & 0xf);
+ buf[2] = tohex (((int) siggnal) & 0xf);
buf[3] = '\0';
}
else
strcpy (buf, step ? "s" : "c");
-
+
putpkt (buf);
+}
+
+/* Same as remote_resume, but with async support. */
+static void
+remote_async_resume (ptid_t ptid, int step, enum target_signal siggnal)
+{
+ remote_resume (ptid, step, siggnal);
-register_event_loop:
/* We are about to start executing the inferior, let's register it
with the event loop. NOTE: this is the one place where all the
execution commands end up. We could alternatively do this in each
@@ -3027,9 +3087,9 @@ Packet: '%s'\n",
error ("Remote sent bad register number %s: %s\nPacket: '%s'\n",
phex_nz (pnum, 0), p, buf);
- fieldsize = hex2bin (p, regs, REGISTER_RAW_SIZE (reg->regnum));
+ fieldsize = hex2bin (p, regs, DEPRECATED_REGISTER_RAW_SIZE (reg->regnum));
p += 2 * fieldsize;
- if (fieldsize < REGISTER_RAW_SIZE (reg->regnum))
+ if (fieldsize < DEPRECATED_REGISTER_RAW_SIZE (reg->regnum))
warning ("Remote reply is too short: %s", buf);
supply_register (reg->regnum, regs);
}
@@ -3275,9 +3335,9 @@ 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, REGISTER_RAW_SIZE (reg->regnum));
+ fieldsize = hex2bin (p, regs, DEPRECATED_REGISTER_RAW_SIZE (reg->regnum));
p += 2 * fieldsize;
- if (fieldsize < REGISTER_RAW_SIZE (reg->regnum))
+ if (fieldsize < DEPRECATED_REGISTER_RAW_SIZE (reg->regnum))
warning ("Remote reply is too short: %s", buf);
supply_register (reg->regnum, regs);
}
@@ -3416,7 +3476,6 @@ static int register_bytes_found;
/* Read the remote registers into the block REGS. */
/* Currently we just read all the registers, so we don't use regnum. */
-/* ARGSUSED */
static void
remote_fetch_registers (int regnum)
{
@@ -3553,7 +3612,7 @@ 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, REGISTER_RAW_SIZE (reg->regnum));
+ bin2hex (regp, p, DEPRECATED_REGISTER_RAW_SIZE (reg->regnum));
remote_send (buf, rs->remote_packet_size);
return buf[0] != '\0';
@@ -3970,7 +4029,6 @@ remote_read_bytes (CORE_ADDR memaddr, char *myaddr, int len)
SHOULD_WRITE is nonzero. Returns length of data written or read; 0
for error. TARGET is unused. */
-/* ARGSUSED */
static int
remote_xfer_memory (CORE_ADDR mem_addr, char *buffer, int mem_len,
int should_write, struct mem_attrib *attrib,
@@ -3995,73 +4053,6 @@ remote_xfer_memory (CORE_ADDR mem_addr, char *buffer, int mem_len,
return res;
}
-
-#if 0
-/* Enable after 4.12. */
-
-void
-remote_search (int len, char *data, char *mask, CORE_ADDR startaddr,
- int increment, CORE_ADDR lorange, CORE_ADDR hirange,
- CORE_ADDR *addr_found, char *data_found)
-{
- if (increment == -4 && len == 4)
- {
- long mask_long, data_long;
- long data_found_long;
- CORE_ADDR addr_we_found;
- char *buf = alloca (rs->remote_packet_size);
- long returned_long[2];
- char *p;
-
- mask_long = extract_unsigned_integer (mask, len);
- data_long = extract_unsigned_integer (data, len);
- sprintf (buf, "t%x:%x,%x", startaddr, data_long, mask_long);
- putpkt (buf);
- getpkt (buf, (rs->remote_packet_size), 0);
- if (buf[0] == '\0')
- {
- /* The stub doesn't support the 't' request. We might want to
- remember this fact, but on the other hand the stub could be
- switched on us. Maybe we should remember it only until
- the next "target remote". */
- generic_search (len, data, mask, startaddr, increment, lorange,
- hirange, addr_found, data_found);
- return;
- }
-
- if (buf[0] == 'E')
- /* There is no correspondance between what the remote protocol uses
- for errors and errno codes. We would like a cleaner way of
- representing errors (big enough to include errno codes, bfd_error
- codes, and others). But for now just use EIO. */
- memory_error (EIO, startaddr);
- p = buf;
- addr_we_found = 0;
- while (*p != '\0' && *p != ',')
- addr_we_found = (addr_we_found << 4) + fromhex (*p++);
- if (*p == '\0')
- error ("Protocol error: short return for search");
-
- data_found_long = 0;
- while (*p != '\0' && *p != ',')
- data_found_long = (data_found_long << 4) + fromhex (*p++);
- /* Ignore anything after this comma, for future extensions. */
-
- if (addr_we_found < lorange || addr_we_found >= hirange)
- {
- *addr_found = 0;
- return;
- }
-
- *addr_found = addr_we_found;
- *data_found = store_unsigned_integer (data_we_found, len);
- return;
- }
- generic_search (len, data, mask, startaddr, increment, lorange,
- hirange, addr_found, data_found);
-}
-#endif /* 0 */
-
static void
remote_files_info (struct target_ops *ignore)
{
@@ -5113,41 +5104,51 @@ the loaded file\n");
printf_filtered ("No loaded section named '%s'.\n", args);
}
-static int
-remote_query (int query_type, char *buf, char *outbuf, int *bufsiz)
+static LONGEST
+remote_xfer_partial (struct target_ops *ops, enum target_object object,
+ const char *annex, void *readbuf, const void *writebuf,
+ ULONGEST offset, LONGEST len)
{
struct remote_state *rs = get_remote_state ();
int i;
char *buf2 = alloca (rs->remote_packet_size);
char *p2 = &buf2[0];
+ char query_type;
- if (!bufsiz)
- error ("null pointer to remote bufer size specified");
+ /* Only handle reads. */
+ if (writebuf != NULL || readbuf == NULL)
+ return -1;
- /* minimum outbuf size is (rs->remote_packet_size) - if bufsiz is not large enough let
- the caller know and return what the minimum size is */
- /* Note: a zero bufsiz can be used to query the minimum buffer size */
- if (*bufsiz < (rs->remote_packet_size))
+ /* Map pre-existing objects onto letters. DO NOT do this for new
+ objects!!! Instead specify new query packets. */
+ switch (object)
{
- *bufsiz = (rs->remote_packet_size);
+ case TARGET_OBJECT_KOD:
+ query_type = 'K';
+ break;
+ case TARGET_OBJECT_AVR:
+ query_type = 'R';
+ break;
+ default:
return -1;
}
+ /* Note: a zero OFFSET and LEN can be used to query the minimum
+ buffer size. */
+ if (offset == 0 && len == 0)
+ return (rs->remote_packet_size);
+ /* Minimum outbuf size is (rs->remote_packet_size) - if bufsiz is
+ not large enough let the caller. */
+ if (len < (rs->remote_packet_size))
+ return -1;
+ len = rs->remote_packet_size;
+
/* except for querying the minimum buffer size, target must be open */
if (!remote_desc)
error ("remote query is only available after target open");
- /* we only take uppercase letters as query types, at least for now */
- if ((query_type < 'A') || (query_type > 'Z'))
- error ("invalid remote query type");
-
- if (!buf)
- error ("null remote query specified");
-
- if (!outbuf)
- error ("remote query requires a buffer to receive data");
-
- outbuf[0] = '\0';
+ gdb_assert (annex != NULL);
+ gdb_assert (readbuf != NULL);
*p2++ = 'q';
*p2++ = query_type;
@@ -5157,27 +5158,23 @@ remote_query (int query_type, char *buf, char *outbuf, int *bufsiz)
plus one extra in case we are debugging (remote_debug),
we have PBUFZIZ - 7 left to pack the query string */
i = 0;
- while (buf[i] && (i < ((rs->remote_packet_size) - 8)))
+ while (annex[i] && (i < ((rs->remote_packet_size) - 8)))
{
- /* bad caller may have sent forbidden characters */
- if ((!isprint (buf[i])) || (buf[i] == '$') || (buf[i] == '#'))
- error ("illegal characters in query string");
-
- *p2++ = buf[i];
+ /* Bad caller may have sent forbidden characters. */
+ gdb_assert (isprint (annex[i]) && annex[i] != '$' && annex[i] != '#');
+ *p2++ = annex[i];
i++;
}
- *p2 = buf[i];
-
- if (buf[i])
- error ("query larger than available buffer");
+ *p2 = '\0';
+ gdb_assert (annex[i] == '\0');
i = putpkt (buf2);
if (i < 0)
return i;
- getpkt (outbuf, *bufsiz, 0);
+ getpkt (readbuf, len, 0);
- return 0;
+ return strlen (readbuf);
}
static void
@@ -5455,7 +5452,7 @@ Specify the serial device it is connected to\n\
remote_ops.to_pid_to_str = remote_pid_to_str;
remote_ops.to_extra_thread_info = remote_threads_extra_info;
remote_ops.to_stop = remote_stop;
- remote_ops.to_query = remote_query;
+ remote_ops.to_xfer_partial = remote_xfer_partial;
remote_ops.to_rcmd = remote_rcmd;
remote_ops.to_stratum = process_stratum;
remote_ops.to_has_all_memory = 1;
@@ -5975,7 +5972,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
remote_async_ops.to_pid_to_str = remote_pid_to_str;
remote_async_ops.to_extra_thread_info = remote_threads_extra_info;
remote_async_ops.to_stop = remote_stop;
- remote_async_ops.to_query = remote_query;
+ remote_async_ops.to_xfer_partial = remote_xfer_partial;
remote_async_ops.to_rcmd = remote_rcmd;
remote_async_ops.to_stratum = process_stratum;
remote_async_ops.to_has_all_memory = 1;
@@ -6025,6 +6022,7 @@ show_remote_cmd (char *args, int from_tty)
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);
show_remote_protocol_binary_download_cmd (args, from_tty, NULL);
}
@@ -6198,6 +6196,13 @@ in a memory packet.\n",
add_info ("remote-process", remote_info_process,
"Query the remote system for process info.");
+ add_packet_config_cmd (&remote_protocol_vcont,
+ "vCont", "verbose-resume",
+ set_remote_protocol_vcont_packet_cmd,
+ show_remote_protocol_vcont_packet_cmd,
+ &remote_set_cmdlist, &remote_show_cmdlist,
+ 0);
+
add_packet_config_cmd (&remote_protocol_qSymbol,
"qSymbol", "symbol-lookup",
set_remote_protocol_qSymbol_packet_cmd,
diff --git a/gdb/rom68k-rom.c b/gdb/rom68k-rom.c
index af5e023..2ddba0a 100644
--- a/gdb/rom68k-rom.c
+++ b/gdb/rom68k-rom.c
@@ -101,7 +101,7 @@ rom68k_supply_one_register (int regno, unsigned char *hex)
while (is_whitespace (*hex))
hex++;
- store_unsigned_integer (regbuf, REGISTER_RAW_SIZE (regno), value);
+ store_unsigned_integer (regbuf, DEPRECATED_REGISTER_RAW_SIZE (regno), value);
supply_register (regno, regbuf);
return hex;
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index 0c7c122..6f96c17 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -1,7 +1,8 @@
/* IBM RS/6000 native-dependent code for GDB, the GNU debugger.
- Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation,
+ Inc.
This file is part of GDB.
@@ -34,6 +35,7 @@
#include "arch-utils.h"
#include "language.h" /* for local_hex_string(). */
#include "ppc-tdep.h"
+#include "exec.h"
#include <sys/ptrace.h>
#include <sys/reg.h>
@@ -71,7 +73,7 @@
#ifndef ARCH3264
# define ARCH64() 0
#else
-# define ARCH64() (REGISTER_RAW_SIZE (0) == 8)
+# define ARCH64() (DEPRECATED_REGISTER_RAW_SIZE (0) == 8)
#endif
/* Union of 32-bit and 64-bit ".reg" core file sections. */
@@ -127,8 +129,6 @@ typedef union {
extern struct vmap *map_vmap (bfd * bf, bfd * arch);
-extern struct target_ops exec_ops;
-
static void vmap_exec (void);
static void vmap_ldinfo (LdInfo *);
@@ -251,7 +251,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 (REGISTER_RAW_SIZE (regno) == 8)
+ if (DEPRECATED_REGISTER_RAW_SIZE (regno) == 8)
memcpy (addr, &buf, 8);
else
*addr = buf;
@@ -320,7 +320,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 (REGISTER_RAW_SIZE (regno) == 8)
+ if (DEPRECATED_REGISTER_RAW_SIZE (regno) == 8)
memcpy (&buf, addr, 8);
else
buf = *addr;
@@ -1067,7 +1067,7 @@ xcoff_relocate_symtab (unsigned int pid)
void
xcoff_relocate_core (struct target_ops *target)
{
- sec_ptr ldinfo_sec;
+ struct bfd_section *ldinfo_sec;
int offset = 0;
LdInfo *ldi;
struct vmap *vp;
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 0d663b7..b3a322d 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -237,7 +237,7 @@ rs6000_fetch_pointer_argument (struct frame_info *frame, int argi,
struct type *type)
{
CORE_ADDR addr;
- frame_read_register (frame, 3 + argi, &addr);
+ get_frame_register (frame, 3 + argi, &addr);
return addr;
}
@@ -985,7 +985,8 @@ skip_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct rs6000_framedata *fdata)
initializer function as well. */
tmp = find_pc_misc_function (pc);
- if (tmp >= 0 && STREQ (misc_function_vector[tmp].name, main_name ()))
+ if (tmp >= 0
+ && strcmp (misc_function_vector[tmp].name, main_name ()) == 0)
return pc + 8;
}
}
@@ -1154,7 +1155,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 = REGISTER_RAW_SIZE (ii + 3);
+ int reg_size = DEPRECATED_REGISTER_RAW_SIZE (ii + 3);
arg = args[argno];
type = check_typedef (VALUE_TYPE (arg));
@@ -1313,65 +1314,6 @@ ran_out_of_registers_for_arguments:
return sp;
}
-/* Extract a function return value of type TYPE from raw register array
- REGBUF, and copy that return value into VALBUF in virtual format. */
-static void
-e500_extract_return_value (struct type *valtype, struct regcache *regbuf, void *valbuf)
-{
- int offset = 0;
- int vallen = TYPE_LENGTH (valtype);
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- if (TYPE_CODE (valtype) == TYPE_CODE_ARRAY
- && vallen == 8
- && TYPE_VECTOR (valtype))
- {
- regcache_raw_read (regbuf, tdep->ppc_ev0_regnum + 3, valbuf);
- }
- else
- {
- /* Return value is copied starting from r3. Note that r3 for us
- is a pseudo register. */
- int offset = 0;
- int return_regnum = tdep->ppc_gp0_regnum + 3;
- int reg_size = REGISTER_RAW_SIZE (return_regnum);
- int reg_part_size;
- char *val_buffer;
- int copied = 0;
- int i = 0;
-
- /* Compute where we will start storing the value from. */
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- {
- if (vallen <= reg_size)
- offset = reg_size - vallen;
- else
- offset = reg_size + (reg_size - vallen);
- }
-
- /* How big does the local buffer need to be? */
- if (vallen <= reg_size)
- val_buffer = alloca (reg_size);
- else
- val_buffer = alloca (vallen);
-
- /* Read all we need into our private buffer. We copy it in
- chunks that are as long as one register, never shorter, even
- if the value is smaller than the register. */
- while (copied < vallen)
- {
- reg_part_size = REGISTER_RAW_SIZE (return_regnum + i);
- /* It is a pseudo/cooked register. */
- regcache_cooked_read (regbuf, return_regnum + i,
- val_buffer + copied);
- copied += reg_part_size;
- i++;
- }
- /* Put the stuff in the return buffer. */
- memcpy (valbuf, val_buffer + offset, vallen);
- }
-}
-
/* PowerOpen always puts structures in memory. Vectors, which were
added later, do get returned in a register though. */
@@ -1421,8 +1363,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) < REGISTER_RAW_SIZE (3))
- offset = REGISTER_RAW_SIZE (3) - TYPE_LENGTH (valtype);
+ && TYPE_LENGTH (valtype) < DEPRECATED_REGISTER_RAW_SIZE (3))
+ offset = DEPRECATED_REGISTER_RAW_SIZE (3) - TYPE_LENGTH (valtype);
memcpy (valbuf,
regbuf + DEPRECATED_REGISTER_BYTE (3) + offset,
@@ -1628,7 +1570,7 @@ frame_get_saved_regs (struct frame_info *fi, struct rs6000_framedata *fdatap)
struct gdbarch_tdep * tdep = gdbarch_tdep (current_gdbarch);
int wordsize = tdep->wordsize;
- if (get_frame_saved_regs (fi))
+ if (deprecated_get_frame_saved_regs (fi))
return;
if (fdatap == NULL)
@@ -1670,7 +1612,7 @@ frame_get_saved_regs (struct frame_info *fi, struct rs6000_framedata *fdatap)
CORE_ADDR fpr_addr = frame_addr + fdatap->fpr_offset;
for (i = fdatap->saved_fpr; i < 32; i++)
{
- get_frame_saved_regs (fi)[FP0_REGNUM + i] = fpr_addr;
+ deprecated_get_frame_saved_regs (fi)[FP0_REGNUM + i] = fpr_addr;
fpr_addr += 8;
}
}
@@ -1684,7 +1626,7 @@ frame_get_saved_regs (struct frame_info *fi, struct rs6000_framedata *fdatap)
CORE_ADDR gpr_addr = frame_addr + fdatap->gpr_offset;
for (i = fdatap->saved_gpr; i < 32; i++)
{
- get_frame_saved_regs (fi)[tdep->ppc_gp0_regnum + i] = gpr_addr;
+ deprecated_get_frame_saved_regs (fi)[tdep->ppc_gp0_regnum + i] = gpr_addr;
gpr_addr += wordsize;
}
}
@@ -1699,8 +1641,8 @@ frame_get_saved_regs (struct frame_info *fi, struct rs6000_framedata *fdatap)
CORE_ADDR vr_addr = frame_addr + fdatap->vr_offset;
for (i = fdatap->saved_vr; i < 32; i++)
{
- get_frame_saved_regs (fi)[tdep->ppc_vr0_regnum + i] = vr_addr;
- vr_addr += REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
+ deprecated_get_frame_saved_regs (fi)[tdep->ppc_vr0_regnum + i] = vr_addr;
+ vr_addr += DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_vr0_regnum);
}
}
}
@@ -1715,9 +1657,9 @@ frame_get_saved_regs (struct frame_info *fi, struct rs6000_framedata *fdatap)
CORE_ADDR ev_addr = frame_addr + fdatap->ev_offset;
for (i = fdatap->saved_ev; i < 32; i++)
{
- get_frame_saved_regs (fi)[tdep->ppc_ev0_regnum + i] = ev_addr;
- get_frame_saved_regs (fi)[tdep->ppc_gp0_regnum + i] = ev_addr + 4;
- ev_addr += REGISTER_RAW_SIZE (tdep->ppc_ev0_regnum);
+ deprecated_get_frame_saved_regs (fi)[tdep->ppc_ev0_regnum + i] = ev_addr;
+ deprecated_get_frame_saved_regs (fi)[tdep->ppc_gp0_regnum + i] = ev_addr + 4;
+ ev_addr += DEPRECATED_REGISTER_RAW_SIZE (tdep->ppc_ev0_regnum);
}
}
}
@@ -1725,17 +1667,17 @@ frame_get_saved_regs (struct frame_info *fi, struct rs6000_framedata *fdatap)
/* If != 0, fdatap->cr_offset is the offset from the frame that holds
the CR. */
if (fdatap->cr_offset != 0)
- get_frame_saved_regs (fi)[tdep->ppc_cr_regnum] = frame_addr + fdatap->cr_offset;
+ deprecated_get_frame_saved_regs (fi)[tdep->ppc_cr_regnum] = frame_addr + fdatap->cr_offset;
/* If != 0, fdatap->lr_offset is the offset from the frame that holds
the LR. */
if (fdatap->lr_offset != 0)
- get_frame_saved_regs (fi)[tdep->ppc_lr_regnum] = frame_addr + fdatap->lr_offset;
+ deprecated_get_frame_saved_regs (fi)[tdep->ppc_lr_regnum] = frame_addr + fdatap->lr_offset;
/* If != 0, fdatap->vrsave_offset is the offset from the frame that holds
the VRSAVE. */
if (fdatap->vrsave_offset != 0)
- get_frame_saved_regs (fi)[tdep->ppc_vrsave_regnum] = frame_addr + fdatap->vrsave_offset;
+ deprecated_get_frame_saved_regs (fi)[tdep->ppc_vrsave_regnum] = frame_addr + fdatap->vrsave_offset;
}
/* Return the address of a frame. This is the inital %sp value when the frame
@@ -1762,7 +1704,7 @@ frame_initial_stack_address (struct frame_info *fi)
/* If saved registers of this frame are not known yet, read and
cache them. */
- if (!get_frame_saved_regs (fi))
+ if (!deprecated_get_frame_saved_regs (fi))
frame_get_saved_regs (fi, &fdata);
/* If no alloca register used, then fi->frame is the value of the %sp for
@@ -1782,7 +1724,7 @@ frame_initial_stack_address (struct frame_info *fi)
{
get_frame_extra_info (fi)->initial_sp
= extract_unsigned_integer (tmpbuf,
- REGISTER_RAW_SIZE (fdata.alloca_reg));
+ DEPRECATED_REGISTER_RAW_SIZE (fdata.alloca_reg));
}
else
/* NOTE: cagney/2002-04-17: At present the only time
@@ -1932,13 +1874,13 @@ static void
rs6000_register_convert_to_virtual (int n, struct type *type,
char *from, char *to)
{
- if (TYPE_LENGTH (type) != REGISTER_RAW_SIZE (n))
+ if (TYPE_LENGTH (type) != DEPRECATED_REGISTER_RAW_SIZE (n))
{
- double val = deprecated_extract_floating (from, 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, REGISTER_RAW_SIZE (n));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (n));
}
/* Convert data from virtual format with type TYPE in buffer FROM
@@ -1948,13 +1890,13 @@ static void
rs6000_register_convert_to_raw (struct type *type, int n,
const char *from, char *to)
{
- if (TYPE_LENGTH (type) != REGISTER_RAW_SIZE (n))
+ if (TYPE_LENGTH (type) != DEPRECATED_REGISTER_RAW_SIZE (n))
{
double val = deprecated_extract_floating (from, TYPE_LENGTH (type));
- deprecated_store_floating (to, REGISTER_RAW_SIZE (n), val);
+ deprecated_store_floating (to, DEPRECATED_REGISTER_RAW_SIZE (n), val);
}
else
- memcpy (to, from, REGISTER_RAW_SIZE (n));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (n));
}
static void
@@ -2046,30 +1988,6 @@ rs6000_stab_reg_to_regnum (int num)
return regnum;
}
-/* Write into appropriate registers a function return value
- of type TYPE, given in virtual format. */
-static void
-e500_store_return_value (struct type *type, char *valbuf)
-{
- struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
-
- /* Everything is returned in GPR3 and up. */
- int copied = 0;
- int i = 0;
- int len = TYPE_LENGTH (type);
- while (copied < len)
- {
- int regnum = gdbarch_tdep (current_gdbarch)->ppc_gp0_regnum + 3 + i;
- int reg_size = REGISTER_RAW_SIZE (regnum);
- char *reg_val_buf = alloca (reg_size);
-
- memcpy (reg_val_buf, valbuf + copied, reg_size);
- copied += reg_size;
- deprecated_write_register_gen (regnum, reg_val_buf);
- i++;
- }
-}
-
static void
rs6000_store_return_value (struct type *type, char *valbuf)
{
@@ -2137,7 +2055,7 @@ rs6000_create_inferior (int pid)
rs6000_set_host_arch_hook (pid);
}
-/* Support for CONVERT_FROM_FUNC_PTR_ADDR(ADDR).
+/* Support for CONVERT_FROM_FUNC_PTR_ADDR (ARCH, ADDR, TARG).
Usually a function pointer's representation is simply the address
of the function. On the RS/6000 however, a function pointer is
@@ -2157,7 +2075,9 @@ rs6000_create_inferior (int pid)
space and is therefore a special function pointer. */
static CORE_ADDR
-rs6000_convert_from_func_ptr_addr (CORE_ADDR addr)
+rs6000_convert_from_func_ptr_addr (struct gdbarch *gdbarch,
+ CORE_ADDR addr,
+ struct target_ops *targ)
{
struct obj_section *s;
@@ -2830,9 +2750,15 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_pc_regnum (gdbarch, 64);
set_gdbarch_sp_regnum (gdbarch, 1);
set_gdbarch_deprecated_fp_regnum (gdbarch, 1);
- set_gdbarch_deprecated_extract_return_value (gdbarch,
- rs6000_extract_return_value);
- set_gdbarch_deprecated_store_return_value (gdbarch, rs6000_store_return_value);
+ if (sysv_abi && wordsize == 8)
+ set_gdbarch_return_value (gdbarch, ppc64_sysv_abi_return_value);
+ else if (sysv_abi && wordsize == 4)
+ set_gdbarch_return_value (gdbarch, ppc_sysv_abi_return_value);
+ else
+ {
+ set_gdbarch_deprecated_extract_return_value (gdbarch, rs6000_extract_return_value);
+ set_gdbarch_deprecated_store_return_value (gdbarch, rs6000_store_return_value);
+ }
if (v->arch == bfd_arch_powerpc)
switch (v->mach)
@@ -2866,8 +2792,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, e500_dwarf2_reg_to_regnum);
set_gdbarch_pseudo_register_read (gdbarch, e500_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, e500_pseudo_register_write);
- set_gdbarch_extract_return_value (gdbarch, e500_extract_return_value);
- set_gdbarch_deprecated_store_return_value (gdbarch, e500_store_return_value);
break;
default:
tdep->ppc_vr0_regnum = -1;
@@ -2931,8 +2855,11 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* PPC64 SYSV. */
set_gdbarch_frame_red_zone_size (gdbarch, 288);
else if (!sysv_abi && wordsize == 4)
- /* PowerOpen / AIX 32 bit. */
- set_gdbarch_frame_red_zone_size (gdbarch, 220);
+ /* PowerOpen / AIX 32 bit. The saved area or red zone consists of
+ 19 4 byte GPRS + 18 8 byte FPRs giving a total of 220 bytes.
+ Problem is, 220 isn't frame (16 byte) aligned. Round it up to
+ 224. */
+ set_gdbarch_frame_red_zone_size (gdbarch, 224);
set_gdbarch_deprecated_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
@@ -2949,6 +2876,8 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
revisited. */
if (sysv_abi && wordsize == 4)
set_gdbarch_push_dummy_call (gdbarch, ppc_sysv_abi_push_dummy_call);
+ else if (sysv_abi && wordsize == 8)
+ set_gdbarch_push_dummy_call (gdbarch, ppc64_sysv_abi_push_dummy_call);
else
set_gdbarch_push_dummy_call (gdbarch, rs6000_push_dummy_call);
@@ -2961,13 +2890,19 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_function_start_offset (gdbarch, 0);
set_gdbarch_breakpoint_from_pc (gdbarch, rs6000_breakpoint_from_pc);
+ /* Handle the 64-bit SVR4 minimal-symbol convention of using "FN"
+ for the descriptor and ".FN" for the entry-point -- a user
+ specifying "break FN" will unexpectedly end up with a breakpoint
+ on the descriptor and not the function. This architecture method
+ transforms any breakpoints on descriptors into breakpoints on the
+ corresponding entry point. */
+ if (sysv_abi && wordsize == 8)
+ set_gdbarch_adjust_breakpoint_address (gdbarch, ppc64_sysv_abi_adjust_breakpoint_address);
+
/* Not sure on this. FIXMEmgo */
set_gdbarch_frame_args_skip (gdbarch, 8);
- if (sysv_abi)
- set_gdbarch_use_struct_convention (gdbarch,
- ppc_sysv_abi_use_struct_convention);
- else
+ if (!sysv_abi)
set_gdbarch_use_struct_convention (gdbarch,
rs6000_use_struct_convention);
@@ -2996,6 +2931,16 @@ rs6000_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);
+ if (from_xcoff_exec)
+ {
+ /* NOTE: jimix/2003-06-09: This test should really check for
+ GDB_OSABI_AIX when that is defined and becomes
+ available. (Actually, once things are properly split apart,
+ the test goes away.) */
+ /* RS6000/AIX does not support PT_STEP. Has to be simulated. */
+ set_gdbarch_software_single_step (gdbarch, rs6000_software_single_step);
+ }
+
return gdbarch;
}
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index ee6574d..eb4a62e 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -901,7 +901,7 @@ s390_get_signal_frame_info (struct frame_info *fi)
&& get_frame_extra_info (next_frame)->sigcontext)
{
/* We're definitely backtracing from a signal handler. */
- CORE_ADDR *saved_regs = get_frame_saved_regs (fi);
+ CORE_ADDR *saved_regs = deprecated_get_frame_saved_regs (fi);
CORE_ADDR save_reg_addr = (get_frame_extra_info (next_frame)->sigcontext
+ DEPRECATED_REGISTER_BYTE (S390_GP0_REGNUM));
int reg;
@@ -1428,12 +1428,12 @@ s390_get_frame_info (CORE_ADDR start_pc,
- the analysis gave us enough information to actually figure it
out. */
if (fi
- && get_frame_saved_regs (fi)
+ && deprecated_get_frame_saved_regs (fi)
&& original_sp != -1)
{
int slot_num;
CORE_ADDR slot_addr;
- CORE_ADDR *saved_regs = get_frame_saved_regs (fi);
+ CORE_ADDR *saved_regs = deprecated_get_frame_saved_regs (fi);
/* Scan the spill array; if a spill slot says it holds the
original value of some register, then record that slot's
@@ -1719,7 +1719,7 @@ s390_frame_init_saved_regs (struct frame_info *fi)
int quick;
- if (get_frame_saved_regs (fi) == NULL)
+ if (deprecated_get_frame_saved_regs (fi) == NULL)
{
/* zalloc memsets the saved regs */
frame_saved_regs_zalloc (fi);
@@ -1754,10 +1754,10 @@ s390_frame_saved_pc_nofix (struct frame_info *fi)
{
get_frame_extra_info (fi)->saved_pc_valid = 1;
if (get_frame_extra_info (fi)->good_prologue
- && get_frame_saved_regs (fi)[S390_RETADDR_REGNUM])
+ && deprecated_get_frame_saved_regs (fi)[S390_RETADDR_REGNUM])
get_frame_extra_info (fi)->saved_pc
= ADDR_BITS_REMOVE (read_memory_integer
- (get_frame_saved_regs (fi)[S390_RETADDR_REGNUM],
+ (deprecated_get_frame_saved_regs (fi)[S390_RETADDR_REGNUM],
S390_GPR_SIZE));
else
get_frame_extra_info (fi)->saved_pc
@@ -1841,24 +1841,24 @@ s390_frame_chain (struct frame_info *thisframe)
}
else
{
- if (get_frame_saved_regs (thisframe))
+ if (deprecated_get_frame_saved_regs (thisframe))
{
int regno;
if (prev_fextra_info.frame_pointer_saved_pc
- && get_frame_saved_regs (thisframe)[S390_FRAME_REGNUM])
+ && deprecated_get_frame_saved_regs (thisframe)[S390_FRAME_REGNUM])
regno = S390_FRAME_REGNUM;
else
regno = S390_SP_REGNUM;
- if (get_frame_saved_regs (thisframe)[regno])
+ if (deprecated_get_frame_saved_regs (thisframe)[regno])
{
/* The SP's entry of `saved_regs' is special. */
if (regno == S390_SP_REGNUM)
- prev_fp = get_frame_saved_regs (thisframe)[regno];
+ prev_fp = deprecated_get_frame_saved_regs (thisframe)[regno];
else
prev_fp =
- read_memory_integer (get_frame_saved_regs (thisframe)[regno],
+ read_memory_integer (deprecated_get_frame_saved_regs (thisframe)[regno],
S390_GPR_SIZE);
}
}
@@ -1874,6 +1874,15 @@ s390_frame_chain (struct frame_info *thisframe)
+/* NOTE: cagney/2003-10-31: "return_value" makes
+ "extract_struct_value_address", "extract_return_value", and
+ "use_struct_convention" redundant. */
+static CORE_ADDR
+s390_cannot_extract_struct_value_address (struct regcache *regcache)
+{
+ return 0;
+}
+
/* a given return value in `regbuf' with a type `valtype', extract and copy its
value into `valbuf' */
static void
@@ -1992,22 +2001,22 @@ s390_pop_frame_regular (struct frame_info *frame)
write_register (S390_PC_REGNUM, DEPRECATED_FRAME_SAVED_PC (frame));
/* Restore any saved registers. */
- if (get_frame_saved_regs (frame))
+ if (deprecated_get_frame_saved_regs (frame))
{
for (regnum = 0; regnum < NUM_REGS; regnum++)
- if (get_frame_saved_regs (frame)[regnum] != 0)
+ if (deprecated_get_frame_saved_regs (frame)[regnum] != 0)
{
ULONGEST value;
- value = read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
- REGISTER_RAW_SIZE (regnum));
+ value = read_memory_unsigned_integer (deprecated_get_frame_saved_regs (frame)[regnum],
+ DEPRECATED_REGISTER_RAW_SIZE (regnum));
write_register (regnum, value);
}
/* Actually cut back the stack. Remember that the SP's element of
saved_regs is the old SP itself, not the address at which it is
saved. */
- write_register (S390_SP_REGNUM, get_frame_saved_regs (frame)[S390_SP_REGNUM]);
+ write_register (S390_SP_REGNUM, deprecated_get_frame_saved_regs (frame)[S390_SP_REGNUM]);
}
/* Throw away any cached frame information. */
@@ -2206,28 +2215,6 @@ extend_simple_arg (struct value *arg)
}
-/* Round ADDR up to the next N-byte boundary. N must be a power of
- two. */
-static CORE_ADDR
-round_up (CORE_ADDR addr, int n)
-{
- /* Check that N is really a power of two. */
- gdb_assert (n && (n & (n-1)) == 0);
- return ((addr + n - 1) & -n);
-}
-
-
-/* Round ADDR down to the next N-byte boundary. N must be a power of
- two. */
-static CORE_ADDR
-round_down (CORE_ADDR addr, int n)
-{
- /* Check that N is really a power of two. */
- gdb_assert (n && (n & (n-1)) == 0);
- return (addr & -n);
-}
-
-
/* Return the alignment required by TYPE. */
static int
alignment_of (struct type *type)
@@ -2304,7 +2291,7 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
&& pass_by_copy_ref (type))
{
sp -= length;
- sp = round_down (sp, alignment_of (type));
+ sp = align_down (sp, alignment_of (type));
write_memory (sp, VALUE_CONTENTS (arg), length);
copy_addr[i] = sp;
num_copies++;
@@ -2323,7 +2310,7 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
struct type *type = VALUE_TYPE (arg);
int length = TYPE_LENGTH (type);
- sp = round_down (sp, alignment_of (type));
+ sp = align_down (sp, alignment_of (type));
/* SIMPLE_ARG values get extended to DEPRECATED_REGISTER_SIZE bytes.
Assume every argument is. */
@@ -2333,12 +2320,12 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
}
/* Include space for any reference-to-copy pointers. */
- sp = round_down (sp, pointer_size);
+ sp = align_down (sp, pointer_size);
sp -= num_copies * pointer_size;
/* After all that, make sure it's still aligned on an eight-byte
boundary. */
- sp = round_down (sp, 8);
+ sp = align_down (sp, 8);
/* Finally, place the actual parameters, working from SP towards
higher addresses. The code above is supposed to reserve enough
@@ -2403,7 +2390,7 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
{
/* Simple args are always extended to
DEPRECATED_REGISTER_SIZE bytes. */
- starg = round_up (starg, DEPRECATED_REGISTER_SIZE);
+ starg = align_up (starg, DEPRECATED_REGISTER_SIZE);
/* Do we need to pass a pointer to our copy of this
argument? */
@@ -2420,10 +2407,10 @@ s390_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
else
{
/* You'd think we should say:
- starg = round_up (starg, alignment_of (type));
+ starg = align_up (starg, alignment_of (type));
Unfortunately, GCC seems to simply align the stack on
a four/eight-byte boundary, even when passing doubles. */
- starg = round_up (starg, S390_STACK_PARAMETER_ALIGNMENT);
+ starg = align_up (starg, S390_STACK_PARAMETER_ALIGNMENT);
write_memory (starg, VALUE_CONTENTS (arg), length);
starg += length;
}
@@ -2592,7 +2579,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* NOTE: cagney/2002-12-06: This can be deleted when this arch is
ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
+ set_gdbarch_deprecated_init_frame_pc (gdbarch, deprecated_init_frame_pc_default);
set_gdbarch_believe_pcc_promotion (gdbarch, 0);
set_gdbarch_char_signed (gdbarch, 0);
@@ -2644,8 +2631,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_stab_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
set_gdbarch_dwarf_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, s390_stab_reg_to_regnum);
- set_gdbarch_deprecated_extract_struct_value_address
- (gdbarch, generic_cannot_extract_struct_value_address);
+ set_gdbarch_extract_struct_value_address (gdbarch, s390_cannot_extract_struct_value_address);
/* Parameters for inferior function calls. */
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c
index 83d88cc..7e2ad8f 100644
--- a/gdb/scm-lang.c
+++ b/gdb/scm-lang.c
@@ -233,6 +233,15 @@ nosideret:
return value_from_longest (builtin_type_long, (LONGEST) 1);
}
+const struct exp_descriptor exp_descriptor_scm =
+{
+ print_subexp_standard,
+ operator_length_standard,
+ op_name_standard,
+ dump_subexp_body_standard,
+ evaluate_subexp_scm
+};
+
const struct language_defn scm_language_defn =
{
"scheme", /* Language name */
@@ -241,9 +250,9 @@ const struct language_defn scm_language_defn =
range_check_off,
type_check_off,
case_sensitive_off,
+ &exp_descriptor_scm,
scm_parse,
c_error,
- evaluate_subexp_scm,
scm_printchar, /* Print a character constant */
scm_printstr, /* Function to print string constant */
NULL, /* Function to print a single character */
@@ -263,6 +272,7 @@ const struct language_defn scm_language_defn =
1, /* c-style arrays */
0, /* String lower bound */
&builtin_type_char, /* Type of string elements */
+ default_word_break_characters,
LANG_MAGIC
};
diff --git a/gdb/ser-e7kpc.c b/gdb/ser-e7kpc.c
index 8496ae4..1efe142 100644
--- a/gdb/ser-e7kpc.c
+++ b/gdb/ser-e7kpc.c
@@ -1,4 +1,4 @@
-/* Remote serial interface using Hitachi E7000 PC ISA card in a PC
+/* Remote serial interface using Renesas E7000 PC ISA card in a PC
Copyright 1994, 1996, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
diff --git a/gdb/sh-stub.c b/gdb/sh-stub.c
index 73357b4..bdd9e50 100644
--- a/gdb/sh-stub.c
+++ b/gdb/sh-stub.c
@@ -1,4 +1,4 @@
-/* sh-stub.c -- debugging stub for the Hitachi-SH.
+/* sh-stub.c -- debugging stub for the Renesas-SH.
NOTE!! This code has to be compiled with optimization, otherwise the
function inlining which generates the exception handlers won't work.
@@ -147,7 +147,7 @@
#include <string.h>
#include <setjmp.h>
-/* Hitachi SH architecture instruction encoding masks */
+/* Renesas SH architecture instruction encoding masks */
#define COND_BR_MASK 0xff00
#define UCOND_DBR_MASK 0xe000
@@ -158,7 +158,7 @@
#define UCOND_DISP 0x0fff
#define UCOND_REG 0x0f00
-/* Hitachi SH instruction opcodes */
+/* Renesas SH instruction opcodes */
#define BF_INSTR 0x8b00
#define BT_INSTR 0x8900
@@ -171,7 +171,7 @@
#define TRAPA_INSTR 0xc300
#define SSTEP_INSTR 0xc3ff
-/* Hitachi SH processor register masks */
+/* Renesas SH processor register masks */
#define T_BIT_MASK 0x0001
@@ -824,7 +824,7 @@ breakpoint (void)
/* Note:
- The Hitachi SH family uses two exception architectures:
+ The Renesas SH family uses two exception architectures:
SH1 & SH2:
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 529c187..a14c0d9 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1,4 +1,4 @@
-/* Target-dependent code for Hitachi Super-H, for GDB.
+/* Target-dependent code for Renesas Super-H, for GDB.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
@@ -26,6 +26,9 @@
#include "defs.h"
#include "frame.h"
+#include "frame-base.h"
+#include "frame-unwind.h"
+#include "dwarf2-frame.h"
#include "symtab.h"
#include "symfile.h"
#include "gdbtypes.h"
@@ -35,6 +38,7 @@
#include "dis-asm.h"
#include "inferior.h"
#include "gdb_string.h"
+#include "gdb_assert.h"
#include "arch-utils.h"
#include "floatformat.h"
#include "regcache.h"
@@ -55,29 +59,32 @@ static void (*sh_show_regs) (void);
#define SH_NUM_REGS 59
-/* Define other aspects of the stack frame.
- we keep a copy of the worked out return pc lying around, since it
- is a useful bit of info */
-
-struct frame_extra_info
+struct sh_frame_cache
{
- CORE_ADDR return_pc;
- int leaf_function;
- int f_offset;
+ /* Base address. */
+ CORE_ADDR base;
+ LONGEST sp_offset;
+ CORE_ADDR pc;
+
+ /* Flag showing that a frame has been created in the prologue code. */
+ int uses_fp;
+
+ /* Saved registers. */
+ CORE_ADDR saved_regs[SH_NUM_REGS];
+ CORE_ADDR saved_sp;
};
static const char *
sh_generic_register_name (int reg_nr)
{
- static char *register_names[] =
- {
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
- "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
+ static char *register_names[] = {
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
"fpul", "fpscr",
- "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
- "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
- "ssr", "spc",
+ "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
+ "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
+ "ssr", "spc",
"r0b0", "r1b0", "r2b0", "r3b0", "r4b0", "r5b0", "r6b0", "r7b0",
"r0b1", "r1b1", "r2b1", "r3b1", "r4b1", "r5b1", "r6b1", "r7b1",
};
@@ -91,17 +98,16 @@ sh_generic_register_name (int reg_nr)
static const char *
sh_sh_register_name (int reg_nr)
{
- static char *register_names[] =
- {
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
- "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
- "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
+ static char *register_names[] = {
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
+ "", "",
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ "", "",
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
};
if (reg_nr < 0)
return NULL;
@@ -113,15 +119,14 @@ sh_sh_register_name (int reg_nr)
static const char *
sh_sh3_register_name (int reg_nr)
{
- static char *register_names[] =
- {
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
- "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
- "", "",
- "", "", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
- "ssr", "spc",
+ static char *register_names[] = {
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
+ "", "",
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ "ssr", "spc",
"r0b0", "r1b0", "r2b0", "r3b0", "r4b0", "r5b0", "r6b0", "r7b0",
"r0b1", "r1b1", "r2b1", "r3b1", "r4b1", "r5b1", "r6b1", "r7b1"
};
@@ -135,15 +140,14 @@ sh_sh3_register_name (int reg_nr)
static const char *
sh_sh3e_register_name (int reg_nr)
{
- static char *register_names[] =
- {
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
- "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
+ static char *register_names[] = {
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
"fpul", "fpscr",
- "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
- "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
- "ssr", "spc",
+ "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
+ "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
+ "ssr", "spc",
"r0b0", "r1b0", "r2b0", "r3b0", "r4b0", "r5b0", "r6b0", "r7b0",
"r0b1", "r1b1", "r2b1", "r3b1", "r4b1", "r5b1", "r6b1", "r7b1",
};
@@ -157,15 +161,14 @@ sh_sh3e_register_name (int reg_nr)
static const char *
sh_sh2e_register_name (int reg_nr)
{
- static char *register_names[] =
- {
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
- "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
+ static char *register_names[] = {
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
"fpul", "fpscr",
- "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
- "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
- "", "",
+ "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
+ "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
+ "", "",
"", "", "", "", "", "", "", "",
"", "", "", "", "", "", "", "",
};
@@ -179,17 +182,16 @@ sh_sh2e_register_name (int reg_nr)
static const char *
sh_sh_dsp_register_name (int reg_nr)
{
- static char *register_names[] =
- {
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
- "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
- "", "dsr",
- "a0g", "a0", "a1g", "a1", "m0", "m1", "x0", "x1",
- "y0", "y1", "", "", "", "", "", "mod",
- "", "",
- "rs", "re", "", "", "", "", "", "",
- "", "", "", "", "", "", "", "",
+ static char *register_names[] = {
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
+ "", "dsr",
+ "a0g", "a0", "a1g", "a1", "m0", "m1", "x0", "x1",
+ "y0", "y1", "", "", "", "", "", "mod",
+ "", "",
+ "rs", "re", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
};
if (reg_nr < 0)
return NULL;
@@ -201,18 +203,17 @@ sh_sh_dsp_register_name (int reg_nr)
static const char *
sh_sh3_dsp_register_name (int reg_nr)
{
- static char *register_names[] =
- {
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
- "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
- "", "dsr",
- "a0g", "a0", "a1g", "a1", "m0", "m1", "x0", "x1",
- "y0", "y1", "", "", "", "", "", "mod",
- "ssr", "spc",
- "rs", "re", "", "", "", "", "", "",
- "r0b", "r1b", "r2b", "r3b", "r4b", "r5b", "r6b", "r7b"
- "", "", "", "", "", "", "", "",
+ static char *register_names[] = {
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
+ "", "dsr",
+ "a0g", "a0", "a1g", "a1", "m0", "m1", "x0", "x1",
+ "y0", "y1", "", "", "", "", "", "mod",
+ "ssr", "spc",
+ "rs", "re", "", "", "", "", "", "",
+ "r0b", "r1b", "r2b", "r3b", "r4b", "r5b", "r6b", "r7b"
+ "", "", "", "", "", "", "", "",
};
if (reg_nr < 0)
return NULL;
@@ -224,28 +225,27 @@ sh_sh3_dsp_register_name (int reg_nr)
static const char *
sh_sh4_register_name (int reg_nr)
{
- static char *register_names[] =
- {
+ static char *register_names[] = {
/* general registers 0-15 */
- "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
- "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
/* 16 - 22 */
- "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
+ "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
/* 23, 24 */
"fpul", "fpscr",
/* floating point registers 25 - 40 */
- "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
- "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
+ "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
+ "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
/* 41, 42 */
- "ssr", "spc",
+ "ssr", "spc",
/* bank 0 43 - 50 */
"r0b0", "r1b0", "r2b0", "r3b0", "r4b0", "r5b0", "r6b0", "r7b0",
/* bank 1 51 - 58 */
"r0b1", "r1b1", "r2b1", "r3b1", "r4b1", "r5b1", "r6b1", "r7b1",
/* double precision (pseudo) 59 - 66 */
- "dr0", "dr2", "dr4", "dr6", "dr8", "dr10", "dr12", "dr14",
+ "dr0", "dr2", "dr4", "dr6", "dr8", "dr10", "dr12", "dr14",
/* vectors (pseudo) 67 - 70 */
- "fv0", "fv4", "fv8", "fv12",
+ "fv0", "fv4", "fv8", "fv12",
/* FIXME: missing XF 71 - 86 */
/* FIXME: missing XD 87 - 94 */
};
@@ -256,56 +256,83 @@ sh_sh4_register_name (int reg_nr)
return register_names[reg_nr];
}
+static const char *
+sh_sh4_nofpu_register_name (int reg_nr)
+{
+ static char *register_names[] = {
+ /* general registers 0-15 */
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ /* 16 - 22 */
+ "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
+ /* 23, 24 */
+ "", "",
+ /* floating point registers 25 - 40 -- not for nofpu target */
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ /* 41, 42 */
+ "ssr", "spc",
+ /* bank 0 43 - 50 */
+ "r0b0", "r1b0", "r2b0", "r3b0", "r4b0", "r5b0", "r6b0", "r7b0",
+ /* bank 1 51 - 58 */
+ "r0b1", "r1b1", "r2b1", "r3b1", "r4b1", "r5b1", "r6b1", "r7b1",
+ /* double precision (pseudo) 59 - 66 -- not for nofpu target */
+ "", "", "", "", "", "", "", "",
+ /* vectors (pseudo) 67 - 70 -- not for nofpu target */
+ "", "", "", "",
+ };
+ if (reg_nr < 0)
+ return NULL;
+ if (reg_nr >= (sizeof (register_names) / sizeof (*register_names)))
+ return NULL;
+ return register_names[reg_nr];
+}
+
+static const char *
+sh_sh4al_dsp_register_name (int reg_nr)
+{
+ static char *register_names[] = {
+ "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
+ "pc", "pr", "gbr", "vbr", "mach", "macl", "sr",
+ "", "dsr",
+ "a0g", "a0", "a1g", "a1", "m0", "m1", "x0", "x1",
+ "y0", "y1", "", "", "", "", "", "mod",
+ "ssr", "spc",
+ "rs", "re", "", "", "", "", "", "",
+ "r0b", "r1b", "r2b", "r3b", "r4b", "r5b", "r6b", "r7b"
+ "", "", "", "", "", "", "", "",
+ };
+ if (reg_nr < 0)
+ return NULL;
+ if (reg_nr >= (sizeof (register_names) / sizeof (*register_names)))
+ return NULL;
+ return register_names[reg_nr];
+}
+
static const unsigned char *
sh_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
{
/* 0xc3c3 is trapa #c3, and it works in big and little endian modes */
- static unsigned char breakpoint[] = {0xc3, 0xc3};
-
+ static unsigned char breakpoint[] = { 0xc3, 0xc3 };
+
*lenptr = sizeof (breakpoint);
return breakpoint;
}
-static CORE_ADDR
-sh_push_dummy_code (struct gdbarch *gdbarch,
- CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc,
- struct value **args, int nargs,
- struct type *value_type,
- CORE_ADDR *real_pc, CORE_ADDR *bp_addr)
-{
- /* Allocate space sufficient for a breakpoint. */
- sp = (sp - 2) & ~1;
- /* Store the address of that breakpoint */
- *bp_addr = sp;
- /* sh always starts the call at the callee's entry point. */
- *real_pc = funaddr;
- return sp;
-}
-
/* Prologue looks like
- [mov.l <regs>,@-r15]...
- [sts.l pr,@-r15]
- [mov.l r14,@-r15]
- [mov r15,r14]
-
- Actually it can be more complicated than this. For instance, with
- newer gcc's:
-
- mov.l r14,@-r15
- add #-12,r15
- mov r15,r14
- mov r4,r1
- mov r5,r2
- mov.l r6,@(4,r14)
- mov.l r7,@(8,r14)
- mov.b r1,@r14
- mov r14,r1
- mov r14,r1
- add #2,r1
- mov.w r2,@r1
+ mov.l r14,@-r15
+ sts.l pr,@-r15
+ mov.l <regs>,@-r15
+ sub <room_for_loca_vars>,r15
+ mov r15,r14
+ Actually it can be more complicated than this but that's it, basically.
*/
+#define GET_SOURCE_REG(x) (((x) >> 4) & 0xf)
+#define GET_TARGET_REG(x) (((x) >> 8) & 0xf)
+
/* STS.L PR,@-r15 0100111100100010
r15-4-->r15, PR-->(r15) */
#define IS_STS(x) ((x) == 0x4f22)
@@ -314,15 +341,13 @@ sh_push_dummy_code (struct gdbarch *gdbarch,
r15-4-->r15, Rm-->(R15) */
#define IS_PUSH(x) (((x) & 0xff0f) == 0x2f06)
-#define GET_PUSHED_REG(x) (((x) >> 4) & 0xf)
-
/* MOV r15,r14 0110111011110011
r15-->r14 */
#define IS_MOV_SP_FP(x) ((x) == 0x6ef3)
/* ADD #imm,r15 01111111iiiiiiii
r15+imm-->r15 */
-#define IS_ADD_IMM_SP(x) (((x) & 0xff00) == 0x7f00)
+#define IS_ADD_IMM_SP(x) (((x) & 0xff00) == 0x7f00)
#define IS_MOV_R3(x) (((x) & 0xff00) == 0x1a00)
#define IS_SHLL_R3(x) ((x) == 0x4300)
@@ -336,259 +361,78 @@ sh_push_dummy_code (struct gdbarch *gdbarch,
FMOV XDm,@-Rn Rn-8-->Rn, XDm-->(Rn) 1111nnnnmmm11011 */
/* CV, 2003-08-28: Only suitable with Rn == SP, therefore name changed to
make this entirely clear. */
-#define IS_FPUSH(x) (((x) & 0xf00f) == 0xf00b)
-
-/* MOV Rm,Rn Rm-->Rn 0110nnnnmmmm0011
- MOV.L Rm,@(disp,Rn) Rm-->(dispx4+Rn) 0001nnnnmmmmdddd
- MOV.L Rm,@Rn Rm-->(Rn) 0010nnnnmmmm0010
- where Rm is one of r4,r5,r6,r7 which are the argument registers. */
-#define IS_ARG_MOV(x) \
-(((((x) & 0xf00f) == 0x6003) && (((x) & 0x00f0) >= 0x0040 && ((x) & 0x00f0) <= 0x0070)) \
- || ((((x) & 0xf000) == 0x1000) && (((x) & 0x00f0) >= 0x0040 && ((x) & 0x00f0) <= 0x0070)) \
- || ((((x) & 0xf00f) == 0x2002) && (((x) & 0x00f0) >= 0x0040 && ((x) & 0x00f0) <= 0x0070)))
-
-/* MOV.L Rm,@(disp,r14) 00011110mmmmdddd
- Rm-->(dispx4+r14) where Rm is one of r4,r5,r6,r7 */
-#define IS_MOV_TO_R14(x) \
- ((((x) & 0xff00) == 0x1e) && (((x) & 0x00f0) >= 0x0040 && ((x) & 0x00f0) <= 0x0070))
-
-#define FPSCR_SZ (1 << 20)
-
-/* Skip any prologue before the guts of a function */
-
-/* Skip the prologue using the debug information. If this fails we'll
- fall back on the 'guess' method below. */
-static CORE_ADDR
-after_prologue (CORE_ADDR pc)
-{
- struct symtab_and_line sal;
- CORE_ADDR func_addr, func_end;
+/* #define IS_FMOV(x) (((x) & 0xf00f) == 0xf00b) */
+#define IS_FPUSH(x) (((x) & 0xff0f) == 0xff0b)
+
+/* MOV Rm,Rn Rm-->Rn 0110nnnnmmmm0011 4 <= m <= 7 */
+#define IS_MOV_ARG_TO_REG(x) \
+ (((x) & 0xf00f) == 0x6003 && \
+ ((x) & 0x00f0) >= 0x0040 && \
+ ((x) & 0x00f0) <= 0x0070)
+/* MOV.L Rm,@Rn 0010nnnnmmmm0010 n = 14, 4 <= m <= 7 */
+#define IS_MOV_ARG_TO_IND_R14(x) \
+ (((x) & 0xff0f) == 0x2e02 && \
+ ((x) & 0x00f0) >= 0x0040 && \
+ ((x) & 0x00f0) <= 0x0070)
+/* MOV.L Rm,@(disp*4,Rn) 00011110mmmmdddd n = 14, 4 <= m <= 7 */
+#define IS_MOV_ARG_TO_IND_R14_WITH_DISP(x) \
+ (((x) & 0xff00) == 0x1e00 && \
+ ((x) & 0x00f0) >= 0x0040 && \
+ ((x) & 0x00f0) <= 0x0070)
+
+/* MOV.W @(disp*2,PC),Rn 1001nnnndddddddd */
+#define IS_MOVW_PCREL_TO_REG(x) (((x) & 0xf000) == 0x9000)
+/* MOV.L @(disp*4,PC),Rn 1101nnnndddddddd */
+#define IS_MOVL_PCREL_TO_REG(x) (((x) & 0xf000) == 0xd000)
+/* SUB Rn,R15 00111111nnnn1000 */
+#define IS_SUB_REG_FROM_SP(x) (((x) & 0xff0f) == 0x3f08)
- /* If we can not find the symbol in the partial symbol table, then
- there is no hope we can determine the function's start address
- with this code. */
- if (!find_pc_partial_function (pc, NULL, &func_addr, &func_end))
- return 0;
-
- /* Get the line associated with FUNC_ADDR. */
- sal = find_pc_line (func_addr, 0);
-
- /* There are only two cases to consider. First, the end of the source line
- is within the function bounds. In that case we return the end of the
- source line. Second is the end of the source line extends beyond the
- bounds of the current function. We need to use the slow code to
- examine instructions in that case. */
- if (sal.end < func_end)
- return sal.end;
- else
- return 0;
-}
-
-/* Here we look at each instruction in the function, and try to guess
- where the prologue ends. Unfortunately this is not always
- accurate. */
-static CORE_ADDR
-sh_skip_prologue_hard_way (CORE_ADDR start_pc)
-{
- CORE_ADDR here, end;
- int updated_fp = 0;
-
- if (!start_pc)
- return 0;
-
- for (here = start_pc, end = start_pc + (2 * 28); here < end;)
- {
- int w = read_memory_integer (here, 2);
- here += 2;
- if (IS_FPUSH (w) || IS_PUSH (w) || IS_STS (w) || IS_MOV_R3 (w)
- || IS_ADD_R3SP (w) || IS_ADD_IMM_SP (w) || IS_SHLL_R3 (w)
- || IS_ARG_MOV (w) || IS_MOV_TO_R14 (w))
- {
- start_pc = here;
- }
- else if (IS_MOV_SP_FP (w))
- {
- start_pc = here;
- updated_fp = 1;
- }
- else
- /* Don't bail out yet, if we are before the copy of sp. */
- if (updated_fp)
- break;
- }
-
- return start_pc;
-}
-
-static CORE_ADDR
-sh_skip_prologue (CORE_ADDR pc)
-{
- CORE_ADDR post_prologue_pc;
-
- /* See if we can determine the end of the prologue via the symbol table.
- If so, then return either PC, or the PC after the prologue, whichever
- is greater. */
- post_prologue_pc = after_prologue (pc);
-
- /* If after_prologue returned a useful address, then use it. Else
- fall back on the instruction skipping code. */
- if (post_prologue_pc != 0)
- return max (pc, post_prologue_pc);
- else
- return sh_skip_prologue_hard_way (pc);
-}
-
-/* Immediately after a function call, return the saved pc.
- Can't always go through the frames for this because on some machines
- the new frame is not set up until the new function executes
- some instructions.
-
- The return address is the value saved in the PR register + 4 */
-static CORE_ADDR
-sh_saved_pc_after_call (struct frame_info *frame)
-{
- return (ADDR_BITS_REMOVE (read_register (PR_REGNUM)));
-}
+#define FPSCR_SZ (1 << 20)
-/* Should call_function allocate stack space for a struct return? */
-static int
-sh_use_struct_convention (int gcc_p, struct type *type)
-{
-#if 0
- return (TYPE_LENGTH (type) > 1);
-#else
- int len = TYPE_LENGTH (type);
- int nelem = TYPE_NFIELDS (type);
- return ((len != 1 && len != 2 && len != 4 && len != 8) || nelem != 1) &&
- (len != 8 || TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)) != 4);
-#endif
-}
+/* The following instructions are used for epilogue testing. */
+#define IS_RESTORE_FP(x) ((x) == 0x6ef6)
+#define IS_RTS(x) ((x) == 0x000b)
+#define IS_LDS(x) ((x) == 0x4f26)
+#define IS_MOV_FP_SP(x) ((x) == 0x6fe3)
+#define IS_ADD_REG_TO_FP(x) (((x) & 0xff0f) == 0x3e0c)
+#define IS_ADD_IMM_FP(x) (((x) & 0xff00) == 0x7e00)
/* Disassemble an instruction. */
static int
-gdb_print_insn_sh (bfd_vma memaddr, disassemble_info *info)
+gdb_print_insn_sh (bfd_vma memaddr, disassemble_info * info)
{
info->endian = TARGET_BYTE_ORDER;
return print_insn_sh (memaddr, info);
}
-/* Given a GDB frame, determine the address of the calling function's
- frame. This will be used to create a new GDB frame struct, and
- then DEPRECATED_INIT_EXTRA_FRAME_INFO and DEPRECATED_INIT_FRAME_PC
- will be called for the new frame.
-
- For us, the frame address is its stack pointer value, so we look up
- the function prologue to determine the caller's sp value, and return it. */
-static CORE_ADDR
-sh_frame_chain (struct frame_info *frame)
-{
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
- get_frame_base (frame),
- get_frame_base (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)))
- return read_memory_integer (get_frame_base (frame)
- + get_frame_extra_info (frame)->f_offset, 4);
- else
- return 0;
-}
-
-/* Find REGNUM on the stack. Otherwise, it's in an active register. One thing
- we might want to do here is to check REGNUM against the clobber mask, and
- somehow flag it as invalid if it isn't saved on the stack somewhere. This
- would provide a graceful failure mode when trying to get the value of
- caller-saves registers for an inner frame. */
static CORE_ADDR
-sh_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)))
- /* 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. */
- return deprecated_read_register_dummy (get_frame_pc (fi),
- get_frame_base (fi), regnum);
- else
- {
- DEPRECATED_FRAME_INIT_SAVED_REGS (fi);
- if (!get_frame_pc (fi))
- return 0;
- if (get_frame_saved_regs (fi)[regnum] != 0)
- return read_memory_integer (get_frame_saved_regs (fi)[regnum],
- register_size (current_gdbarch, regnum));
- }
- return read_register (regnum);
-}
-
-/* Put here the code to store, into a struct frame_saved_regs, the
- addresses of the saved registers of frame described by FRAME_INFO.
- This includes special registers such as pc and fp saved in special
- ways in the stack frame. sp is even more special: the address we
- return for it IS the sp for the next frame. */
-static void
-sh_nofp_frame_init_saved_regs (struct frame_info *fi)
-{
- int *where = (int *) alloca ((NUM_REGS + NUM_PSEUDO_REGS) * sizeof(int));
- int rn;
- int have_fp = 0;
- int depth;
- int pc;
- int opc;
- int inst;
+sh_analyze_prologue (CORE_ADDR pc, CORE_ADDR current_pc,
+ struct sh_frame_cache *cache)
+{
+ ULONGEST inst;
+ CORE_ADDR opc;
+ int offset;
+ int sav_offset = 0;
int r3_val = 0;
- char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi),
- get_frame_base (fi));
-
- if (get_frame_saved_regs (fi) == NULL)
- frame_saved_regs_zalloc (fi);
- else
- memset (get_frame_saved_regs (fi), 0, SIZEOF_FRAME_SAVED_REGS);
-
- if (dummy_regs)
- {
- /* DANGER! This is ONLY going to work if the char buffer format of
- the saved registers is byte-for-byte identical to the
- CORE_ADDR regs[NUM_REGS] format used by struct frame_saved_regs! */
- memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
- return;
- }
-
- get_frame_extra_info (fi)->leaf_function = 1;
- get_frame_extra_info (fi)->f_offset = 0;
-
- for (rn = 0; rn < NUM_REGS + NUM_PSEUDO_REGS; rn++)
- where[rn] = -1;
-
- depth = 0;
+ int reg, sav_reg = -1;
- /* Loop around examining the prologue inst until we find something
- that does not appear to be part of the prologue. But give up
- after 20 of them, since we're getting silly then. */
-
- pc = get_frame_func (fi);
- if (!pc)
- {
- deprecated_update_frame_pc_hack (fi, 0);
- return;
- }
+ if (pc >= current_pc)
+ return current_pc;
+ cache->uses_fp = 0;
for (opc = pc + (2 * 28); pc < opc; pc += 2)
{
- inst = read_memory_integer (pc, 2);
+ inst = read_memory_unsigned_integer (pc, 2);
/* See where the registers will be saved to */
if (IS_PUSH (inst))
{
- rn = GET_PUSHED_REG (inst);
- where[rn] = depth;
- depth += 4;
+ cache->saved_regs[GET_SOURCE_REG (inst)] = cache->sp_offset;
+ cache->sp_offset += 4;
}
else if (IS_STS (inst))
{
- where[PR_REGNUM] = depth;
- /* If we're storing the pr then this isn't a leaf */
- get_frame_extra_info (fi)->leaf_function = 0;
- depth += 4;
+ cache->saved_regs[PR_REGNUM] = cache->sp_offset;
+ cache->sp_offset += 4;
}
else if (IS_MOV_R3 (inst))
{
@@ -600,237 +444,237 @@ sh_nofp_frame_init_saved_regs (struct frame_info *fi)
}
else if (IS_ADD_R3SP (inst))
{
- depth += -r3_val;
+ cache->sp_offset += -r3_val;
}
else if (IS_ADD_IMM_SP (inst))
{
- depth -= ((inst & 0xff) ^ 0x80) - 0x80;
+ offset = ((inst & 0xff) ^ 0x80) - 0x80;
+ cache->sp_offset -= offset;
+ }
+ else if (IS_MOVW_PCREL_TO_REG (inst))
+ {
+ if (sav_reg < 0)
+ {
+ reg = GET_TARGET_REG (inst);
+ if (reg < 14)
+ {
+ sav_reg = reg;
+ offset = (((inst & 0xff) ^ 0x80) - 0x80) << 1;
+ sav_offset =
+ read_memory_integer (((pc + 4) & ~3) + offset, 2);
+ }
+ }
+ }
+ else if (IS_MOVL_PCREL_TO_REG (inst))
+ {
+ if (sav_reg < 0)
+ {
+ reg = (inst & 0x0f00) >> 8;
+ if (reg < 14)
+ {
+ sav_reg = reg;
+ offset = (((inst & 0xff) ^ 0x80) - 0x80) << 1;
+ sav_offset =
+ read_memory_integer (((pc + 4) & ~3) + offset, 4);
+ }
+ }
+ }
+ else if (IS_SUB_REG_FROM_SP (inst))
+ {
+ reg = GET_SOURCE_REG (inst);
+ if (sav_reg > 0 && reg == sav_reg)
+ {
+ sav_reg = -1;
+ }
+ cache->sp_offset += sav_offset;
+ }
+ else if (IS_FPUSH (inst))
+ {
+ if (read_register (FPSCR_REGNUM) & FPSCR_SZ)
+ {
+ cache->sp_offset += 8;
+ }
+ else
+ {
+ cache->sp_offset += 4;
+ }
}
else if (IS_MOV_SP_FP (inst))
- break;
-#if 0 /* This used to just stop when it found an instruction that
- was not considered part of the prologue. Now, we just
- keep going looking for likely instructions. */
+ {
+ if (!cache->uses_fp)
+ cache->uses_fp = 1;
+ /* At this point, only allow argument register moves to other
+ registers or argument register moves to @(X,fp) which are
+ moving the register arguments onto the stack area allocated
+ by a former add somenumber to SP call. Don't allow moving
+ to an fp indirect address above fp + cache->sp_offset. */
+ pc += 2;
+ for (opc = pc + 12; pc < opc; pc += 2)
+ {
+ inst = read_memory_integer (pc, 2);
+ if (IS_MOV_ARG_TO_IND_R14 (inst))
+ {
+ reg = GET_SOURCE_REG (inst);
+ if (cache->sp_offset > 0)
+ cache->saved_regs[reg] = cache->sp_offset;
+ }
+ else if (IS_MOV_ARG_TO_IND_R14_WITH_DISP (inst))
+ {
+ reg = GET_SOURCE_REG (inst);
+ offset = (inst & 0xf) * 4;
+ if (cache->sp_offset > offset)
+ cache->saved_regs[reg] = cache->sp_offset - offset;
+ }
+ else if (IS_MOV_ARG_TO_REG (inst))
+ continue;
+ else
+ break;
+ }
+ break;
+ }
+#if 0 /* This used to just stop when it found an instruction that
+ was not considered part of the prologue. Now, we just
+ keep going looking for likely instructions. */
else
break;
#endif
}
- /* Now we know how deep things are, we can work out their addresses */
+ return pc;
+}
- for (rn = 0; rn < NUM_REGS + NUM_PSEUDO_REGS; rn++)
- {
- if (where[rn] >= 0)
- {
- if (rn == DEPRECATED_FP_REGNUM)
- have_fp = 1;
+/* Skip any prologue before the guts of a function */
- get_frame_saved_regs (fi)[rn] = get_frame_base (fi) - where[rn] + depth - 4;
- }
- else
- {
- get_frame_saved_regs (fi)[rn] = 0;
- }
- }
+/* Skip the prologue using the debug information. If this fails we'll
+ fall back on the 'guess' method below. */
+static CORE_ADDR
+after_prologue (CORE_ADDR pc)
+{
+ struct symtab_and_line sal;
+ CORE_ADDR func_addr, func_end;
- if (have_fp)
- {
- get_frame_saved_regs (fi)[SP_REGNUM] = read_memory_integer (get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM], 4);
- }
- else
- {
- get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) - 4;
- }
+ /* If we can not find the symbol in the partial symbol table, then
+ there is no hope we can determine the function's start address
+ with this code. */
+ if (!find_pc_partial_function (pc, NULL, &func_addr, &func_end))
+ return 0;
- get_frame_extra_info (fi)->f_offset = depth - where[DEPRECATED_FP_REGNUM] - 4;
- /* Work out the return pc - either from the saved pr or the pr
- value */
+ /* Get the line associated with FUNC_ADDR. */
+ sal = find_pc_line (func_addr, 0);
+
+ /* There are only two cases to consider. First, the end of the source line
+ is within the function bounds. In that case we return the end of the
+ source line. Second is the end of the source line extends beyond the
+ bounds of the current function. We need to use the slow code to
+ examine instructions in that case. */
+ if (sal.end < func_end)
+ return sal.end;
+ else
+ return 0;
}
-/* For vectors of 4 floating point registers. */
-static int
-fv_reg_base_num (int fv_regnum)
+static CORE_ADDR
+sh_skip_prologue (CORE_ADDR start_pc)
{
- int fp_regnum;
+ CORE_ADDR pc;
+ struct sh_frame_cache cache;
- fp_regnum = FP0_REGNUM +
- (fv_regnum - FV0_REGNUM) * 4;
- return fp_regnum;
-}
+ /* See if we can determine the end of the prologue via the symbol table.
+ If so, then return either PC, or the PC after the prologue, whichever
+ is greater. */
+ pc = after_prologue (start_pc);
-/* For double precision floating point registers, i.e 2 fp regs.*/
-static int
-dr_reg_base_num (int dr_regnum)
-{
- int fp_regnum;
+ /* If after_prologue returned a useful address, then use it. Else
+ fall back on the instruction skipping code. */
+ if (pc)
+ return max (pc, start_pc);
- fp_regnum = FP0_REGNUM +
- (dr_regnum - DR0_REGNUM) * 2;
- return fp_regnum;
+ cache.sp_offset = -4;
+ pc = sh_analyze_prologue (start_pc, (CORE_ADDR) -1, &cache);
+ if (!cache.uses_fp)
+ return start_pc;
+
+ return pc;
}
-static void
-sh_fp_frame_init_saved_regs (struct frame_info *fi)
-{
- int *where = (int *) alloca ((NUM_REGS + NUM_PSEUDO_REGS) * sizeof (int));
- int rn;
- int have_fp = 0;
- int depth;
- int pc;
- int opc;
- int inst;
- int r3_val = 0;
- char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi), get_frame_base (fi));
-
- if (get_frame_saved_regs (fi) == NULL)
- frame_saved_regs_zalloc (fi);
- else
- memset (get_frame_saved_regs (fi), 0, SIZEOF_FRAME_SAVED_REGS);
-
- if (dummy_regs)
- {
- /* DANGER! This is ONLY going to work if the char buffer format of
- the saved registers is byte-for-byte identical to the
- CORE_ADDR regs[NUM_REGS] format used by struct frame_saved_regs! */
- memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
- return;
- }
+/* The ABI says:
- get_frame_extra_info (fi)->leaf_function = 1;
- get_frame_extra_info (fi)->f_offset = 0;
+ Aggregate types not bigger than 8 bytes that have the same size and
+ alignment as one of the integer scalar types are returned in the
+ same registers as the integer type they match.
- for (rn = 0; rn < NUM_REGS + NUM_PSEUDO_REGS; rn++)
- where[rn] = -1;
+ For example, a 2-byte aligned structure with size 2 bytes has the
+ same size and alignment as a short int, and will be returned in R0.
+ A 4-byte aligned structure with size 8 bytes has the same size and
+ alignment as a long long int, and will be returned in R0 and R1.
- depth = 0;
+ When an aggregate type is returned in R0 and R1, R0 contains the
+ first four bytes of the aggregate, and R1 contains the
+ remainder. If the size of the aggregate type is not a multiple of 4
+ bytes, the aggregate is tail-padded up to a multiple of 4
+ bytes. The value of the padding is undefined. For little-endian
+ targets the padding will appear at the most significant end of the
+ last element, for big-endian targets the padding appears at the
+ least significant end of the last element.
- /* Loop around examining the prologue inst until we find something
- that does not appear to be part of the prologue. But give up
- after 20 of them, since we're getting silly then. */
+ All other aggregate types are returned by address. The caller
+ function passes the address of an area large enough to hold the
+ aggregate value in R2. The called function stores the result in
+ this location.
- pc = get_frame_func (fi);
- if (!pc)
- {
- deprecated_update_frame_pc_hack (fi, 0);
- return;
- }
+ To reiterate, structs smaller than 8 bytes could also be returned
+ in memory, if they don't pass the "same size and alignment as an
+ integer type" rule.
- for (opc = pc + (2 * 28); pc < opc; pc += 2)
- {
- inst = read_memory_integer (pc, 2);
- /* See where the registers will be saved to */
- if (IS_PUSH (inst))
- {
- rn = GET_PUSHED_REG (inst);
- where[rn] = depth;
- depth += 4;
- }
- else if (IS_STS (inst))
- {
- where[PR_REGNUM] = depth;
- /* If we're storing the pr then this isn't a leaf */
- get_frame_extra_info (fi)->leaf_function = 0;
- depth += 4;
- }
- else if (IS_MOV_R3 (inst))
- {
- r3_val = ((inst & 0xff) ^ 0x80) - 0x80;
- }
- else if (IS_SHLL_R3 (inst))
- {
- r3_val <<= 1;
- }
- else if (IS_ADD_R3SP (inst))
- {
- depth += -r3_val;
- }
- else if (IS_ADD_IMM_SP (inst))
- {
- depth -= ((inst & 0xff) ^ 0x80) - 0x80;
- }
- else if (IS_FPUSH (inst))
- {
- if (read_register (FPSCR_REGNUM) & FPSCR_SZ)
- {
- depth += 8;
- }
- else
- {
- depth += 4;
- }
- }
- else if (IS_MOV_SP_FP (inst))
- break;
-#if 0 /* This used to just stop when it found an instruction that
- was not considered part of the prologue. Now, we just
- keep going looking for likely instructions. */
- else
- break;
-#endif
- }
+ For example, in
- /* Now we know how deep things are, we can work out their addresses */
+ struct s { char c[3]; } wibble;
+ struct s foo(void) { return wibble; }
- for (rn = 0; rn < NUM_REGS + NUM_PSEUDO_REGS; rn++)
- {
- if (where[rn] >= 0)
- {
- if (rn == DEPRECATED_FP_REGNUM)
- have_fp = 1;
+ the return value from foo() will be in memory, not
+ in R0, because there is no 3-byte integer type.
- get_frame_saved_regs (fi)[rn] = get_frame_base (fi) - where[rn] + depth - 4;
- }
- else
- {
- get_frame_saved_regs (fi)[rn] = 0;
- }
- }
+ Similarly, in
- if (have_fp)
- {
- get_frame_saved_regs (fi)[SP_REGNUM] =
- read_memory_integer (get_frame_saved_regs (fi)[DEPRECATED_FP_REGNUM], 4);
- }
- else
- {
- get_frame_saved_regs (fi)[SP_REGNUM] = get_frame_base (fi) - 4;
- }
+ struct s { char c[2]; } wibble;
+ struct s foo(void) { return wibble; }
- get_frame_extra_info (fi)->f_offset = depth - where[DEPRECATED_FP_REGNUM] - 4;
- /* Work out the return pc - either from the saved pr or the pr
- value */
-}
+ because a struct containing two chars has alignment 1, that matches
+ type char, but size 2, that matches type short. There's no integer
+ type that has alignment 1 and size 2, so the struct is returned in
+ memory.
-/* Initialize the extra info saved in a FRAME */
-static void
-sh_init_extra_frame_info (int fromleaf, struct frame_info *fi)
+*/
+
+static int
+sh_use_struct_convention (int gcc_p, struct type *type)
{
+ int len = TYPE_LENGTH (type);
+ int nelem = TYPE_NFIELDS (type);
- frame_extra_info_zalloc (fi, sizeof (struct frame_extra_info));
+ /* Non-power of 2 length types and types bigger than 8 bytes (which don't
+ fit in two registers anyway) use struct convention. */
+ if (len != 1 && len != 2 && len != 4 && len != 8)
+ return 1;
- if (get_next_frame (fi))
- deprecated_update_frame_pc_hack (fi, DEPRECATED_FRAME_SAVED_PC (get_next_frame (fi)));
+ /* Scalar types and aggregate types with exactly one field are aligned
+ by definition. They are returned in registers. */
+ if (nelem <= 1)
+ return 0;
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
- get_frame_base (fi)))
- {
- /* We need to setup fi->frame here because call_function_by_hand
- gets it wrong by assuming it's always FP. */
- deprecated_update_frame_base_hack (fi, deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi),
- SP_REGNUM));
- 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)->leaf_function = 0;
- return;
- }
- else
- {
- DEPRECATED_FRAME_INIT_SAVED_REGS (fi);
- get_frame_extra_info (fi)->return_pc =
- sh_find_callers_reg (fi, PR_REGNUM);
- }
+ /* If the first field in the aggregate has the same length as the entire
+ aggregate type, the type is returned in registers. */
+ if (TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)) == len)
+ return 0;
+
+ /* If the size of the aggregate is 8 bytes and the first field is
+ of size 4 bytes its alignment is equal to long long's alignment,
+ so it's returned in registers. */
+ if (len == 8 && TYPE_LENGTH (TYPE_FIELD_TYPE (type, 0)) == 4)
+ return 0;
+
+ /* Otherwise use struct convention. */
+ return 1;
}
/* Extract from an array REGBUF containing the (raw) register state
@@ -840,47 +684,12 @@ static CORE_ADDR
sh_extract_struct_value_address (struct regcache *regcache)
{
ULONGEST addr;
+
regcache_cooked_read_unsigned (regcache, STRUCT_RETURN_REGNUM, &addr);
return addr;
}
static CORE_ADDR
-sh_frame_saved_pc (struct frame_info *frame)
-{
- return (get_frame_extra_info (frame)->return_pc);
-}
-
-/* Discard from the stack the innermost frame,
- restoring all saved registers. */
-static void
-sh_pop_frame (void)
-{
- struct frame_info *frame = get_current_frame ();
- CORE_ADDR fp;
- int regnum;
-
- if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
- get_frame_base (frame),
- get_frame_base (frame)))
- generic_pop_dummy_frame ();
- else
- {
- fp = get_frame_base (frame);
- DEPRECATED_FRAME_INIT_SAVED_REGS (frame);
-
- /* Copy regs from where they were saved in the frame */
- for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
- if (get_frame_saved_regs (frame)[regnum])
- write_register (regnum,
- read_memory_integer (get_frame_saved_regs (frame)[regnum], 4));
-
- write_register (PC_REGNUM, get_frame_extra_info (frame)->return_pc);
- write_register (SP_REGNUM, fp + 4);
- }
- flush_cached_frames ();
-}
-
-static CORE_ADDR
sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp)
{
return sp & ~3;
@@ -889,7 +698,7 @@ sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp)
/* Function: push_dummy_call (formerly push_arguments)
Setup the function arguments for calling a function in the inferior.
- On the Hitachi SH architecture, there are four registers (R4 to R7)
+ On the Renesas SH architecture, there are four registers (R4 to R7)
which are dedicated for passing function arguments. Up to the first
four arguments (depending on size) may go into these registers.
The rest go on the stack.
@@ -938,104 +747,248 @@ sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp)
not displace any of the other arguments passed in via registers R4
to R7. */
+/* Helper function to justify value in register according to endianess. */
+static char *
+sh_justify_value_in_reg (struct value *val, int len)
+{
+ static char valbuf[4];
+
+ memset (valbuf, 0, sizeof (valbuf));
+ if (len < 4)
+ {
+ /* value gets right-justified in the register or stack word */
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
+ memcpy (valbuf + (4 - len), (char *) VALUE_CONTENTS (val), len);
+ else
+ memcpy (valbuf, (char *) VALUE_CONTENTS (val), len);
+ return valbuf;
+ }
+ return (char *) VALUE_CONTENTS (val);
+}
+
+/* Helper function to eval number of bytes to allocate on stack. */
static CORE_ADDR
-sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
+sh_stack_allocsize (int nargs, struct value **args)
+{
+ int stack_alloc = 0;
+ while (nargs-- > 0)
+ stack_alloc += ((TYPE_LENGTH (VALUE_TYPE (args[nargs])) + 3) & ~3);
+ return stack_alloc;
+}
+
+/* Helper functions for getting the float arguments right. Registers usage
+ depends on the ABI and the endianess. The comments should enlighten how
+ it's intended to work. */
+
+/* This array stores which of the float arg registers are already in use. */
+static int flt_argreg_array[FLOAT_ARGLAST_REGNUM - FLOAT_ARG0_REGNUM + 1];
+
+/* This function just resets the above array to "no reg used so far". */
+static void
+sh_init_flt_argreg (void)
+{
+ memset (flt_argreg_array, 0, sizeof flt_argreg_array);
+}
+
+/* This function returns the next register to use for float arg passing.
+ It returns either a valid value between FLOAT_ARG0_REGNUM and
+ FLOAT_ARGLAST_REGNUM if a register is available, otherwise it returns
+ FLOAT_ARGLAST_REGNUM + 1 to indicate that no register is available.
+
+ Note that register number 0 in flt_argreg_array corresponds with the
+ real float register fr4. In contrast to FLOAT_ARG0_REGNUM (value is
+ 29) the parity of the register number is preserved, which is important
+ for the double register passing test (see the "argreg & 1" test below). */
+static int
+sh_next_flt_argreg (int len)
+{
+ int argreg;
+
+ /* First search for the next free register. */
+ for (argreg = 0; argreg <= FLOAT_ARGLAST_REGNUM - FLOAT_ARG0_REGNUM;
+ ++argreg)
+ if (!flt_argreg_array[argreg])
+ break;
+
+ /* No register left? */
+ if (argreg > FLOAT_ARGLAST_REGNUM - FLOAT_ARG0_REGNUM)
+ return FLOAT_ARGLAST_REGNUM + 1;
+
+ if (len == 8)
+ {
+ /* Doubles are always starting in a even register number. */
+ if (argreg & 1)
+ {
+ flt_argreg_array[argreg] = 1;
+
+ ++argreg;
+
+ /* No register left? */
+ if (argreg > FLOAT_ARGLAST_REGNUM - FLOAT_ARG0_REGNUM)
+ return FLOAT_ARGLAST_REGNUM + 1;
+ }
+ /* Also mark the next register as used. */
+ flt_argreg_array[argreg + 1] = 1;
+ }
+ else if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
+ {
+ /* In little endian, gcc passes floats like this: f5, f4, f7, f6, ... */
+ if (!flt_argreg_array[argreg + 1])
+ ++argreg;
+ }
+ flt_argreg_array[argreg] = 1;
+ return FLOAT_ARG0_REGNUM + argreg;
+}
+
+/* Helper function which figures out, if a type is treated like a float type.
+
+ The FPU ABIs have a special way how to treat types as float types.
+ Structures with exactly one member, which is of type float or double, are
+ treated exactly as the base types float or double:
+
+ struct sf {
+ float f;
+ };
+
+ struct sd {
+ double d;
+ };
+
+ are handled the same way as just
+
+ float f;
+
+ double d;
+
+ As a result, arguments of these struct types are pushed into floating point
+ registers exactly as floats or doubles, using the same decision algorithm.
+
+ The same is valid if these types are used as function return types. The
+ above structs are returned in fr0 resp. fr0,fr1 instead of in r0, r0,r1
+ or even using struct convention as it is for other structs. */
+
+static int
+sh_treat_as_flt_p (struct type *type)
+{
+ int len = TYPE_LENGTH (type);
+
+ /* Ordinary float types are obviously treated as float. */
+ if (TYPE_CODE (type) == TYPE_CODE_FLT)
+ return 1;
+ /* Otherwise non-struct types are not treated as float. */
+ if (TYPE_CODE (type) != TYPE_CODE_STRUCT)
+ return 0;
+ /* Otherwise structs with more than one memeber are not treated as float. */
+ if (TYPE_NFIELDS (type) != 1)
+ return 0;
+ /* Otherwise if the type of that member is float, the whole type is
+ treated as float. */
+ if (TYPE_CODE (TYPE_FIELD_TYPE (type, 0)) == TYPE_CODE_FLT)
+ return 1;
+ /* Otherwise it's not treated as float. */
+ return 0;
+}
+
+static CORE_ADDR
+sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
CORE_ADDR func_addr,
- struct regcache *regcache,
+ struct regcache *regcache,
CORE_ADDR bp_addr, int nargs,
- struct value **args,
+ struct value **args,
CORE_ADDR sp, int struct_return,
CORE_ADDR struct_addr)
{
- int stack_offset, stack_alloc;
- int argreg, flt_argreg;
+ int stack_offset = 0;
+ int argreg = ARG0_REGNUM;
+ int flt_argreg = 0;
int argnum;
struct type *type;
CORE_ADDR regval;
char *val;
- char valbuf[4];
- int len;
- int odd_sized_struct;
+ int len, reg_size = 0;
+ int pass_on_stack = 0;
+ int treat_as_flt;
/* first force sp to a 4-byte alignment */
sp = sh_frame_align (gdbarch, sp);
- /* The "struct return pointer" pseudo-argument has its own dedicated
- register */
if (struct_return)
- regcache_cooked_write_unsigned (regcache,
- STRUCT_RETURN_REGNUM,
- struct_addr);
+ regcache_cooked_write_unsigned (regcache,
+ STRUCT_RETURN_REGNUM, struct_addr);
- /* Now make sure there's space on the stack */
- for (argnum = 0, stack_alloc = 0; argnum < nargs; argnum++)
- stack_alloc += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 3) & ~3);
- sp -= stack_alloc; /* make room on stack for args */
+ /* make room on stack for args */
+ sp -= sh_stack_allocsize (nargs, args);
+
+ /* Initialize float argument mechanism. */
+ sh_init_flt_argreg ();
/* Now load as many as possible of the first arguments into
registers, and push the rest onto the stack. There are 16 bytes
in four registers available. Loop thru args from first to last. */
-
- argreg = ARG0_REGNUM;
- flt_argreg = FLOAT_ARG0_REGNUM;
- for (argnum = 0, stack_offset = 0; argnum < nargs; argnum++)
+ for (argnum = 0; argnum < nargs; argnum++)
{
type = VALUE_TYPE (args[argnum]);
len = TYPE_LENGTH (type);
- memset (valbuf, 0, sizeof (valbuf));
- if (len < 4)
- {
- /* value gets right-justified in the register or stack word */
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- memcpy (valbuf + (4 - len),
- (char *) VALUE_CONTENTS (args[argnum]), len);
- else
- memcpy (valbuf, (char *) VALUE_CONTENTS (args[argnum]), len);
- val = valbuf;
- }
- else
- val = (char *) VALUE_CONTENTS (args[argnum]);
+ val = sh_justify_value_in_reg (args[argnum], len);
+
+ /* Some decisions have to be made how various types are handled.
+ This also differs in different ABIs. */
+ pass_on_stack = 0;
+
+ /* Find out the next register to use for a floating point value. */
+ treat_as_flt = sh_treat_as_flt_p (type);
+ if (treat_as_flt)
+ flt_argreg = sh_next_flt_argreg (len);
+ /* In contrast to non-FPU CPUs, arguments are never split between
+ registers and stack. If an argument doesn't fit in the remaining
+ registers it's always pushed entirely on the stack. */
+ else if (len > ((ARGLAST_REGNUM - argreg + 1) * 4))
+ pass_on_stack = 1;
- if (len > 4 && (len & 3) != 0)
- odd_sized_struct = 1; /* Such structs go entirely on stack. */
- else if (len > 16)
- odd_sized_struct = 1; /* So do aggregates bigger than 4 words. */
- else
- odd_sized_struct = 0;
while (len > 0)
{
- if ((TYPE_CODE (type) == TYPE_CODE_FLT
- && flt_argreg > FLOAT_ARGLAST_REGNUM)
- || argreg > ARGLAST_REGNUM
- || odd_sized_struct)
- {
- /* must go on the stack */
- write_memory (sp + stack_offset, val, 4);
- stack_offset += 4;
+ if ((treat_as_flt && flt_argreg > FLOAT_ARGLAST_REGNUM)
+ || (!treat_as_flt && (argreg > ARGLAST_REGNUM
+ || pass_on_stack)))
+ {
+ /* The data goes entirely on the stack, 4-byte aligned. */
+ reg_size = (len + 3) & ~3;
+ write_memory (sp + stack_offset, val, reg_size);
+ stack_offset += reg_size;
}
- /* NOTE WELL!!!!! This is not an "else if" clause!!!
- That's because some *&^%$ things get passed on the stack
- AND in the registers! */
- if (TYPE_CODE (type) == TYPE_CODE_FLT &&
- flt_argreg > 0 && flt_argreg <= FLOAT_ARGLAST_REGNUM)
+ else if (treat_as_flt && flt_argreg <= FLOAT_ARGLAST_REGNUM)
{
- /* Argument goes in a single-precision fp reg. */
- regval = extract_unsigned_integer (val, register_size (gdbarch,
- argreg));
+ /* Argument goes in a float argument register. */
+ reg_size = register_size (gdbarch, flt_argreg);
+ regval = extract_unsigned_integer (val, reg_size);
+ /* In little endian mode, float types taking two registers
+ (doubles on sh4, long doubles on sh2e, sh3e and sh4) must
+ be stored swapped in the argument registers. The below
+ code first writes the first 32 bits in the next but one
+ register, increments the val and len values accordingly
+ and then proceeds as normal by writing the second 32 bits
+ into the next register. */
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE
+ && TYPE_LENGTH (type) == 2 * reg_size)
+ {
+ regcache_cooked_write_unsigned (regcache, flt_argreg + 1,
+ regval);
+ val += reg_size;
+ len -= reg_size;
+ regval = extract_unsigned_integer (val, reg_size);
+ }
regcache_cooked_write_unsigned (regcache, flt_argreg++, regval);
}
- else if (argreg <= ARGLAST_REGNUM)
- {
+ else if (!treat_as_flt && argreg <= ARGLAST_REGNUM)
+ {
/* there's room in a register */
- regval = extract_unsigned_integer (val, register_size (gdbarch,
- argreg));
+ reg_size = register_size (gdbarch, argreg);
+ regval = extract_unsigned_integer (val, reg_size);
regcache_cooked_write_unsigned (regcache, argreg++, regval);
}
- /* Store the value 4 bytes at a time. This means that things
- larger than 4 bytes may go partly in registers and partly
- on the stack. */
- len -= register_size (gdbarch, argreg);
- val += register_size (gdbarch, argreg);
+ /* Store the value one register at a time or in one step on stack. */
+ len -= reg_size;
+ val += reg_size;
}
}
@@ -1049,90 +1002,63 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
}
static CORE_ADDR
-sh_push_dummy_call_nofpu (struct gdbarch *gdbarch,
+sh_push_dummy_call_nofpu (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,
+ struct regcache *regcache,
+ CORE_ADDR bp_addr,
+ int nargs, struct value **args,
+ CORE_ADDR sp, int struct_return,
CORE_ADDR struct_addr)
{
- int stack_offset, stack_alloc;
- int argreg;
+ int stack_offset = 0;
+ int argreg = ARG0_REGNUM;
int argnum;
struct type *type;
CORE_ADDR regval;
char *val;
- char valbuf[4];
- int len;
- int odd_sized_struct;
+ int len, reg_size;
/* first force sp to a 4-byte alignment */
sp = sh_frame_align (gdbarch, sp);
- /* The "struct return pointer" pseudo-argument has its own dedicated
- register */
if (struct_return)
regcache_cooked_write_unsigned (regcache,
- STRUCT_RETURN_REGNUM,
- struct_addr);
+ STRUCT_RETURN_REGNUM, struct_addr);
- /* Now make sure there's space on the stack */
- for (argnum = 0, stack_alloc = 0; argnum < nargs; argnum++)
- stack_alloc += ((TYPE_LENGTH (VALUE_TYPE (args[argnum])) + 3) & ~3);
- sp -= stack_alloc; /* make room on stack for args */
+ /* make room on stack for args */
+ sp -= sh_stack_allocsize (nargs, args);
/* Now load as many as possible of the first arguments into
registers, and push the rest onto the stack. There are 16 bytes
in four registers available. Loop thru args from first to last. */
-
- argreg = ARG0_REGNUM;
- for (argnum = 0, stack_offset = 0; argnum < nargs; argnum++)
+ for (argnum = 0; argnum < nargs; argnum++)
{
type = VALUE_TYPE (args[argnum]);
len = TYPE_LENGTH (type);
- memset (valbuf, 0, sizeof (valbuf));
- if (len < 4)
- {
- /* value gets right-justified in the register or stack word */
- if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
- memcpy (valbuf + (4 - len),
- (char *) VALUE_CONTENTS (args[argnum]), len);
- else
- memcpy (valbuf, (char *) VALUE_CONTENTS (args[argnum]), len);
- val = valbuf;
- }
- else
- val = (char *) VALUE_CONTENTS (args[argnum]);
+ val = sh_justify_value_in_reg (args[argnum], len);
- if (len > 4 && (len & 3) != 0)
- odd_sized_struct = 1; /* such structs go entirely on stack */
- else
- odd_sized_struct = 0;
while (len > 0)
{
- if (argreg > ARGLAST_REGNUM
- || odd_sized_struct)
- {
- /* must go on the stack */
- write_memory (sp + stack_offset, val, 4);
- stack_offset += 4;
+ if (argreg > ARGLAST_REGNUM)
+ {
+ /* The remainder of the data goes entirely on the stack,
+ 4-byte aligned. */
+ reg_size = (len + 3) & ~3;
+ write_memory (sp + stack_offset, val, reg_size);
+ stack_offset += reg_size;
}
- /* NOTE WELL!!!!! This is not an "else if" clause!!!
- That's because some *&^%$ things get passed on the stack
- AND in the registers! */
- if (argreg <= ARGLAST_REGNUM)
- {
+ else if (argreg <= ARGLAST_REGNUM)
+ {
/* there's room in a register */
- regval = extract_unsigned_integer (val, register_size (gdbarch,
- argreg));
+ reg_size = register_size (gdbarch, argreg);
+ regval = extract_unsigned_integer (val, reg_size);
regcache_cooked_write_unsigned (regcache, argreg++, regval);
}
- /* Store the value 4 bytes at a time. This means that things
- larger than 4 bytes may go partly in registers and partly
+ /* Store the value reg_size bytes at a time. This means that things
+ larger than reg_size bytes may go partly in registers and partly
on the stack. */
- len -= register_size (gdbarch, argreg);
- val += register_size (gdbarch, argreg);
+ len -= reg_size;
+ val += reg_size;
}
}
@@ -1156,7 +1082,7 @@ sh_default_extract_return_value (struct type *type, struct regcache *regcache,
int len = TYPE_LENGTH (type);
int return_register = R0_REGNUM;
int offset;
-
+
if (len <= 4)
{
ULONGEST c;
@@ -1168,7 +1094,7 @@ sh_default_extract_return_value (struct type *type, struct regcache *regcache,
{
int i, regnum = R0_REGNUM;
for (i = 0; i < len; i += 4)
- regcache_raw_read (regcache, regnum++, (char *)valbuf + i);
+ regcache_raw_read (regcache, regnum++, (char *) valbuf + i);
}
else
error ("bad size for return value");
@@ -1178,12 +1104,15 @@ static void
sh3e_sh4_extract_return_value (struct type *type, struct regcache *regcache,
void *valbuf)
{
- if (TYPE_CODE (type) == TYPE_CODE_FLT)
+ if (sh_treat_as_flt_p (type))
{
int len = TYPE_LENGTH (type);
int i, regnum = FP0_REGNUM;
for (i = 0; i < len; i += 4)
- regcache_raw_read (regcache, regnum++, (char *)valbuf + i);
+ if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
+ regcache_raw_read (regcache, regnum++, (char *) valbuf + len - 4 - i);
+ else
+ regcache_raw_read (regcache, regnum++, (char *) valbuf + i);
}
else
sh_default_extract_return_value (type, regcache, valbuf);
@@ -1211,7 +1140,7 @@ sh_default_store_return_value (struct type *type, struct regcache *regcache,
{
int i, regnum = R0_REGNUM;
for (i = 0; i < len; i += 4)
- regcache_raw_write (regcache, regnum++, (char *)valbuf + i);
+ regcache_raw_write (regcache, regnum++, (char *) valbuf + i);
}
}
@@ -1219,12 +1148,12 @@ static void
sh3e_sh4_store_return_value (struct type *type, struct regcache *regcache,
const void *valbuf)
{
- if (TYPE_CODE (type) == TYPE_CODE_FLT)
+ if (sh_treat_as_flt_p (type))
{
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);
+ regcache_raw_write (regcache, regnum++, (char *) valbuf + i);
}
else
sh_default_store_return_value (type, regcache, valbuf);
@@ -1246,24 +1175,17 @@ sh_generic_show_regs (void)
(long) read_register (GBR_REGNUM),
(long) read_register (VBR_REGNUM));
- printf_filtered ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0),
- (long) read_register (1),
- (long) read_register (2),
- (long) read_register (3),
- (long) read_register (4),
- (long) read_register (5),
- (long) read_register (6),
- (long) read_register (7));
+ printf_filtered
+ ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) read_register (0), (long) read_register (1),
+ (long) read_register (2), (long) read_register (3),
+ (long) read_register (4), (long) read_register (5),
+ (long) read_register (6), (long) read_register (7));
printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8),
- (long) read_register (9),
- (long) read_register (10),
- (long) read_register (11),
- (long) read_register (12),
- (long) read_register (13),
- (long) read_register (14),
- (long) read_register (15));
+ (long) read_register (8), (long) read_register (9),
+ (long) read_register (10), (long) read_register (11),
+ (long) read_register (12), (long) read_register (13),
+ (long) read_register (14), (long) read_register (15));
}
static void
@@ -1280,27 +1202,20 @@ sh3_show_regs (void)
(long) read_register (GBR_REGNUM),
(long) read_register (VBR_REGNUM));
printf_filtered (" SSR=%08lx SPC=%08lx",
- (long) read_register (SSR_REGNUM),
+ (long) read_register (SSR_REGNUM),
(long) read_register (SPC_REGNUM));
- printf_filtered ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0),
- (long) read_register (1),
- (long) read_register (2),
- (long) read_register (3),
- (long) read_register (4),
- (long) read_register (5),
- (long) read_register (6),
- (long) read_register (7));
+ printf_filtered
+ ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) read_register (0), (long) read_register (1),
+ (long) read_register (2), (long) read_register (3),
+ (long) read_register (4), (long) read_register (5),
+ (long) read_register (6), (long) read_register (7));
printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8),
- (long) read_register (9),
- (long) read_register (10),
- (long) read_register (11),
- (long) read_register (12),
- (long) read_register (13),
- (long) read_register (14),
- (long) read_register (15));
+ (long) read_register (8), (long) read_register (9),
+ (long) read_register (10), (long) read_register (11),
+ (long) read_register (12), (long) read_register (13),
+ (long) read_register (14), (long) read_register (15));
}
@@ -1318,46 +1233,23 @@ sh2e_show_regs (void)
(long) read_register (GBR_REGNUM),
(long) read_register (VBR_REGNUM));
printf_filtered (" FPUL=%08lx FPSCR=%08lx",
- (long) read_register (FPUL_REGNUM),
- (long) read_register (FPSCR_REGNUM));
-
- printf_filtered ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0),
- (long) read_register (1),
- (long) read_register (2),
- (long) read_register (3),
- (long) read_register (4),
- (long) read_register (5),
- (long) read_register (6),
- (long) read_register (7));
+ (long) read_register (FPUL_REGNUM),
+ (long) read_register (FPSCR_REGNUM));
+
+ printf_filtered
+ ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) read_register (0), (long) read_register (1),
+ (long) read_register (2), (long) read_register (3),
+ (long) read_register (4), (long) read_register (5),
+ (long) read_register (6), (long) read_register (7));
printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8),
- (long) read_register (9),
- (long) read_register (10),
- (long) read_register (11),
- (long) read_register (12),
- (long) read_register (13),
- (long) read_register (14),
- (long) read_register (15));
-
- printf_filtered (("FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
- (long) read_register (FP0_REGNUM + 0),
- (long) read_register (FP0_REGNUM + 1),
- (long) read_register (FP0_REGNUM + 2),
- (long) read_register (FP0_REGNUM + 3),
- (long) read_register (FP0_REGNUM + 4),
- (long) read_register (FP0_REGNUM + 5),
- (long) read_register (FP0_REGNUM + 6),
- (long) read_register (FP0_REGNUM + 7));
- printf_filtered (("FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
- (long) read_register (FP0_REGNUM + 8),
- (long) read_register (FP0_REGNUM + 9),
- (long) read_register (FP0_REGNUM + 10),
- (long) read_register (FP0_REGNUM + 11),
- (long) read_register (FP0_REGNUM + 12),
- (long) read_register (FP0_REGNUM + 13),
- (long) read_register (FP0_REGNUM + 14),
- (long) read_register (FP0_REGNUM + 15));
+ (long) read_register (8), (long) read_register (9),
+ (long) read_register (10), (long) read_register (11),
+ (long) read_register (12), (long) read_register (13),
+ (long) read_register (14), (long) read_register (15));
+
+ printf_filtered (("FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"), (long) read_register (FP0_REGNUM + 0), (long) read_register (FP0_REGNUM + 1), (long) read_register (FP0_REGNUM + 2), (long) read_register (FP0_REGNUM + 3), (long) read_register (FP0_REGNUM + 4), (long) read_register (FP0_REGNUM + 5), (long) read_register (FP0_REGNUM + 6), (long) read_register (FP0_REGNUM + 7));
+ printf_filtered (("FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"), (long) read_register (FP0_REGNUM + 8), (long) read_register (FP0_REGNUM + 9), (long) read_register (FP0_REGNUM + 10), (long) read_register (FP0_REGNUM + 11), (long) read_register (FP0_REGNUM + 12), (long) read_register (FP0_REGNUM + 13), (long) read_register (FP0_REGNUM + 14), (long) read_register (FP0_REGNUM + 15));
}
static void
@@ -1380,43 +1272,20 @@ sh3e_show_regs (void)
(long) read_register (FPUL_REGNUM),
(long) read_register (FPSCR_REGNUM));
- printf_filtered ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0),
- (long) read_register (1),
- (long) read_register (2),
- (long) read_register (3),
- (long) read_register (4),
- (long) read_register (5),
- (long) read_register (6),
- (long) read_register (7));
+ printf_filtered
+ ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) read_register (0), (long) read_register (1),
+ (long) read_register (2), (long) read_register (3),
+ (long) read_register (4), (long) read_register (5),
+ (long) read_register (6), (long) read_register (7));
printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8),
- (long) read_register (9),
- (long) read_register (10),
- (long) read_register (11),
- (long) read_register (12),
- (long) read_register (13),
- (long) read_register (14),
- (long) read_register (15));
-
- printf_filtered (("FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
- (long) read_register (FP0_REGNUM + 0),
- (long) read_register (FP0_REGNUM + 1),
- (long) read_register (FP0_REGNUM + 2),
- (long) read_register (FP0_REGNUM + 3),
- (long) read_register (FP0_REGNUM + 4),
- (long) read_register (FP0_REGNUM + 5),
- (long) read_register (FP0_REGNUM + 6),
- (long) read_register (FP0_REGNUM + 7));
- printf_filtered (("FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
- (long) read_register (FP0_REGNUM + 8),
- (long) read_register (FP0_REGNUM + 9),
- (long) read_register (FP0_REGNUM + 10),
- (long) read_register (FP0_REGNUM + 11),
- (long) read_register (FP0_REGNUM + 12),
- (long) read_register (FP0_REGNUM + 13),
- (long) read_register (FP0_REGNUM + 14),
- (long) read_register (FP0_REGNUM + 15));
+ (long) read_register (8), (long) read_register (9),
+ (long) read_register (10), (long) read_register (11),
+ (long) read_register (12), (long) read_register (13),
+ (long) read_register (14), (long) read_register (15));
+
+ printf_filtered (("FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"), (long) read_register (FP0_REGNUM + 0), (long) read_register (FP0_REGNUM + 1), (long) read_register (FP0_REGNUM + 2), (long) read_register (FP0_REGNUM + 3), (long) read_register (FP0_REGNUM + 4), (long) read_register (FP0_REGNUM + 5), (long) read_register (FP0_REGNUM + 6), (long) read_register (FP0_REGNUM + 7));
+ printf_filtered (("FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"), (long) read_register (FP0_REGNUM + 8), (long) read_register (FP0_REGNUM + 9), (long) read_register (FP0_REGNUM + 10), (long) read_register (FP0_REGNUM + 11), (long) read_register (FP0_REGNUM + 12), (long) read_register (FP0_REGNUM + 13), (long) read_register (FP0_REGNUM + 14), (long) read_register (FP0_REGNUM + 15));
}
static void
@@ -1437,36 +1306,26 @@ sh3_dsp_show_regs (void)
(long) read_register (SSR_REGNUM),
(long) read_register (SPC_REGNUM));
- printf_filtered (" DSR=%08lx",
- (long) read_register (DSR_REGNUM));
-
- printf_filtered ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0),
- (long) read_register (1),
- (long) read_register (2),
- (long) read_register (3),
- (long) read_register (4),
- (long) read_register (5),
- (long) read_register (6),
- (long) read_register (7));
+ printf_filtered (" DSR=%08lx", (long) read_register (DSR_REGNUM));
+
+ printf_filtered
+ ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) read_register (0), (long) read_register (1),
+ (long) read_register (2), (long) read_register (3),
+ (long) read_register (4), (long) read_register (5),
+ (long) read_register (6), (long) read_register (7));
printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8),
- (long) read_register (9),
- (long) read_register (10),
- (long) read_register (11),
- (long) read_register (12),
- (long) read_register (13),
- (long) read_register (14),
- (long) read_register (15));
-
- printf_filtered ("A0G=%02lx A0=%08lx M0=%08lx X0=%08lx Y0=%08lx RS=%08lx MOD=%08lx\n",
- (long) read_register (A0G_REGNUM) & 0xff,
- (long) read_register (A0_REGNUM),
- (long) read_register (M0_REGNUM),
- (long) read_register (X0_REGNUM),
- (long) read_register (Y0_REGNUM),
- (long) read_register (RS_REGNUM),
- (long) read_register (MOD_REGNUM));
+ (long) read_register (8), (long) read_register (9),
+ (long) read_register (10), (long) read_register (11),
+ (long) read_register (12), (long) read_register (13),
+ (long) read_register (14), (long) read_register (15));
+
+ printf_filtered
+ ("A0G=%02lx A0=%08lx M0=%08lx X0=%08lx Y0=%08lx RS=%08lx MOD=%08lx\n",
+ (long) read_register (A0G_REGNUM) & 0xff,
+ (long) read_register (A0_REGNUM), (long) read_register (M0_REGNUM),
+ (long) read_register (X0_REGNUM), (long) read_register (Y0_REGNUM),
+ (long) read_register (RS_REGNUM), (long) read_register (MOD_REGNUM));
printf_filtered ("A1G=%02lx A1=%08lx M1=%08lx X1=%08lx Y1=%08lx RE=%08lx\n",
(long) read_register (A1G_REGNUM) & 0xff,
(long) read_register (A1_REGNUM),
@@ -1497,28 +1356,22 @@ sh4_show_regs (void)
(long) read_register (FPUL_REGNUM),
(long) read_register (FPSCR_REGNUM));
- printf_filtered ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0),
- (long) read_register (1),
- (long) read_register (2),
- (long) read_register (3),
- (long) read_register (4),
- (long) read_register (5),
- (long) read_register (6),
- (long) read_register (7));
+ printf_filtered
+ ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) read_register (0), (long) read_register (1),
+ (long) read_register (2), (long) read_register (3),
+ (long) read_register (4), (long) read_register (5),
+ (long) read_register (6), (long) read_register (7));
printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8),
- (long) read_register (9),
- (long) read_register (10),
- (long) read_register (11),
- (long) read_register (12),
- (long) read_register (13),
- (long) read_register (14),
- (long) read_register (15));
+ (long) read_register (8), (long) read_register (9),
+ (long) read_register (10), (long) read_register (11),
+ (long) read_register (12), (long) read_register (13),
+ (long) read_register (14), (long) read_register (15));
printf_filtered ((pr
? "DR0-DR6 %08lx%08lx %08lx%08lx %08lx%08lx %08lx%08lx\n"
- : "FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
+ :
+ "FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
(long) read_register (FP0_REGNUM + 0),
(long) read_register (FP0_REGNUM + 1),
(long) read_register (FP0_REGNUM + 2),
@@ -1527,9 +1380,9 @@ sh4_show_regs (void)
(long) read_register (FP0_REGNUM + 5),
(long) read_register (FP0_REGNUM + 6),
(long) read_register (FP0_REGNUM + 7));
- printf_filtered ((pr
- ? "DR8-DR14 %08lx%08lx %08lx%08lx %08lx%08lx %08lx%08lx\n"
- : "FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
+ printf_filtered ((pr ?
+ "DR8-DR14 %08lx%08lx %08lx%08lx %08lx%08lx %08lx%08lx\n" :
+ "FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
(long) read_register (FP0_REGNUM + 8),
(long) read_register (FP0_REGNUM + 9),
(long) read_register (FP0_REGNUM + 10),
@@ -1541,6 +1394,36 @@ sh4_show_regs (void)
}
static void
+sh4_nofpu_show_regs (void)
+{
+ printf_filtered ("PC=%s SR=%08lx PR=%08lx MACH=%08lx MACHL=%08lx\n",
+ paddr (read_register (PC_REGNUM)),
+ (long) read_register (SR_REGNUM),
+ (long) read_register (PR_REGNUM),
+ (long) read_register (MACH_REGNUM),
+ (long) read_register (MACL_REGNUM));
+
+ printf_filtered ("GBR=%08lx VBR=%08lx",
+ (long) read_register (GBR_REGNUM),
+ (long) read_register (VBR_REGNUM));
+ printf_filtered (" SSR=%08lx SPC=%08lx",
+ (long) read_register (SSR_REGNUM),
+ (long) read_register (SPC_REGNUM));
+
+ printf_filtered
+ ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) read_register (0), (long) read_register (1),
+ (long) read_register (2), (long) read_register (3),
+ (long) read_register (4), (long) read_register (5),
+ (long) read_register (6), (long) read_register (7));
+ printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) read_register (8), (long) read_register (9),
+ (long) read_register (10), (long) read_register (11),
+ (long) read_register (12), (long) read_register (13),
+ (long) read_register (14), (long) read_register (15));
+}
+
+static void
sh_dsp_show_regs (void)
{
printf_filtered ("PC=%s SR=%08lx PR=%08lx MACH=%08lx MACHL=%08lx\n",
@@ -1554,36 +1437,26 @@ sh_dsp_show_regs (void)
(long) read_register (GBR_REGNUM),
(long) read_register (VBR_REGNUM));
- printf_filtered (" DSR=%08lx",
- (long) read_register (DSR_REGNUM));
-
- printf_filtered ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0),
- (long) read_register (1),
- (long) read_register (2),
- (long) read_register (3),
- (long) read_register (4),
- (long) read_register (5),
- (long) read_register (6),
- (long) read_register (7));
+ printf_filtered (" DSR=%08lx", (long) read_register (DSR_REGNUM));
+
+ printf_filtered
+ ("\nR0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) read_register (0), (long) read_register (1),
+ (long) read_register (2), (long) read_register (3),
+ (long) read_register (4), (long) read_register (5),
+ (long) read_register (6), (long) read_register (7));
printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8),
- (long) read_register (9),
- (long) read_register (10),
- (long) read_register (11),
- (long) read_register (12),
- (long) read_register (13),
- (long) read_register (14),
- (long) read_register (15));
-
- printf_filtered ("A0G=%02lx A0=%08lx M0=%08lx X0=%08lx Y0=%08lx RS=%08lx MOD=%08lx\n",
- (long) read_register (A0G_REGNUM) & 0xff,
- (long) read_register (A0_REGNUM),
- (long) read_register (M0_REGNUM),
- (long) read_register (X0_REGNUM),
- (long) read_register (Y0_REGNUM),
- (long) read_register (RS_REGNUM),
- (long) read_register (MOD_REGNUM));
+ (long) read_register (8), (long) read_register (9),
+ (long) read_register (10), (long) read_register (11),
+ (long) read_register (12), (long) read_register (13),
+ (long) read_register (14), (long) read_register (15));
+
+ printf_filtered
+ ("A0G=%02lx A0=%08lx M0=%08lx X0=%08lx Y0=%08lx RS=%08lx MOD=%08lx\n",
+ (long) read_register (A0G_REGNUM) & 0xff,
+ (long) read_register (A0_REGNUM), (long) read_register (M0_REGNUM),
+ (long) read_register (X0_REGNUM), (long) read_register (Y0_REGNUM),
+ (long) read_register (RS_REGNUM), (long) read_register (MOD_REGNUM));
printf_filtered ("A1G=%02lx A1=%08lx M1=%08lx X1=%08lx Y1=%08lx RE=%08lx\n",
(long) read_register (A1G_REGNUM) & 0xff,
(long) read_register (A1_REGNUM),
@@ -1597,7 +1470,7 @@ static void
sh_show_regs_command (char *args, int from_tty)
{
if (sh_show_regs)
- (*sh_show_regs)();
+ (*sh_show_regs) ();
}
/* Return the GDB type object for the "standard" data type
@@ -1606,8 +1479,7 @@ static struct type *
sh_sh3e_register_type (struct gdbarch *gdbarch, int reg_nr)
{
if ((reg_nr >= FP0_REGNUM
- && (reg_nr <= FP_LAST_REGNUM))
- || (reg_nr == FPUL_REGNUM))
+ && (reg_nr <= FP_LAST_REGNUM)) || (reg_nr == FPUL_REGNUM))
return builtin_type_float;
else
return builtin_type_int;
@@ -1626,14 +1498,11 @@ static struct type *
sh_sh4_register_type (struct gdbarch *gdbarch, int reg_nr)
{
if ((reg_nr >= FP0_REGNUM
- && (reg_nr <= FP_LAST_REGNUM))
- || (reg_nr == FPUL_REGNUM))
+ && (reg_nr <= FP_LAST_REGNUM)) || (reg_nr == FPUL_REGNUM))
return builtin_type_float;
- else if (reg_nr >= DR0_REGNUM
- && reg_nr <= DR_LAST_REGNUM)
+ else if (reg_nr >= DR0_REGNUM && reg_nr <= DR_LAST_REGNUM)
return builtin_type_double;
- else if (reg_nr >= FV0_REGNUM
- && reg_nr <= FV_LAST_REGNUM)
+ else if (reg_nr >= FV0_REGNUM && reg_nr <= FV_LAST_REGNUM)
return sh_sh4_build_float_register_type (3);
else
return builtin_type_int;
@@ -1673,31 +1542,52 @@ sh_default_register_type (struct gdbarch *gdbarch, int reg_nr)
static void
sh_sh4_register_convert_to_virtual (int regnum, struct type *type,
- char *from, char *to)
+ char *from, char *to)
{
- if (regnum >= DR0_REGNUM
- && regnum <= DR_LAST_REGNUM)
+ if (regnum >= DR0_REGNUM && regnum <= DR_LAST_REGNUM)
{
DOUBLEST val;
- floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword, from, &val);
+ floatformat_to_doublest (&floatformat_ieee_double_littlebyte_bigword,
+ from, &val);
store_typed_floating (to, type, val);
}
else
- error ("sh_register_convert_to_virtual called with non DR register number");
+ error
+ ("sh_register_convert_to_virtual called with non DR register number");
}
static void
sh_sh4_register_convert_to_raw (struct type *type, int regnum,
const void *from, void *to)
{
- if (regnum >= DR0_REGNUM
- && regnum <= DR_LAST_REGNUM)
+ if (regnum >= DR0_REGNUM && regnum <= DR_LAST_REGNUM)
{
DOUBLEST val = extract_typed_floating (from, type);
- floatformat_from_doublest (&floatformat_ieee_double_littlebyte_bigword, &val, to);
+ floatformat_from_doublest (&floatformat_ieee_double_littlebyte_bigword,
+ &val, to);
}
else
- error("sh_register_convert_to_raw called with non DR register number");
+ error ("sh_register_convert_to_raw called with non DR register number");
+}
+
+/* For vectors of 4 floating point registers. */
+static int
+fv_reg_base_num (int fv_regnum)
+{
+ int fp_regnum;
+
+ fp_regnum = FP0_REGNUM + (fv_regnum - FV0_REGNUM) * 4;
+ return fp_regnum;
+}
+
+/* For double precision floating point registers, i.e 2 fp regs.*/
+static int
+dr_reg_base_num (int dr_regnum)
+{
+ int fp_regnum;
+
+ fp_regnum = FP0_REGNUM + (dr_regnum - DR0_REGNUM) * 2;
+ return fp_regnum;
}
static void
@@ -1707,32 +1597,33 @@ sh_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
int base_regnum, portion;
char temp_buffer[MAX_REGISTER_SIZE];
- if (reg_nr >= DR0_REGNUM
- && reg_nr <= DR_LAST_REGNUM)
+ if (reg_nr >= DR0_REGNUM && reg_nr <= DR_LAST_REGNUM)
{
base_regnum = dr_reg_base_num (reg_nr);
- /* Build the value in the provided buffer. */
+ /* Build the value in the provided buffer. */
/* Read the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_raw_read (regcache, base_regnum + portion,
+ regcache_raw_read (regcache, base_regnum + portion,
(temp_buffer
- + register_size (gdbarch, base_regnum) * portion));
+ + register_size (gdbarch,
+ base_regnum) * portion));
/* We must pay attention to the endiannes. */
sh_sh4_register_convert_to_virtual (reg_nr,
- gdbarch_register_type (gdbarch, reg_nr),
+ gdbarch_register_type (gdbarch,
+ reg_nr),
temp_buffer, buffer);
}
- else if (reg_nr >= FV0_REGNUM
- && reg_nr <= FV_LAST_REGNUM)
+ else if (reg_nr >= FV0_REGNUM && reg_nr <= FV_LAST_REGNUM)
{
base_regnum = fv_reg_base_num (reg_nr);
/* Read the real regs for which this one is an alias. */
for (portion = 0; portion < 4; portion++)
- regcache_raw_read (regcache, base_regnum + portion,
+ regcache_raw_read (regcache, base_regnum + portion,
((char *) buffer
- + register_size (gdbarch, base_regnum) * portion));
+ + register_size (gdbarch,
+ base_regnum) * portion));
}
}
@@ -1743,23 +1634,22 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
int base_regnum, portion;
char temp_buffer[MAX_REGISTER_SIZE];
- if (reg_nr >= DR0_REGNUM
- && reg_nr <= DR_LAST_REGNUM)
+ if (reg_nr >= DR0_REGNUM && reg_nr <= DR_LAST_REGNUM)
{
base_regnum = dr_reg_base_num (reg_nr);
/* We must pay attention to the endiannes. */
- sh_sh4_register_convert_to_raw (gdbarch_register_type (gdbarch, reg_nr), reg_nr,
- buffer, temp_buffer);
+ sh_sh4_register_convert_to_raw (gdbarch_register_type (gdbarch, reg_nr),
+ reg_nr, buffer, temp_buffer);
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_raw_write (regcache, base_regnum + portion,
+ regcache_raw_write (regcache, base_regnum + portion,
(temp_buffer
- + register_size (gdbarch, base_regnum) * portion));
+ + register_size (gdbarch,
+ base_regnum) * portion));
}
- else if (reg_nr >= FV0_REGNUM
- && reg_nr <= FV_LAST_REGNUM)
+ else if (reg_nr >= FV0_REGNUM && reg_nr <= FV_LAST_REGNUM)
{
base_regnum = fv_reg_base_num (reg_nr);
@@ -1767,7 +1657,8 @@ sh_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
for (portion = 0; portion < 4; portion++)
regcache_raw_write (regcache, base_regnum + portion,
((char *) buffer
- + register_size (gdbarch, base_regnum) * portion));
+ + register_size (gdbarch,
+ base_regnum) * portion));
}
}
@@ -1777,12 +1668,12 @@ do_fv_register_info (struct gdbarch *gdbarch, struct ui_file *file,
int fv_regnum)
{
int first_fp_reg_num = fv_reg_base_num (fv_regnum);
- fprintf_filtered (file, "fv%d\t0x%08x\t0x%08x\t0x%08x\t0x%08x\n",
- fv_regnum - FV0_REGNUM,
- (int) read_register (first_fp_reg_num),
- (int) read_register (first_fp_reg_num + 1),
- (int) read_register (first_fp_reg_num + 2),
- (int) read_register (first_fp_reg_num + 3));
+ fprintf_filtered (file, "fv%d\t0x%08x\t0x%08x\t0x%08x\t0x%08x\n",
+ fv_regnum - FV0_REGNUM,
+ (int) read_register (first_fp_reg_num),
+ (int) read_register (first_fp_reg_num + 1),
+ (int) read_register (first_fp_reg_num + 2),
+ (int) read_register (first_fp_reg_num + 3));
}
/* Double precision registers. */
@@ -1792,8 +1683,8 @@ do_dr_register_info (struct gdbarch *gdbarch, struct ui_file *file,
{
int first_fp_reg_num = dr_reg_base_num (dr_regnum);
- fprintf_filtered (file, "dr%d\t0x%08x%08x\n",
- dr_regnum - DR0_REGNUM,
+ fprintf_filtered (file, "dr%d\t0x%08x%08x\n",
+ dr_regnum - DR0_REGNUM,
(int) read_register (first_fp_reg_num),
(int) read_register (first_fp_reg_num + 1));
}
@@ -1805,11 +1696,9 @@ sh_print_pseudo_register (struct gdbarch *gdbarch, struct ui_file *file,
if (regnum < NUM_REGS || regnum >= NUM_REGS + NUM_PSEUDO_REGS)
internal_error (__FILE__, __LINE__,
"Invalid pseudo register number %d\n", regnum);
- else if (regnum >= DR0_REGNUM
- && regnum <= DR_LAST_REGNUM)
+ else if (regnum >= DR0_REGNUM && regnum <= DR_LAST_REGNUM)
do_dr_register_info (gdbarch, file, regnum);
- else if (regnum >= FV0_REGNUM
- && regnum <= FV_LAST_REGNUM)
+ else if (regnum >= FV0_REGNUM && regnum <= FV_LAST_REGNUM)
do_fv_register_info (gdbarch, file, regnum);
}
@@ -1817,7 +1706,7 @@ static void
sh_do_fp_register (struct gdbarch *gdbarch, struct ui_file *file, int regnum)
{ /* do values for FP (float) regs */
char *raw_buffer;
- double flt; /* double extracted from raw hex data */
+ double flt; /* double extracted from raw hex data */
int inv;
int j;
@@ -1828,7 +1717,7 @@ sh_do_fp_register (struct gdbarch *gdbarch, struct ui_file *file, int regnum)
if (!frame_register_read (get_selected_frame (), regnum, raw_buffer))
error ("can't read register %d (%s)", regnum, REGISTER_NAME (regnum));
- /* Get the register as a number */
+ /* Get the register as a number */
flt = unpack_double (builtin_type_float, raw_buffer, &inv);
/* Print the name and some spaces. */
@@ -1845,8 +1734,9 @@ sh_do_fp_register (struct gdbarch *gdbarch, struct ui_file *file, int regnum)
fprintf_filtered (file, "\t(raw 0x");
for (j = 0; j < register_size (gdbarch, regnum); j++)
{
- int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
- : register_size (gdbarch, regnum) - 1 - j;
+ int idx = (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
+ ? j
+ : register_size (gdbarch, regnum) - 1 - j);
fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
}
fprintf_filtered (file, ")");
@@ -1864,7 +1754,7 @@ sh_do_register (struct gdbarch *gdbarch, struct ui_file *file, int regnum)
/* Get the data in raw format. */
if (!frame_register_read (get_selected_frame (), regnum, raw_buffer))
fprintf_filtered (file, "*value not available*\n");
-
+
val_print (gdbarch_register_type (gdbarch, regnum), raw_buffer, 0, 0,
file, 'x', 1, 0, Val_pretty_default);
fprintf_filtered (file, "\t");
@@ -1882,7 +1772,8 @@ sh_print_register (struct gdbarch *gdbarch, struct ui_file *file, int regnum)
else if (regnum >= 0 && regnum < NUM_REGS)
{
- if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) == TYPE_CODE_FLT)
+ if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) ==
+ TYPE_CODE_FLT)
sh_do_fp_register (gdbarch, file, regnum); /* FP regs */
else
sh_do_register (gdbarch, file, regnum); /* All other regs */
@@ -1915,18 +1806,19 @@ sh_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
processor, so don't display anything. */
if (REGISTER_NAME (regnum) == NULL
|| *(REGISTER_NAME (regnum)) == '\0')
- {
+ {
regnum++;
continue;
}
- if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) == TYPE_CODE_FLT)
+ if (TYPE_CODE (gdbarch_register_type (gdbarch, regnum)) ==
+ TYPE_CODE_FLT)
{
if (fpregs)
{
/* true for "INFO ALL-REGISTERS" command */
sh_do_fp_register (gdbarch, file, regnum); /* FP regs */
- regnum ++;
+ regnum++;
}
else
regnum += (FP_LAST_REGNUM - FP0_REGNUM); /* skip FP regs */
@@ -1970,24 +1862,24 @@ sh_linux_svr4_fetch_link_map_offsets (void)
lmo.r_debug_size = 8; /* 20 not actual size but all we need */
lmo.r_map_offset = 4;
- lmo.r_map_size = 4;
+ lmo.r_map_size = 4;
lmo.link_map_size = 20; /* 552 not actual size but all we need */
lmo.l_addr_offset = 0;
- lmo.l_addr_size = 4;
+ lmo.l_addr_size = 4;
lmo.l_name_offset = 4;
- lmo.l_name_size = 4;
+ lmo.l_name_size = 4;
lmo.l_next_offset = 12;
- lmo.l_next_size = 4;
+ lmo.l_next_size = 4;
lmo.l_prev_offset = 16;
- lmo.l_prev_size = 4;
+ lmo.l_prev_size = 4;
}
- return lmp;
+ return lmp;
}
#endif /* SVR4_SHARED_LIBS */
@@ -2008,7 +1900,261 @@ sh_dsp_register_sim_regno (int nr)
return nr - R0_BANK_REGNUM + SIM_SH_R0_BANK_REGNUM;
return nr;
}
-
+
+static struct sh_frame_cache *
+sh_alloc_frame_cache (void)
+{
+ struct sh_frame_cache *cache;
+ int i;
+
+ cache = FRAME_OBSTACK_ZALLOC (struct sh_frame_cache);
+
+ /* Base address. */
+ cache->base = 0;
+ cache->saved_sp = 0;
+ cache->sp_offset = 0;
+ cache->pc = 0;
+
+ /* Frameless until proven otherwise. */
+ cache->uses_fp = 0;
+
+ /* Saved registers. We initialize these to -1 since zero is a valid
+ offset (that's where fp is supposed to be stored). */
+ for (i = 0; i < SH_NUM_REGS; i++)
+ {
+ cache->saved_regs[i] = -1;
+ }
+
+ return cache;
+}
+
+static struct sh_frame_cache *
+sh_frame_cache (struct frame_info *next_frame, void **this_cache)
+{
+ struct sh_frame_cache *cache;
+ CORE_ADDR current_pc;
+ int i;
+
+ if (*this_cache)
+ return *this_cache;
+
+ cache = sh_alloc_frame_cache ();
+ *this_cache = cache;
+
+ /* In principle, for normal frames, fp holds the frame pointer,
+ which holds the base address for the current stack frame.
+ However, for functions that don't need it, the frame pointer is
+ optional. For these "frameless" functions the frame pointer is
+ actually the frame pointer of the calling frame. */
+ cache->base = frame_unwind_register_unsigned (next_frame, FP_REGNUM);
+ if (cache->base == 0)
+ return cache;
+
+ cache->pc = frame_func_unwind (next_frame);
+ current_pc = frame_pc_unwind (next_frame);
+ if (cache->pc != 0)
+ sh_analyze_prologue (cache->pc, current_pc, cache);
+
+ if (!cache->uses_fp)
+ {
+ /* We didn't find a valid frame, which means that CACHE->base
+ currently holds the frame pointer for our calling frame. If
+ we're at the start of a function, or somewhere half-way its
+ prologue, the function's frame probably hasn't been fully
+ setup yet. Try to reconstruct the base address for the stack
+ frame by looking at the stack pointer. For truly "frameless"
+ functions this might work too. */
+ cache->base = frame_unwind_register_unsigned (next_frame, SP_REGNUM);
+ }
+
+ /* Now that we have the base address for the stack frame we can
+ calculate the value of sp in the calling frame. */
+ cache->saved_sp = cache->base + cache->sp_offset;
+
+ /* Adjust all the saved registers such that they contain addresses
+ instead of offsets. */
+ for (i = 0; i < SH_NUM_REGS; i++)
+ if (cache->saved_regs[i] != -1)
+ cache->saved_regs[i] = cache->saved_sp - cache->saved_regs[i] - 4;
+
+ return cache;
+}
+
+static void
+sh_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 sh_frame_cache *cache = sh_frame_cache (next_frame, this_cache);
+
+ gdb_assert (regnum >= 0);
+
+ if (regnum == SP_REGNUM && cache->saved_sp)
+ {
+ *optimizedp = 0;
+ *lvalp = not_lval;
+ *addrp = 0;
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Store the value. */
+ store_unsigned_integer (valuep, 4, cache->saved_sp);
+ }
+ return;
+ }
+
+ /* The PC of the previous frame is stored in the PR register of
+ the current frame. Frob regnum so that we pull the value from
+ the correct place. */
+ if (regnum == PC_REGNUM)
+ regnum = PR_REGNUM;
+
+ if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1)
+ {
+ *optimizedp = 0;
+ *lvalp = lval_memory;
+ *addrp = cache->saved_regs[regnum];
+ *realnump = -1;
+ if (valuep)
+ {
+ /* Read the value in from memory. */
+ read_memory (*addrp, valuep,
+ register_size (current_gdbarch, regnum));
+ }
+ return;
+ }
+
+ frame_register_unwind (next_frame, regnum,
+ optimizedp, lvalp, addrp, realnump, valuep);
+}
+
+static void
+sh_frame_this_id (struct frame_info *next_frame, void **this_cache,
+ struct frame_id *this_id)
+{
+ struct sh_frame_cache *cache = sh_frame_cache (next_frame, this_cache);
+
+ /* This marks the outermost frame. */
+ if (cache->base == 0)
+ return;
+
+ *this_id = frame_id_build (cache->saved_sp, cache->pc);
+}
+
+static const struct frame_unwind sh_frame_unwind = {
+ NORMAL_FRAME,
+ sh_frame_this_id,
+ sh_frame_prev_register
+};
+
+static const struct frame_unwind *
+sh_frame_sniffer (struct frame_info *next_frame)
+{
+ return &sh_frame_unwind;
+}
+
+static CORE_ADDR
+sh_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ return frame_unwind_register_unsigned (next_frame, SP_REGNUM);
+}
+
+static CORE_ADDR
+sh_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ return frame_unwind_register_unsigned (next_frame, PC_REGNUM);
+}
+
+static struct frame_id
+sh_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *next_frame)
+{
+ return frame_id_build (sh_unwind_sp (gdbarch, next_frame),
+ frame_pc_unwind (next_frame));
+}
+
+static CORE_ADDR
+sh_frame_base_address (struct frame_info *next_frame, void **this_cache)
+{
+ struct sh_frame_cache *cache = sh_frame_cache (next_frame, this_cache);
+
+ return cache->base;
+}
+
+static const struct frame_base sh_frame_base = {
+ &sh_frame_unwind,
+ sh_frame_base_address,
+ sh_frame_base_address,
+ sh_frame_base_address
+};
+
+/* The epilogue is defined here as the area at the end of a function,
+ either on the `ret' instruction itself or after an instruction which
+ destroys the function's stack frame. */
+static int
+sh_in_function_epilogue_p (struct gdbarch *gdbarch, CORE_ADDR pc)
+{
+ CORE_ADDR func_addr = 0, func_end = 0;
+
+ if (find_pc_partial_function (pc, NULL, &func_addr, &func_end))
+ {
+ ULONGEST inst;
+ /* The sh epilogue is max. 14 bytes long. Give another 14 bytes
+ for a nop and some fixed data (e.g. big offsets) which are
+ unfortunately also treated as part of the function (which
+ means, they are below func_end. */
+ CORE_ADDR addr = func_end - 28;
+ if (addr < func_addr + 4)
+ addr = func_addr + 4;
+ if (pc < addr)
+ return 0;
+
+ /* First search forward until hitting an rts. */
+ while (addr < func_end
+ && !IS_RTS (read_memory_unsigned_integer (addr, 2)))
+ addr += 2;
+ if (addr >= func_end)
+ return 0;
+
+ /* At this point we should find a mov.l @r15+,r14 instruction,
+ either before or after the rts. If not, then the function has
+ probably no "normal" epilogue and we bail out here. */
+ inst = read_memory_unsigned_integer (addr - 2, 2);
+ if (IS_RESTORE_FP (read_memory_unsigned_integer (addr - 2, 2)))
+ addr -= 2;
+ else if (!IS_RESTORE_FP (read_memory_unsigned_integer (addr + 2, 2)))
+ return 0;
+
+ /* Step over possible lds.l @r15+,pr. */
+ inst = read_memory_unsigned_integer (addr - 2, 2);
+ if (IS_LDS (inst))
+ {
+ addr -= 2;
+ inst = read_memory_unsigned_integer (addr - 2, 2);
+ }
+
+ /* Step over possible mov r14,r15. */
+ if (IS_MOV_FP_SP (inst))
+ {
+ addr -= 2;
+ inst = read_memory_unsigned_integer (addr - 2, 2);
+ }
+
+ /* Now check for FP adjustments, using add #imm,r14 or add rX, r14
+ instructions. */
+ while (addr > func_addr + 4
+ && (IS_ADD_REG_TO_FP (inst) || IS_ADD_IMM_FP (inst)))
+ {
+ addr -= 2;
+ inst = read_memory_unsigned_integer (addr - 2, 2);
+ }
+
+ if (pc >= addr)
+ return 1;
+ }
+ return 0;
+}
+
static gdbarch_init_ftype sh_gdbarch_init;
static struct gdbarch *
@@ -2019,33 +2165,40 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
sh_show_regs = sh_generic_show_regs;
switch (info.bfd_arch_info->mach)
{
- case bfd_mach_sh2e:
- sh_show_regs = sh2e_show_regs;
- break;
- case bfd_mach_sh_dsp:
- sh_show_regs = sh_dsp_show_regs;
- break;
-
- case bfd_mach_sh3:
- sh_show_regs = sh3_show_regs;
- break;
-
- case bfd_mach_sh3e:
- sh_show_regs = sh3e_show_regs;
- break;
-
- case bfd_mach_sh3_dsp:
- sh_show_regs = sh3_dsp_show_regs;
- break;
-
- case bfd_mach_sh4:
- sh_show_regs = sh4_show_regs;
- break;
-
- case bfd_mach_sh5:
- sh_show_regs = sh64_show_regs;
- /* SH5 is handled entirely in sh64-tdep.c */
- return sh64_gdbarch_init (info, arches);
+ case bfd_mach_sh2e:
+ sh_show_regs = sh2e_show_regs;
+ break;
+ case bfd_mach_sh_dsp:
+ sh_show_regs = sh_dsp_show_regs;
+ break;
+
+ case bfd_mach_sh3:
+ sh_show_regs = sh3_show_regs;
+ break;
+
+ case bfd_mach_sh3e:
+ sh_show_regs = sh3e_show_regs;
+ break;
+
+ case bfd_mach_sh3_dsp:
+ case bfd_mach_sh4al_dsp:
+ sh_show_regs = sh3_dsp_show_regs;
+ break;
+
+ case bfd_mach_sh4:
+ case bfd_mach_sh4a:
+ sh_show_regs = sh4_show_regs;
+ break;
+
+ case bfd_mach_sh4_nofpu:
+ case bfd_mach_sh4a_nofpu:
+ sh_show_regs = sh4_nofpu_show_regs;
+ break;
+
+ case bfd_mach_sh5:
+ sh_show_regs = sh64_show_regs;
+ /* SH5 is handled entirely in sh64-tdep.c */
+ return sh64_gdbarch_init (info, arches);
}
/* If there is already a candidate, use it. */
@@ -2057,10 +2210,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
provided. */
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, init_frame_pc_default);
-
set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
@@ -2072,11 +2221,14 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_num_regs (gdbarch, SH_NUM_REGS);
set_gdbarch_sp_regnum (gdbarch, 15);
- set_gdbarch_deprecated_fp_regnum (gdbarch, 14);
set_gdbarch_pc_regnum (gdbarch, 16);
set_gdbarch_fp0_regnum (gdbarch, -1);
set_gdbarch_num_pseudo_regs (gdbarch, 0);
+ set_gdbarch_register_type (gdbarch, sh_default_register_type);
+
+ 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);
@@ -2085,160 +2237,126 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_write_pc (gdbarch, generic_target_write_pc);
+ set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
+ set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
+ set_gdbarch_extract_struct_value_address (gdbarch,
+ sh_extract_struct_value_address);
+
set_gdbarch_skip_prologue (gdbarch, sh_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_function_start_offset (gdbarch, 0);
+ set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_nofpu);
+
set_gdbarch_frame_args_skip (gdbarch, 0);
- set_gdbarch_frameless_function_invocation (gdbarch, frameless_look_for_prologue);
+ set_gdbarch_frameless_function_invocation (gdbarch,
+ frameless_look_for_prologue);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
- set_gdbarch_deprecated_frame_chain (gdbarch, sh_frame_chain);
- set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
- set_gdbarch_deprecated_init_extra_frame_info (gdbarch, sh_init_extra_frame_info);
- set_gdbarch_deprecated_pop_frame (gdbarch, sh_pop_frame);
- set_gdbarch_deprecated_frame_saved_pc (gdbarch, sh_frame_saved_pc);
- set_gdbarch_deprecated_saved_pc_after_call (gdbarch, sh_saved_pc_after_call);
set_gdbarch_frame_align (gdbarch, sh_frame_align);
+ set_gdbarch_unwind_sp (gdbarch, sh_unwind_sp);
+ set_gdbarch_unwind_pc (gdbarch, sh_unwind_pc);
+ set_gdbarch_unwind_dummy_id (gdbarch, sh_unwind_dummy_id);
+ frame_base_set_default (gdbarch, &sh_frame_base);
+
+ set_gdbarch_in_function_epilogue_p (gdbarch, sh_in_function_epilogue_p);
switch (info.bfd_arch_info->mach)
{
case bfd_mach_sh:
set_gdbarch_register_name (gdbarch, sh_sh_register_name);
- set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
- set_gdbarch_register_type (gdbarch, sh_default_register_type);
- set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
- set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
- set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
- set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_nofpu);
- set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
-
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
break;
+
case bfd_mach_sh2:
set_gdbarch_register_name (gdbarch, sh_sh_register_name);
- set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
- set_gdbarch_register_type (gdbarch, sh_default_register_type);
- set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
- set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
- set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
- set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_nofpu);
- set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
-
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
- break;
+ break;
+
case bfd_mach_sh2e:
/* doubles on sh2e and sh3e are actually 4 byte. */
set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_register_name (gdbarch, sh_sh2e_register_name);
- set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
set_gdbarch_register_type (gdbarch, sh_sh3e_register_type);
- set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
set_gdbarch_fp0_regnum (gdbarch, 25);
set_gdbarch_store_return_value (gdbarch, sh3e_sh4_store_return_value);
- set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
+ set_gdbarch_extract_return_value (gdbarch,
+ sh3e_sh4_extract_return_value);
set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_fpu);
- set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
-
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
break;
+
case bfd_mach_sh_dsp:
set_gdbarch_register_name (gdbarch, sh_sh_dsp_register_name);
- set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
- set_gdbarch_register_type (gdbarch, sh_default_register_type);
- set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
set_gdbarch_register_sim_regno (gdbarch, sh_dsp_register_sim_regno);
- set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
- set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
- set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_nofpu);
- set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
-
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
break;
+
case bfd_mach_sh3:
set_gdbarch_register_name (gdbarch, sh_sh3_register_name);
- set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
- set_gdbarch_register_type (gdbarch, sh_default_register_type);
- set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
- set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
- set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
- set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_nofpu);
- set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
-
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
break;
+
case bfd_mach_sh3e:
/* doubles on sh2e and sh3e are actually 4 byte. */
set_gdbarch_double_bit (gdbarch, 4 * TARGET_CHAR_BIT);
set_gdbarch_register_name (gdbarch, sh_sh3e_register_name);
- set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
set_gdbarch_register_type (gdbarch, sh_sh3e_register_type);
- set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
set_gdbarch_fp0_regnum (gdbarch, 25);
set_gdbarch_store_return_value (gdbarch, sh3e_sh4_store_return_value);
- set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
+ set_gdbarch_extract_return_value (gdbarch,
+ sh3e_sh4_extract_return_value);
set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_fpu);
- set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
-
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs);
break;
+
case bfd_mach_sh3_dsp:
set_gdbarch_register_name (gdbarch, sh_sh3_dsp_register_name);
- set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
- set_gdbarch_register_type (gdbarch, sh_default_register_type);
- set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
set_gdbarch_register_sim_regno (gdbarch, sh_dsp_register_sim_regno);
- set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
- set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
- set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_nofpu);
- set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
-
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
break;
+
case bfd_mach_sh4:
+ case bfd_mach_sh4a:
set_gdbarch_register_name (gdbarch, sh_sh4_register_name);
- set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
set_gdbarch_register_type (gdbarch, sh_sh4_register_type);
- set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
set_gdbarch_fp0_regnum (gdbarch, 25);
set_gdbarch_num_pseudo_regs (gdbarch, 12);
set_gdbarch_pseudo_register_read (gdbarch, sh_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch, sh_pseudo_register_write);
set_gdbarch_store_return_value (gdbarch, sh3e_sh4_store_return_value);
- set_gdbarch_extract_return_value (gdbarch, sh3e_sh4_extract_return_value);
+ set_gdbarch_extract_return_value (gdbarch,
+ sh3e_sh4_extract_return_value);
set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_fpu);
- set_gdbarch_extract_struct_value_address (gdbarch, sh_extract_struct_value_address);
+ break;
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_fp_frame_init_saved_regs);
+ case bfd_mach_sh4_nofpu:
+ case bfd_mach_sh4a_nofpu:
+ set_gdbarch_register_name (gdbarch, sh_sh4_nofpu_register_name);
+ break;
+
+ case bfd_mach_sh4al_dsp:
+ set_gdbarch_register_name (gdbarch, sh_sh4al_dsp_register_name);
+ set_gdbarch_register_sim_regno (gdbarch, sh_dsp_register_sim_regno);
break;
+
default:
set_gdbarch_register_name (gdbarch, sh_generic_register_name);
- set_gdbarch_print_registers_info (gdbarch, sh_print_registers_info);
- set_gdbarch_register_type (gdbarch, sh_default_register_type);
- set_gdbarch_push_dummy_code (gdbarch, sh_push_dummy_code);
- set_gdbarch_store_return_value (gdbarch, sh_default_store_return_value);
- set_gdbarch_extract_return_value (gdbarch, sh_default_extract_return_value);
-
- set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, sh_nofp_frame_init_saved_regs);
break;
}
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
+ frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
+ frame_unwind_append_sniffer (gdbarch, sh_frame_sniffer);
+
return gdbarch;
}
-extern initialize_file_ftype _initialize_sh_tdep; /* -Wmissing-prototypes */
+extern initialize_file_ftype _initialize_sh_tdep; /* -Wmissing-prototypes */
void
_initialize_sh_tdep (void)
{
struct cmd_list_element *c;
-
+
gdbarch_register (bfd_arch_sh, sh_gdbarch_init, NULL);
add_com ("regs", class_vars, sh_show_regs_command, "Print all registers");
diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h
index e609b52..9c84c67 100644
--- a/gdb/sh-tdep.h
+++ b/gdb/sh-tdep.h
@@ -1,4 +1,4 @@
-/* Target-specific definition for a Hitachi Super-H.
+/* Target-specific definition for a Renesas Super-H.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
diff --git a/gdb/sh3-rom.c b/gdb/sh3-rom.c
index a2e21c1..cec9fba 100644
--- a/gdb/sh3-rom.c
+++ b/gdb/sh3-rom.c
@@ -1,4 +1,4 @@
-/* Remote target glue for the Hitachi SH-3 ROM monitor.
+/* Remote target glue for the Renesas SH-3 ROM monitor.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
@@ -365,11 +365,11 @@ _initialize_sh3_rom (void)
init_monitor_ops (&sh3_ops);
sh3_ops.to_shortname = "sh3";
- sh3_ops.to_longname = "Hitachi SH-3 rom monitor";
+ sh3_ops.to_longname = "Renesas SH-3 rom monitor";
sh3_ops.to_doc =
/* We can download through the parallel port too. */
- "Debug on a Hitachi eval board running the SH-3E rom monitor.\n"
+ "Debug on a Renesas eval board running the SH-3E rom monitor.\n"
"Specify the serial device it is connected to.\n"
"If you want to use the parallel port to download to it, specify that\n"
"as an additional second argument.";
@@ -384,11 +384,11 @@ _initialize_sh3_rom (void)
init_monitor_ops (&sh3e_ops);
sh3e_ops.to_shortname = "sh3e";
- sh3e_ops.to_longname = "Hitachi SH-3E rom monitor";
+ sh3e_ops.to_longname = "Renesas SH-3E rom monitor";
sh3e_ops.to_doc =
/* We can download through the parallel port too. */
- "Debug on a Hitachi eval board running the SH-3E rom monitor.\n"
+ "Debug on a Renesas eval board running the SH-3E rom monitor.\n"
"Specify the serial device it is connected to.\n"
"If you want to use the parallel port to download to it, specify that\n"
"as an additional second argument.";
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index 99372b8..ca87b8e 100644
--- a/gdb/sh64-tdep.c
+++ b/gdb/sh64-tdep.c
@@ -1,4 +1,4 @@
-/* Target-dependent code for Hitachi Super-H, for GDB.
+/* Target-dependent code for Renesas Super-H, for GDB.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
@@ -753,7 +753,7 @@ sh64_frame_chain (struct frame_info *frame)
if (gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32)
size = 4;
else
- size = REGISTER_RAW_SIZE (translate_insn_rn (DEPRECATED_FP_REGNUM, media_mode));
+ size = DEPRECATED_REGISTER_RAW_SIZE (translate_insn_rn (DEPRECATED_FP_REGNUM, media_mode));
return read_memory_integer (get_frame_base (frame)
+ get_frame_extra_info (frame)->f_offset,
size);
@@ -782,13 +782,13 @@ sh64_get_saved_pr (struct frame_info *fi, int pr_regnum)
media_mode = pc_is_isa32 (get_frame_pc (fi));
- if (get_frame_saved_regs (fi)[pr_regnum] != 0)
+ if (deprecated_get_frame_saved_regs (fi)[pr_regnum] != 0)
{
int gdb_reg_num = translate_insn_rn (pr_regnum, media_mode);
int size = ((gdbarch_tdep (current_gdbarch)->sh_abi == SH_ABI_32)
? 4
- : REGISTER_RAW_SIZE (gdb_reg_num));
- return read_memory_integer (get_frame_saved_regs (fi)[pr_regnum], size);
+ : DEPRECATED_REGISTER_RAW_SIZE (gdb_reg_num));
+ return read_memory_integer (deprecated_get_frame_saved_regs (fi)[pr_regnum], size);
}
}
return read_register (pr_regnum);
@@ -1027,17 +1027,17 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
char *dummy_regs = deprecated_generic_find_dummy_frame (get_frame_pc (fi), get_frame_base (fi));
struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
- if (get_frame_saved_regs (fi) == NULL)
+ if (deprecated_get_frame_saved_regs (fi) == NULL)
frame_saved_regs_zalloc (fi);
else
- memset (get_frame_saved_regs (fi), 0, SIZEOF_FRAME_SAVED_REGS);
+ memset (deprecated_get_frame_saved_regs (fi), 0, SIZEOF_FRAME_SAVED_REGS);
if (dummy_regs)
{
/* DANGER! This is ONLY going to work if the char buffer format of
the saved registers is byte-for-byte identical to the
CORE_ADDR regs[NUM_REGS] format used by struct frame_saved_regs! */
- memcpy (get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
+ memcpy (deprecated_get_frame_saved_regs (fi), dummy_regs, SIZEOF_FRAME_SAVED_REGS);
return;
}
@@ -1185,11 +1185,11 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
/* Watch out! saved_regs is only for the real registers, and
doesn't include space for the pseudo registers. */
- get_frame_saved_regs (fi)[register_number]= get_frame_base (fi) - where[rn] + depth;
+ deprecated_get_frame_saved_regs (fi)[register_number]= get_frame_base (fi) - where[rn] + depth;
}
else
- get_frame_saved_regs (fi)[register_number] = 0;
+ deprecated_get_frame_saved_regs (fi)[register_number] = 0;
}
if (have_fp)
@@ -1205,11 +1205,11 @@ sh64_nofp_frame_init_saved_regs (struct frame_info *fi)
if (tdep->sh_abi == SH_ABI_32)
size = 4;
else
- size = REGISTER_RAW_SIZE (fp_regnum);
- get_frame_saved_regs (fi)[sp_regnum] = read_memory_integer (get_frame_saved_regs (fi)[fp_regnum], size);
+ size = DEPRECATED_REGISTER_RAW_SIZE (fp_regnum);
+ deprecated_get_frame_saved_regs (fi)[sp_regnum] = read_memory_integer (deprecated_get_frame_saved_regs (fi)[fp_regnum], size);
}
else
- get_frame_saved_regs (fi)[sp_regnum] = get_frame_base (fi);
+ deprecated_get_frame_saved_regs (fi)[sp_regnum] = get_frame_base (fi);
get_frame_extra_info (fi)->f_offset = depth - where[fp_regnum];
}
@@ -1293,27 +1293,27 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
memcpy (raw_buffer,
(deprecated_generic_find_dummy_frame (get_frame_pc (frame), get_frame_base (frame))
+ DEPRECATED_REGISTER_BYTE (regnum)),
- REGISTER_RAW_SIZE (regnum));
+ DEPRECATED_REGISTER_RAW_SIZE (regnum));
return;
}
DEPRECATED_FRAME_INIT_SAVED_REGS (frame);
- if (get_frame_saved_regs (frame) != NULL
- && get_frame_saved_regs (frame)[regnum] != 0)
+ 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 */
- store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum),
- get_frame_saved_regs (frame)[regnum]);
+ store_unsigned_integer (raw_buffer, DEPRECATED_REGISTER_RAW_SIZE (regnum),
+ deprecated_get_frame_saved_regs (frame)[regnum]);
}
else
{ /* any other register */
if (addrp)
- *addrp = get_frame_saved_regs (frame)[regnum];
+ *addrp = deprecated_get_frame_saved_regs (frame)[regnum];
if (raw_buffer)
{
int size;
@@ -1322,13 +1322,13 @@ sh64_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
|| live_regnum == PR_REGNUM))
size = 4;
else
- size = REGISTER_RAW_SIZE (live_regnum);
+ size = DEPRECATED_REGISTER_RAW_SIZE (live_regnum);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
- read_memory (get_frame_saved_regs (frame)[regnum], raw_buffer, size);
+ read_memory (deprecated_get_frame_saved_regs (frame)[regnum], raw_buffer, size);
else
- read_memory (get_frame_saved_regs (frame)[regnum],
+ read_memory (deprecated_get_frame_saved_regs (frame)[regnum],
raw_buffer
- + REGISTER_RAW_SIZE (live_regnum)
+ + DEPRECATED_REGISTER_RAW_SIZE (live_regnum)
- size,
size);
}
@@ -1352,7 +1352,7 @@ static CORE_ADDR
sh64_extract_struct_value_address (char *regbuf)
{
return (extract_unsigned_integer ((regbuf + DEPRECATED_REGISTER_BYTE (STRUCT_RETURN_REGNUM)),
- REGISTER_RAW_SIZE (STRUCT_RETURN_REGNUM)));
+ DEPRECATED_REGISTER_RAW_SIZE (STRUCT_RETURN_REGNUM)));
}
static CORE_ADDR
@@ -1384,7 +1384,7 @@ sh64_pop_frame (void)
/* Copy regs from where they were saved in the frame */
for (regnum = 0; regnum < NUM_REGS + NUM_PSEUDO_REGS; regnum++)
- if (get_frame_saved_regs (frame)[regnum])
+ if (deprecated_get_frame_saved_regs (frame)[regnum])
{
int size;
if (tdep->sh_abi == SH_ABI_32
@@ -1392,10 +1392,10 @@ sh64_pop_frame (void)
|| regnum == PR_REGNUM))
size = 4;
else
- size = REGISTER_RAW_SIZE (translate_insn_rn (regnum,
+ size = DEPRECATED_REGISTER_RAW_SIZE (translate_insn_rn (regnum,
media_mode));
write_register (regnum,
- read_memory_integer (get_frame_saved_regs (frame)[regnum],
+ read_memory_integer (deprecated_get_frame_saved_regs (frame)[regnum],
size));
}
@@ -1414,7 +1414,7 @@ sh_frame_align (struct gdbarch *ignore, CORE_ADDR sp)
/* Function: push_arguments
Setup the function arguments for calling a function in the inferior.
- On the Hitachi SH architecture, there are four registers (R4 to R7)
+ On the Renesas SH architecture, there are four registers (R4 to R7)
which are dedicated for passing function arguments. Up to the first
four arguments (depending on size) may go into these registers.
The rest go on the stack.
@@ -1526,7 +1526,7 @@ sh64_push_arguments (int nargs, struct value **args, CORE_ADDR sp,
if (TYPE_CODE (type) != TYPE_CODE_FLT)
{
- argreg_size = REGISTER_RAW_SIZE (int_argreg);
+ argreg_size = DEPRECATED_REGISTER_RAW_SIZE (int_argreg);
if (len < argreg_size)
{
@@ -1702,7 +1702,7 @@ sh64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
return_register = DEFAULT_RETURN_REGNUM;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = DEPRECATED_REGISTER_BYTE (return_register) +
- REGISTER_RAW_SIZE (return_register) - len;
+ DEPRECATED_REGISTER_RAW_SIZE (return_register) - len;
else
offset = DEPRECATED_REGISTER_BYTE (return_register);
memcpy (valbuf, (char *) regbuf + offset, len);
@@ -1743,14 +1743,14 @@ sh64_store_return_value (struct type *type, char *valbuf)
int return_register = DEFAULT_RETURN_REGNUM;
int offset = 0;
- if (len <= REGISTER_RAW_SIZE (return_register))
+ if (len <= DEPRECATED_REGISTER_RAW_SIZE (return_register))
{
/* Pad with zeros. */
- memset (buf, 0, REGISTER_RAW_SIZE (return_register));
+ memset (buf, 0, DEPRECATED_REGISTER_RAW_SIZE (return_register));
if (TARGET_BYTE_ORDER == BFD_ENDIAN_LITTLE)
- offset = 0; /*REGISTER_RAW_SIZE (return_register) - len;*/
+ offset = 0; /*DEPRECATED_REGISTER_RAW_SIZE (return_register) - len;*/
else
- offset = REGISTER_RAW_SIZE (return_register) - len;
+ offset = DEPRECATED_REGISTER_RAW_SIZE (return_register) - len;
memcpy (buf + offset, valbuf, len);
deprecated_write_register_gen (return_register, buf);
@@ -2092,7 +2092,7 @@ sh_sh64_register_convert_to_virtual (int regnum, struct type *type,
if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
{
/* It is a no-op. */
- memcpy (to, from, REGISTER_RAW_SIZE (regnum));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regnum));
return;
}
@@ -2118,7 +2118,7 @@ sh_sh64_register_convert_to_raw (struct type *type, int regnum,
if (TARGET_BYTE_ORDER != BFD_ENDIAN_LITTLE)
{
/* It is a no-op. */
- memcpy (to, from, REGISTER_RAW_SIZE (regnum));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regnum));
return;
}
@@ -2155,10 +2155,10 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
for (portion = 0; portion < 2; portion++)
regcache_raw_read (regcache, base_regnum + portion,
(temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
/* We must pay attention to the endiannes. */
- sh_sh64_register_convert_to_virtual (reg_nr, REGISTER_VIRTUAL_TYPE (reg_nr),
+ sh_sh64_register_convert_to_virtual (reg_nr, DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr),
temp_buffer, buffer);
}
@@ -2174,7 +2174,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
for (portion = 0; portion < 2; portion++)
regcache_raw_read (regcache, base_regnum + portion,
((char *) buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= FV0_REGNUM
@@ -2188,7 +2188,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
for (portion = 0; portion < 4; portion++)
regcache_raw_read (regcache, base_regnum + portion,
((char *) buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
}
/* sh compact pseudo registers. 1-to-1 with a shmedia register */
@@ -2225,10 +2225,10 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
for (portion = 0; portion < 2; portion++)
regcache_raw_read (regcache, base_regnum + portion,
(temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
/* We must pay attention to the endiannes. */
- sh_sh64_register_convert_to_virtual (reg_nr, REGISTER_VIRTUAL_TYPE (reg_nr),
+ sh_sh64_register_convert_to_virtual (reg_nr, DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr),
temp_buffer, buffer);
}
@@ -2243,7 +2243,7 @@ sh64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
for (portion = 0; portion < 4; portion++)
regcache_raw_read (regcache, base_regnum + portion,
((char *) buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr == FPSCR_C_REGNUM)
@@ -2314,7 +2314,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
{
base_regnum = dr_reg_base_num (reg_nr);
/* We must pay attention to the endiannes. */
- sh_sh64_register_convert_to_raw (REGISTER_VIRTUAL_TYPE (reg_nr), reg_nr,
+ sh_sh64_register_convert_to_raw (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr), reg_nr,
buffer, temp_buffer);
@@ -2322,7 +2322,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
for (portion = 0; portion < 2; portion++)
regcache_raw_write (regcache, base_regnum + portion,
(temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= FPP0_REGNUM
@@ -2334,7 +2334,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
for (portion = 0; portion < 2; portion++)
regcache_raw_write (regcache, base_regnum + portion,
((char *) buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= FV0_REGNUM
@@ -2346,7 +2346,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
for (portion = 0; portion < 4; portion++)
regcache_raw_write (regcache, base_regnum + portion,
((char *) buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
}
/* sh compact general pseudo registers. 1-to-1 with a shmedia
@@ -2385,12 +2385,12 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
for (portion = 0; portion < 2; portion++)
{
/* We must pay attention to the endiannes. */
- sh_sh64_register_convert_to_raw (REGISTER_VIRTUAL_TYPE (reg_nr), reg_nr,
+ sh_sh64_register_convert_to_raw (DEPRECATED_REGISTER_VIRTUAL_TYPE (reg_nr), reg_nr,
buffer, temp_buffer);
regcache_raw_write (regcache, base_regnum + portion,
(temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
}
}
@@ -2403,7 +2403,7 @@ sh64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
{
regcache_raw_write (regcache, base_regnum + portion,
((char *) buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ + DEPRECATED_REGISTER_RAW_SIZE (base_regnum) * portion));
}
}
@@ -2848,7 +2848,7 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* NOTE: cagney/2002-12-06: This can be deleted when this arch is
ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
+ set_gdbarch_deprecated_init_frame_pc (gdbarch, deprecated_init_frame_pc_default);
/* Determine the ABI */
if (info.abfd && bfd_get_arch_size (info.abfd) == 64)
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index 4689de6..3a2a649 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -401,8 +401,6 @@ 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. */
-
-/* ARGSUSED */
static void
sol_thread_open (char *arg, int from_tty)
{
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 7fda5e4..48fb6cb 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -1,7 +1,7 @@
/* Handle SVR4 shared libraries for GDB, the GNU Debugger.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
- 2001
- Free Software Foundation, Inc.
+
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
+ 2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of GDB.
@@ -37,6 +37,9 @@
#include "solist.h"
#include "solib-svr4.h"
+#include "bfd-target.h"
+#include "exec.h"
+
#ifndef SVR4_FETCH_LINK_MAP_OFFSETS
#define SVR4_FETCH_LINK_MAP_OFFSETS() svr4_fetch_link_map_offsets ()
#endif
@@ -225,7 +228,7 @@ bfd_lookup_symbol (bfd *abfd, char *symname, flagword sect_flags)
for (i = 0; i < number_of_symbols; i++)
{
sym = *symbol_table++;
- if (STREQ (sym->name, symname)
+ if (strcmp (sym->name, symname) == 0
&& (sym->section->flags & sect_flags) == sect_flags)
{
/* Bfd symbols are section relative. */
@@ -254,7 +257,7 @@ bfd_lookup_symbol (bfd *abfd, char *symname, flagword sect_flags)
{
sym = *symbol_table++;
- if (STREQ (sym->name, symname)
+ if (strcmp (sym->name, symname) == 0
&& (sym->section->flags & sect_flags) == sect_flags)
{
/* Bfd symbols are section relative. */
@@ -422,7 +425,7 @@ look_for_base (int fd, CORE_ADDR baseaddr)
static CORE_ADDR
elf_locate_base (void)
{
- sec_ptr dyninfo_sect;
+ struct bfd_section *dyninfo_sect;
int dyninfo_sect_size;
CORE_ADDR dyninfo_addr;
char *buf;
@@ -911,6 +914,24 @@ svr4_in_dynsym_resolve_code (CORE_ADDR pc)
|| in_plt_section (pc, NULL));
}
+/* Given an executable's ABFD and target, compute the entry-point
+ address. */
+
+static CORE_ADDR
+exec_entry_point (struct bfd *abfd, struct target_ops *targ)
+{
+ /* KevinB wrote ... for most targets, the address returned by
+ bfd_get_start_address() is the entry point for the start
+ function. But, for some targets, bfd_get_start_address() returns
+ the address of a function descriptor from which the entry point
+ address may be extracted. This address is extracted by
+ gdbarch_convert_from_func_ptr_addr(). The method
+ gdbarch_convert_from_func_ptr_addr() is the merely the identify
+ function for targets which don't use function descriptors. */
+ return gdbarch_convert_from_func_ptr_addr (current_gdbarch,
+ bfd_get_start_address (abfd),
+ targ);
+}
/*
@@ -984,6 +1005,7 @@ enable_break (void)
int load_addr_found = 0;
struct so_list *inferior_sos;
bfd *tmp_bfd = NULL;
+ struct target_ops *tmp_bfd_target;
int tmp_fd = -1;
char *tmp_pathname = NULL;
CORE_ADDR sym_addr = 0;
@@ -1019,6 +1041,11 @@ enable_break (void)
goto bkpt_at_symbol;
}
+ /* Now convert the TMP_BFD into a target. That way target, as
+ well as BFD operations can be used. Note that closing the
+ target will also close the underlying bfd. */
+ tmp_bfd_target = target_bfd_reopen (tmp_bfd);
+
/* If the entry in _DYNAMIC for the dynamic linker has already
been filled in, we can read its base address from there. */
inferior_sos = svr4_current_sos ();
@@ -1042,7 +1069,8 @@ enable_break (void)
the current pc (which should point at the entry point for the
dynamic linker) and subtracting the offset of the entry point. */
if (!load_addr_found)
- load_addr = read_pc () - tmp_bfd->start_address;
+ load_addr = (read_pc ()
+ - exec_entry_point (tmp_bfd, tmp_bfd_target));
/* Record the relocated start and end address of the dynamic linker
text and plt section for svr4_in_dynsym_resolve_code. */
@@ -1080,8 +1108,9 @@ enable_break (void)
break;
}
- /* We're done with the temporary bfd. */
- bfd_close (tmp_bfd);
+ /* We're done with both the temporary bfd and target. Remember,
+ closing the target closes the underlying bfd. */
+ target_close (tmp_bfd_target, 0);
if (sym_addr != 0)
{
@@ -1200,7 +1229,7 @@ svr4_relocate_main_executable (void)
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)
+ && (exec_entry_point (exec_bfd, &exec_ops) != pc))
{
struct cleanup *old_chain;
struct section_offsets *new_offsets;
@@ -1232,7 +1261,7 @@ svr4_relocate_main_executable (void)
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);
+ displacement = pc - exec_entry_point (exec_bfd, &exec_ops);
changed = 0;
new_offsets = xcalloc (symfile_objfile->num_sections,
diff --git a/gdb/solib.c b/gdb/solib.c
index f77993c..baabf20 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -40,7 +40,7 @@
#include "gdbcmd.h"
#include "completer.h"
#include "filenames.h" /* for DOSish file names */
-
+#include "exec.h"
#include "solist.h"
#include <readline/readline.h>
@@ -275,7 +275,7 @@ solib_map_sections (void *arg)
object's file by the base address to which the object was actually
mapped. */
TARGET_SO_RELOCATE_SECTION_ADDRESSES (so, p);
- if (STREQ (p->the_bfd_section->name, ".text"))
+ if (strcmp (p->the_bfd_section->name, ".text") == 0)
{
so->textsection = p;
}
diff --git a/gdb/somsolib.c b/gdb/somsolib.c
index ed54ad0..b2a833c 100644
--- a/gdb/somsolib.c
+++ b/gdb/somsolib.c
@@ -42,6 +42,7 @@
#include "language.h"
#include "regcache.h"
#include "gdb_assert.h"
+#include "exec.h"
#include <fcntl.h>
@@ -55,10 +56,6 @@
/* #define SOLIB_DEBUG
*/
-/* Defined in exec.c; used to prevent dangling pointer bug.
- */
-extern struct target_ops exec_ops;
-
/* This lives in hppa-tdep.c. */
extern struct unwind_table_entry *find_unwind_entry (CORE_ADDR pc);
@@ -937,7 +934,7 @@ som_solib_create_inferior_hook (void)
/* What a crock. */
msymbol2 = lookup_minimal_symbol_solib_trampoline (DEPRECATED_SYMBOL_NAME (msymbol),
- NULL, objfile);
+ objfile);
/* Found a symbol with the right name. */
if (msymbol2)
{
@@ -1225,7 +1222,6 @@ som_solib_desire_dynamic_linker_symbols (void)
}
dld_msymbol = lookup_minimal_symbol_solib_trampoline ("shl_load",
- NULL,
objfile);
if (dld_msymbol != NULL)
{
@@ -1265,7 +1261,6 @@ som_solib_desire_dynamic_linker_symbols (void)
}
dld_msymbol = lookup_minimal_symbol_solib_trampoline ("shl_unload",
- NULL,
objfile);
if (dld_msymbol != NULL)
{
diff --git a/gdb/source.c b/gdb/source.c
index e4e5caa..0ed3b3e 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -1347,7 +1347,6 @@ line_info (char *arg, int from_tty)
/* Commands to search the source file for a regexp. */
-/* ARGSUSED */
static void
forward_search_command (char *regex, int from_tty)
{
@@ -1443,7 +1442,6 @@ forward_search_command (char *regex, int from_tty)
fclose (stream);
}
-/* ARGSUSED */
static void
reverse_search_command (char *regex, int from_tty)
{
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index a4df865..a76d0e5 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -103,7 +103,7 @@ fetch_inferior_registers (int regno)
deprecated_registers[DEPRECATED_REGISTER_BYTE (0)] = 0;
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (1)],
- &inferior_registers.r_g1, 15 * REGISTER_RAW_SIZE (G0_REGNUM));
+ &inferior_registers.r_g1, 15 * DEPRECATED_REGISTER_RAW_SIZE (G0_REGNUM));
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)]
= inferior_registers.r_ps;
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)]
@@ -149,7 +149,7 @@ fetch_inferior_registers (int regno)
{
CORE_ADDR sp = *(unsigned int *) & deprecated_registers[DEPRECATED_REGISTER_BYTE (SP_REGNUM)];
target_read_memory (sp, &deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
- 16 * REGISTER_RAW_SIZE (L0_REGNUM));
+ 16 * DEPRECATED_REGISTER_RAW_SIZE (L0_REGNUM));
for (i = L0_REGNUM; i <= I7_REGNUM; i++)
deprecated_register_valid[i] = 1;
}
@@ -160,7 +160,7 @@ fetch_inferior_registers (int regno)
if (deprecated_register_valid[regno])
printf_unfiltered ("register %d valid and read\n", regno);
target_read_memory (sp + i - DEPRECATED_REGISTER_BYTE (L0_REGNUM),
- &deprecated_registers[i], REGISTER_RAW_SIZE (regno));
+ &deprecated_registers[i], DEPRECATED_REGISTER_RAW_SIZE (regno));
deprecated_register_valid[regno] = 1;
}
}
@@ -234,7 +234,7 @@ store_inferior_registers (int regno)
internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
- 16 * REGISTER_RAW_SIZE (L0_REGNUM));
+ 16 * DEPRECATED_REGISTER_RAW_SIZE (L0_REGNUM));
}
else
{
@@ -242,7 +242,7 @@ store_inferior_registers (int regno)
internal_error (__FILE__, __LINE__, "failed internal consistency check");
target_write_memory (sp + DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (L0_REGNUM),
&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno));
+ DEPRECATED_REGISTER_RAW_SIZE (regno));
}
}
@@ -254,7 +254,7 @@ store_inferior_registers (int regno)
memcpy (&inferior_registers.r_g1,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (G1_REGNUM)],
- 15 * REGISTER_RAW_SIZE (G1_REGNUM));
+ 15 * DEPRECATED_REGISTER_RAW_SIZE (G1_REGNUM));
inferior_registers.r_ps =
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)];
@@ -315,7 +315,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
/* The globals and output registers. */
memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE (G1_REGNUM)], &gregs->r_g1,
- 15 * REGISTER_RAW_SIZE (G1_REGNUM));
+ 15 * DEPRECATED_REGISTER_RAW_SIZE (G1_REGNUM));
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PS_REGNUM)] = gregs->r_ps;
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (PC_REGNUM)] = gregs->r_pc;
*(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (DEPRECATED_NPC_REGNUM)] = gregs->r_npc;
@@ -332,7 +332,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
sp = *(int *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (SP_REGNUM)];
if (0 != target_read_memory (sp,
&deprecated_registers[DEPRECATED_REGISTER_BYTE (L0_REGNUM)],
- 16 * REGISTER_RAW_SIZE (L0_REGNUM)))
+ 16 * DEPRECATED_REGISTER_RAW_SIZE (L0_REGNUM)))
{
/* fprintf_unfiltered so user can still use gdb */
fprintf_unfiltered (gdb_stderr,
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 3a81821..c32d302 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -52,10 +52,6 @@
* Some local macros that have multi-arch and non-multi-arch versions:
*/
-#if 0
-// OBSOLETE /* Does the target have Floating Point registers? */
-// OBSOLETE #define SPARC_HAS_FPU (gdbarch_tdep (current_gdbarch)->has_fpu)
-#endif
#define SPARC_HAS_FPU 1
/* Number of bytes devoted to Floating Point registers: */
#define FP_REGISTER_BYTES (gdbarch_tdep (current_gdbarch)->fp_register_bytes)
@@ -68,9 +64,6 @@
struct gdbarch_tdep
{
-#if 0
- // OBSOLETE int has_fpu;
-#endif
int fp_register_bytes;
int y_regnum;
int fp_max_regnum;
@@ -97,15 +90,6 @@ struct gdbarch_tdep
int deferred_stores = 0; /* Accumulated stores we want to do eventually. */
-#if 0
-// OBSOLETE /* Some machines, such as Fujitsu SPARClite 86x, have a bi-endian mode
-// OBSOLETE where instructions are big-endian and data are little-endian.
-// OBSOLETE This flag is set when we detect that the target is of this type. */
-// OBSOLETE
-// OBSOLETE int bi_endian = 0;
-#endif
-
-
const unsigned char *
sparc_breakpoint_from_pc (CORE_ADDR *pc, int *len)
{
@@ -299,7 +283,7 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
{
/* Should we adjust for stack bias here? */
ULONGEST tmp;
- frame_read_unsigned_register (fi, DEPRECATED_FP_REGNUM, &tmp);
+ tmp = get_frame_register_unsigned (fi, DEPRECATED_FP_REGNUM);
deprecated_update_frame_base_hack (fi, tmp);
if (GDB_TARGET_IS_SPARC64 && (get_frame_base (fi) & 1))
deprecated_update_frame_base_hack (fi, get_frame_base (fi) + 2047);
@@ -339,7 +323,7 @@ sparc_init_extra_frame_info (int fromleaf, struct frame_info *fi)
/* Overwrite the frame's address with the value in %i7. */
{
ULONGEST tmp;
- frame_read_unsigned_register (fi, I7_REGNUM, &tmp);
+ tmp = get_frame_register_unsigned (fi, I7_REGNUM);
deprecated_update_frame_base_hack (fi, tmp);
}
@@ -455,7 +439,7 @@ sparc_frame_saved_pc (struct frame_info *frame)
/* The sigcontext address is contained in register O2. */
{
ULONGEST tmp;
- frame_read_unsigned_register (frame, O0_REGNUM + 2, &tmp);
+ tmp = get_frame_register_unsigned (frame, O0_REGNUM + 2);
sigcontext_addr = tmp;
}
@@ -474,7 +458,7 @@ sparc_frame_saved_pc (struct frame_info *frame)
/* A frameless function interrupted by a signal did not save
the PC, it is still in %o7. */
ULONGEST tmp;
- frame_read_unsigned_register (frame, O7_REGNUM, &tmp);
+ tmp = get_frame_register_unsigned (frame, O7_REGNUM);
return PC_ADJUST (tmp);
}
if (get_frame_extra_info (frame)->flat)
@@ -815,7 +799,7 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
if (raw_buffer != NULL)
{
/* Put it back in target format. */
- store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum), get_frame_pc (frame));
+ store_unsigned_integer (raw_buffer, DEPRECATED_REGISTER_RAW_SIZE (regnum), get_frame_pc (frame));
}
if (addrp != NULL)
*addrp = 0;
@@ -923,14 +907,14 @@ sparc_get_saved_register (char *raw_buffer, int *optimized, CORE_ADDR *addrp,
if (raw_buffer != NULL)
{
/* Put it back in target format. */
- store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum), addr);
+ store_unsigned_integer (raw_buffer, DEPRECATED_REGISTER_RAW_SIZE (regnum), addr);
}
if (addrp != NULL)
*addrp = 0;
return;
}
if (raw_buffer != NULL)
- read_memory (addr, raw_buffer, REGISTER_RAW_SIZE (regnum));
+ read_memory (addr, raw_buffer, DEPRECATED_REGISTER_RAW_SIZE (regnum));
}
else
{
@@ -974,10 +958,10 @@ sparc_push_dummy_frame (void)
/* PC, NPC, CCR, FSR, FPRS, Y, ASI */
deprecated_read_register_bytes (DEPRECATED_REGISTER_BYTE (PC_REGNUM),
&register_temp[0],
- REGISTER_RAW_SIZE (PC_REGNUM) * 7);
+ DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM) * 7);
deprecated_read_register_bytes (DEPRECATED_REGISTER_BYTE (PSTATE_REGNUM),
&register_temp[7 * SPARC_INTREG_SIZE],
- REGISTER_RAW_SIZE (PSTATE_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (PSTATE_REGNUM));
/* FIXME: not sure what needs to be saved here. */
}
else
@@ -985,7 +969,7 @@ sparc_push_dummy_frame (void)
/* Y, PS, WIM, TBR, PC, NPC, FPS, CPS regs */
deprecated_read_register_bytes (DEPRECATED_REGISTER_BYTE (Y_REGNUM),
&register_temp[0],
- REGISTER_RAW_SIZE (Y_REGNUM) * 8);
+ DEPRECATED_REGISTER_RAW_SIZE (Y_REGNUM) * 8);
}
deprecated_read_register_bytes (DEPRECATED_REGISTER_BYTE (O0_REGNUM),
@@ -1308,36 +1292,36 @@ sparc_pop_frame (void)
if (fsr[PS_REGNUM])
write_register (PS_REGNUM,
read_memory_integer (fsr[PS_REGNUM],
- REGISTER_RAW_SIZE (PS_REGNUM)));
+ DEPRECATED_REGISTER_RAW_SIZE (PS_REGNUM)));
if (fsr[Y_REGNUM])
write_register (Y_REGNUM,
read_memory_integer (fsr[Y_REGNUM],
- REGISTER_RAW_SIZE (Y_REGNUM)));
+ DEPRECATED_REGISTER_RAW_SIZE (Y_REGNUM)));
if (fsr[PC_REGNUM])
{
/* Explicitly specified PC (and maybe NPC) -- just restore them. */
write_register (PC_REGNUM,
read_memory_integer (fsr[PC_REGNUM],
- REGISTER_RAW_SIZE (PC_REGNUM)));
+ DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM)));
if (fsr[DEPRECATED_NPC_REGNUM])
write_register (DEPRECATED_NPC_REGNUM,
read_memory_integer (fsr[DEPRECATED_NPC_REGNUM],
- REGISTER_RAW_SIZE (DEPRECATED_NPC_REGNUM)));
+ DEPRECATED_REGISTER_RAW_SIZE (DEPRECATED_NPC_REGNUM)));
}
else if (get_frame_extra_info (frame)->flat)
{
if (get_frame_extra_info (frame)->pc_addr)
pc = PC_ADJUST ((CORE_ADDR)
read_memory_integer (get_frame_extra_info (frame)->pc_addr,
- REGISTER_RAW_SIZE (PC_REGNUM)));
+ DEPRECATED_REGISTER_RAW_SIZE (PC_REGNUM)));
else
{
/* I think this happens only in the innermost frame, if so then
it is a complicated way of saying
"pc = read_register (O7_REGNUM);". */
ULONGEST tmp;
- frame_read_unsigned_register (frame, O7_REGNUM, &tmp);
+ tmp = get_frame_register_unsigned (frame, O7_REGNUM);
pc = PC_ADJUST (tmp);
}
@@ -1713,7 +1697,7 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
{
from = (char *) &deprecated_registers[DEPRECATED_REGISTER_BYTE (regi)];
to = (char *) &fpregsetp->pr_fr.pr_regs[regi - FP0_REGNUM];
- memcpy (to, from, REGISTER_RAW_SIZE (regi));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (regi));
}
}
@@ -1722,7 +1706,7 @@ fill_fpregset (gdb_fpregset_t *fpregsetp, int regno)
{
from = (char *)&deprecated_registers[DEPRECATED_REGISTER_BYTE (FPS_REGNUM)];
to = (char *) &fpregsetp->pr_fsr;
- memcpy (to, from, REGISTER_RAW_SIZE (FPS_REGNUM));
+ memcpy (to, from, DEPRECATED_REGISTER_RAW_SIZE (FPS_REGNUM));
}
}
@@ -2032,9 +2016,9 @@ sparc_print_registers (struct gdbarch *gdbarch,
{
if (!print_all)
{
- if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ if (TYPE_CODE (DEPRECATED_REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
continue;
- if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)))
+ if (TYPE_VECTOR (DEPRECATED_REGISTER_VIRTUAL_TYPE (i)))
continue;
}
}
@@ -2059,25 +2043,25 @@ sparc_print_registers (struct gdbarch *gdbarch,
continue;
}
- memcpy (virtual_buffer, raw_buffer, REGISTER_VIRTUAL_SIZE (i));
+ 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_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
+ if (TYPE_CODE (DEPRECATED_REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
{
int j;
- val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ val_print (DEPRECATED_REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
file, 0, 1, 0, Val_pretty_default);
fprintf_filtered (file, "\t(raw 0x");
- for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
+ for (j = 0; j < DEPRECATED_REGISTER_RAW_SIZE (i); j++)
{
int idx;
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
idx = j;
else
- idx = REGISTER_RAW_SIZE (i) - 1 - j;
+ idx = DEPRECATED_REGISTER_RAW_SIZE (i) - 1 - j;
fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
}
fprintf_filtered (file, ")");
@@ -2085,14 +2069,14 @@ sparc_print_registers (struct gdbarch *gdbarch,
else
{
/* Print the register in hex. */
- val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ val_print (DEPRECATED_REGISTER_VIRTUAL_TYPE (i), virtual_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_VIRTUAL_TYPE (i)) == 0)
+ if (TYPE_VECTOR (DEPRECATED_REGISTER_VIRTUAL_TYPE (i)) == 0)
{
fprintf_filtered (file, "\t");
- val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
+ val_print (DEPRECATED_REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
file, 0, 1, 0, Val_pretty_default);
}
}
@@ -2122,24 +2106,6 @@ sparc_do_registers_info (int regnum, int all)
regnum, all);
}
-#if 0
-// OBSOLETE static void
-// OBSOLETE sparclet_print_registers_info (struct gdbarch *gdbarch,
-// OBSOLETE struct ui_file *file,
-// OBSOLETE struct frame_info *frame,
-// OBSOLETE int regnum, int print_all)
-// OBSOLETE {
-// OBSOLETE sparc_print_registers (gdbarch, file, frame, regnum, print_all, NULL);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE sparclet_do_registers_info (int regnum, int all)
-// OBSOLETE {
-// OBSOLETE sparclet_print_registers_info (current_gdbarch, gdb_stdout,
-// OBSOLETE deprecated_selected_frame, regnum, all);
-// OBSOLETE }
-#endif
-
#define SPARC_F0_REGNUM FP0_REGNUM /* %f0 */
#define SPARC_F1_REGNUM (FP0_REGNUM + 1)/* %f1 */
#define SPARC_O0_REGNUM O0_REGNUM /* %o0 */
@@ -2408,10 +2374,10 @@ sparc_store_return_value (struct type *type, char *valbuf)
regno = O0_REGNUM;
/* Add leading zeros to the value. */
- if (TYPE_LENGTH (type) < REGISTER_RAW_SIZE (regno))
+ if (TYPE_LENGTH (type) < DEPRECATED_REGISTER_RAW_SIZE (regno))
{
- memset (buffer, 0, REGISTER_RAW_SIZE (regno));
- memcpy (buffer + REGISTER_RAW_SIZE (regno) - TYPE_LENGTH (type), valbuf,
+ memset (buffer, 0, DEPRECATED_REGISTER_RAW_SIZE (regno));
+ memcpy (buffer + DEPRECATED_REGISTER_RAW_SIZE (regno) - TYPE_LENGTH (type), valbuf,
TYPE_LENGTH (type));
deprecated_write_register_gen (regno, buffer);
}
@@ -2420,17 +2386,6 @@ sparc_store_return_value (struct type *type, char *valbuf)
TYPE_LENGTH (type));
}
-#if 0
-// OBSOLETE extern void
-// OBSOLETE sparclet_store_return_value (struct type *type, char *valbuf)
-// OBSOLETE {
-// OBSOLETE /* Other values are returned in register %o0. */
-// OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (O0_REGNUM), valbuf,
-// OBSOLETE TYPE_LENGTH (type));
-// OBSOLETE }
-#endif
-
-
#ifndef CALL_DUMMY_CALL_OFFSET
#define CALL_DUMMY_CALL_OFFSET \
(gdbarch_tdep (current_gdbarch)->call_dummy_call_offset)
@@ -2495,45 +2450,8 @@ sparc_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
store_unsigned_integer (dummy + (i * 4), 4, 0x01000000);
}
}
-
-#if 0
-// OBSOLETE /* If this is a bi-endian target, GDB has written the call dummy
-// OBSOLETE in little-endian order. We must byte-swap it back to big-endian. */
-// OBSOLETE if (bi_endian)
-// OBSOLETE {
-// OBSOLETE for (i = 0; i < CALL_DUMMY_LENGTH; i += 4)
-// OBSOLETE {
-// OBSOLETE char tmp = dummy[i];
-// OBSOLETE dummy[i] = dummy[i + 3];
-// OBSOLETE dummy[i + 3] = tmp;
-// OBSOLETE tmp = dummy[i + 1];
-// OBSOLETE dummy[i + 1] = dummy[i + 2];
-// OBSOLETE dummy[i + 2] = tmp;
-// OBSOLETE }
-// OBSOLETE }
-#endif
}
-
-#if 0
-// OBSOLETE /* Set target byte order based on machine type. */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE sparc_target_architecture_hook (const bfd_arch_info_type *ap)
-// OBSOLETE {
-// OBSOLETE int i, j;
-// OBSOLETE
-// OBSOLETE if (ap->mach == bfd_mach_sparc_sparclite_le)
-// OBSOLETE {
-// OBSOLETE target_byte_order = BFD_ENDIAN_LITTLE;
-// OBSOLETE bi_endian = 1;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE bi_endian = 0;
-// OBSOLETE return 1;
-// OBSOLETE }
-#endif
-
/*
* Module "constructor" function.
*/
@@ -2549,8 +2467,6 @@ _initialize_sparc_tdep (void)
{
/* Hook us into the gdbarch mechanism. */
gdbarch_register (bfd_arch_sparc, sparc_gdbarch_init, sparc_dump_tdep);
-
- /* OBSOLETE target_architecture_hook = sparc_target_architecture_hook; */
}
/* Compensate for stack bias. Note that we currently don't handle
@@ -2722,7 +2638,7 @@ sp64_extract_return_value (struct type *type, char *regbuf, char *valbuf,
int bitoffset)
{
int typelen = TYPE_LENGTH (type);
- int regsize = REGISTER_RAW_SIZE (O0_REGNUM);
+ int regsize = DEPRECATED_REGISTER_RAW_SIZE (O0_REGNUM);
if (TYPE_CODE (type) == TYPE_CODE_FLT && SPARC_HAS_FPU)
{
@@ -2780,20 +2696,6 @@ sparc64_extract_return_value (struct type *type, char *regbuf, char *valbuf)
sp64_extract_return_value (type, regbuf, valbuf, 0);
}
-#if 0
-// OBSOLETE extern void
-// OBSOLETE sparclet_extract_return_value (struct type *type,
-// OBSOLETE char *regbuf,
-// OBSOLETE char *valbuf)
-// OBSOLETE {
-// OBSOLETE regbuf += REGISTER_RAW_SIZE (O0_REGNUM) * 8;
-// OBSOLETE if (TYPE_LENGTH (type) < REGISTER_RAW_SIZE (O0_REGNUM))
-// OBSOLETE regbuf += REGISTER_RAW_SIZE (O0_REGNUM) - TYPE_LENGTH (type);
-// OBSOLETE
-// OBSOLETE memcpy ((void *) valbuf, regbuf, TYPE_LENGTH (type));
-// OBSOLETE }
-#endif
-
extern CORE_ADDR
sparc32_stack_align (CORE_ADDR addr)
{
@@ -2815,24 +2717,6 @@ sparc_print_extra_frame_info (struct frame_info *fi)
paddr_nz (get_frame_extra_info (fi)->fp_addr));
}
-/* MULTI_ARCH support */
-
-const char *
-legacy_register_name (int i)
-{
-#ifdef REGISTER_NAMES
- static char *names[] = REGISTER_NAMES;
- if (i < 0 || i >= (sizeof (names) / sizeof (*names)))
- return NULL;
- else
- return names[i];
-#else
- internal_error (__FILE__, __LINE__,
- "legacy_register_name: called.");
- return NULL;
-#endif
-}
-
static const char *
sparc32_register_name (int regno)
{
@@ -2889,71 +2773,6 @@ sparc64_register_name (int regno)
return register_names[regno];
}
-#if 0
-// OBSOLETE static const char *
-// OBSOLETE sparclite_register_name (int regno)
-// OBSOLETE {
-// OBSOLETE static char *register_names[] =
-// OBSOLETE { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
-// OBSOLETE "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7",
-// OBSOLETE "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
-// OBSOLETE "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7",
-// OBSOLETE
-// OBSOLETE "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
-// OBSOLETE "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
-// OBSOLETE "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
-// OBSOLETE "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31",
-// OBSOLETE
-// OBSOLETE "y", "psr", "wim", "tbr", "pc", "npc", "fpsr", "cpsr",
-// OBSOLETE "dia1", "dia2", "dda1", "dda2", "ddv1", "ddv2", "dcr", "dsr"
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE if (regno < 0 ||
-// OBSOLETE regno >= (sizeof (register_names) / sizeof (register_names[0])))
-// OBSOLETE return NULL;
-// OBSOLETE else
-// OBSOLETE return register_names[regno];
-// OBSOLETE }
-#endif
-
-#if 0
-// OBSOLETE static const char *
-// OBSOLETE sparclet_register_name (int regno)
-// OBSOLETE {
-// OBSOLETE static char *register_names[] =
-// OBSOLETE { "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
-// OBSOLETE "o0", "o1", "o2", "o3", "o4", "o5", "sp", "o7",
-// OBSOLETE "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
-// OBSOLETE "i0", "i1", "i2", "i3", "i4", "i5", "fp", "i7",
-// OBSOLETE
-// OBSOLETE "", "", "", "", "", "", "", "", /* no floating point registers */
-// OBSOLETE "", "", "", "", "", "", "", "",
-// OBSOLETE "", "", "", "", "", "", "", "",
-// OBSOLETE "", "", "", "", "", "", "", "",
-// OBSOLETE
-// OBSOLETE "y", "psr", "wim", "tbr", "pc", "npc", "", "", /* no FPSR or CPSR */
-// OBSOLETE "ccsr", "ccpr", "cccrcr", "ccor", "ccobr", "ccibr", "ccir", "",
-// OBSOLETE
-// OBSOLETE /* ASR15 ASR19 (don't display them) */
-// OBSOLETE "asr1", "", "asr17", "asr18", "", "asr20", "asr21", "asr22"
-// OBSOLETE /* None of the rest get displayed */
-// OBSOLETE #if 0
-// OBSOLETE "awr0", "awr1", "awr2", "awr3", "awr4", "awr5", "awr6", "awr7",
-// OBSOLETE "awr8", "awr9", "awr10", "awr11", "awr12", "awr13", "awr14", "awr15",
-// OBSOLETE "awr16", "awr17", "awr18", "awr19", "awr20", "awr21", "awr22", "awr23",
-// OBSOLETE "awr24", "awr25", "awr26", "awr27", "awr28", "awr29", "awr30", "awr31",
-// OBSOLETE "apsr"
-// OBSOLETE #endif /* 0 */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE if (regno < 0 ||
-// OBSOLETE regno >= (sizeof (register_names) / sizeof (register_names[0])))
-// OBSOLETE return NULL;
-// OBSOLETE else
-// OBSOLETE return register_names[regno];
-// OBSOLETE }
-#endif
-
static CORE_ADDR
sparc_push_return_address (CORE_ADDR pc_unused, CORE_ADDR sp)
{
@@ -3187,7 +3006,7 @@ sparc_fetch_pointer_argument (struct frame_info *frame, int argi,
struct type *type)
{
CORE_ADDR addr;
- frame_read_register (frame, O0_REGNUM + argi, &addr);
+ get_frame_register (frame, O0_REGNUM + argi, &addr);
return addr;
}
@@ -3306,15 +3125,8 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
switch (info.bfd_arch_info->mach)
{
case bfd_mach_sparc:
-#if 0
- // OBSOLETE case bfd_mach_sparc_sparclet:
- // OBSOLETE case bfd_mach_sparc_sparclite:
-#endif
case bfd_mach_sparc_v8plus:
case bfd_mach_sparc_v8plusa:
-#if 0
- // OBSOLETE case bfd_mach_sparc_sparclite_le:
-#endif
/* 32-bit machine types: */
#ifdef SPARC32_CALL_DUMMY_ON_STACK
@@ -3478,36 +3290,9 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_deprecated_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
-#if 0
- // OBSOLETE tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
-#endif
tdep->fp_register_bytes = 32 * 4;
tdep->print_insn_mach = bfd_mach_sparc;
break;
-#if 0
- // OBSOLETE case bfd_mach_sparc_sparclet:
- // OBSOLETE set_gdbarch_deprecated_extract_return_value (gdbarch, sparclet_extract_return_value);
- // OBSOLETE set_gdbarch_num_regs (gdbarch, 32 + 32 + 8 + 8 + 8);
- // OBSOLETE set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4 + 8*4);
- // OBSOLETE set_gdbarch_register_name (gdbarch, sparclet_register_name);
- // OBSOLETE set_gdbarch_deprecated_store_return_value (gdbarch, sparclet_store_return_value);
- // OBSOLETE tdep->has_fpu = 0; /* (all but sparclet and sparclite) */
- // OBSOLETE tdep->fp_register_bytes = 0;
- // OBSOLETE tdep->print_insn_mach = bfd_mach_sparc_sparclet;
- // OBSOLETE break;
-#endif
-#if 0
- // OBSOLETE case bfd_mach_sparc_sparclite:
- // OBSOLETE set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
- // OBSOLETE set_gdbarch_num_regs (gdbarch, 80);
- // OBSOLETE set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
- // OBSOLETE set_gdbarch_register_name (gdbarch, sparclite_register_name);
- // OBSOLETE set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
- // OBSOLETE tdep->has_fpu = 0; /* (all but sparclet and sparclite) */
- // OBSOLETE tdep->fp_register_bytes = 0;
- // OBSOLETE tdep->print_insn_mach = bfd_mach_sparc_sparclite;
- // OBSOLETE break;
-#endif
case bfd_mach_sparc_v8plus:
set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
set_gdbarch_store_return_value (gdbarch, sparc32_store_return_value);
@@ -3516,9 +3301,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_register_name (gdbarch, sparc32_register_name);
tdep->print_insn_mach = bfd_mach_sparc;
tdep->fp_register_bytes = 32 * 4;
-#if 0
- // OBSOLETE tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
-#endif
break;
case bfd_mach_sparc_v8plusa:
set_gdbarch_extract_return_value (gdbarch, sparc32_extract_return_value);
@@ -3526,33 +3308,15 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_num_regs (gdbarch, 72);
set_gdbarch_deprecated_register_bytes (gdbarch, 32*4 + 32*4 + 8*4);
set_gdbarch_register_name (gdbarch, sparc32_register_name);
-#if 0
- // OBSOLETE tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
-#endif
tdep->fp_register_bytes = 32 * 4;
tdep->print_insn_mach = bfd_mach_sparc;
break;
-#if 0
-// OBSOLETE case bfd_mach_sparc_sparclite_le:
-// OBSOLETE set_gdbarch_deprecated_extract_return_value (gdbarch, sparc32_extract_return_value);
-// OBSOLETE set_gdbarch_num_regs (gdbarch, 80);
-// OBSOLETE set_gdbarch_register_bytes (gdbarch, 32*4 + 32*4 + 8*4 + 8*4);
-// OBSOLETE set_gdbarch_register_name (gdbarch, sparclite_register_name);
-// OBSOLETE set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
-// OBSOLETE tdep->has_fpu = 0; /* (all but sparclet and sparclite) */
-// OBSOLETE tdep->fp_register_bytes = 0;
-// OBSOLETE tdep->print_insn_mach = bfd_mach_sparc_sparclite;
-// OBSOLETE break;
-#endif
case bfd_mach_sparc_v9:
set_gdbarch_deprecated_extract_return_value (gdbarch, sparc64_extract_return_value);
set_gdbarch_num_regs (gdbarch, 125);
set_gdbarch_deprecated_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
set_gdbarch_register_name (gdbarch, sparc64_register_name);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
-#if 0
- // OBSOLETE tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
-#endif
tdep->fp_register_bytes = 64 * 4;
tdep->print_insn_mach = bfd_mach_sparc_v9a;
break;
@@ -3562,9 +3326,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_register_bytes (gdbarch, 32*8 + 32*8 + 45*8);
set_gdbarch_register_name (gdbarch, sparc64_register_name);
set_gdbarch_deprecated_store_return_value (gdbarch, sparc_store_return_value);
-#if 0
- // OBSOLETE tdep->has_fpu = 1; /* (all but sparclet and sparclite) */
-#endif
tdep->fp_register_bytes = 64 * 4;
tdep->print_insn_mach = bfd_mach_sparc_v9a;
break;
@@ -3586,10 +3347,6 @@ sparc_dump_tdep (struct gdbarch *current_gdbarch, struct ui_file *file)
if (tdep == NULL)
return;
-#if 0
- // OBSOLETE fprintf_unfiltered (file, "sparc_dump_tdep: has_fpu = %d\n",
- // OBSOLETE tdep->has_fpu);
-#endif
fprintf_unfiltered (file, "sparc_dump_tdep: fp_register_bytes = %d\n",
tdep->fp_register_bytes);
fprintf_unfiltered (file, "sparc_dump_tdep: y_regnum = %d\n",
diff --git a/gdb/sparc64nbsd-nat.c b/gdb/sparc64nbsd-nat.c
index 1e68d69..c68b96b 100644
--- a/gdb/sparc64nbsd-nat.c
+++ b/gdb/sparc64nbsd-nat.c
@@ -40,7 +40,7 @@ getregs_supplies (int regno)
/* FIXME: PS_REGNUM for 32-bit code. */
return (regno == TSTATE_REGNUM
|| regno == PC_REGNUM
- || regno == NPC_REGNUM
+ || regno == DEPRECATED_NPC_REGNUM
|| regno == Y_REGNUM
|| (regno >= G0_REGNUM && regno <= G7_REGNUM)
|| (regno >= O0_REGNUM && regno <= O7_REGNUM)
diff --git a/gdb/sparcl-stub.c b/gdb/sparcl-stub.c
deleted file mode 100644
index 6ba55a0..0000000
--- a/gdb/sparcl-stub.c
+++ /dev/null
@@ -1,946 +0,0 @@
-// OBSOLETE /****************************************************************************
-// OBSOLETE
-// OBSOLETE THIS SOFTWARE IS NOT COPYRIGHTED
-// OBSOLETE
-// OBSOLETE HP offers the following for use in the public domain. HP makes no
-// OBSOLETE warranty with regard to the software or it's performance and the
-// OBSOLETE user accepts the software "AS IS" with all faults.
-// OBSOLETE
-// OBSOLETE HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD
-// OBSOLETE TO THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OBSOLETE OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-// OBSOLETE
-// OBSOLETE ****************************************************************************/
-// OBSOLETE
-// OBSOLETE /****************************************************************************
-// OBSOLETE * Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
-// OBSOLETE *
-// OBSOLETE * Module name: remcom.c $
-// OBSOLETE * Revision: 1.34 $
-// OBSOLETE * Date: 91/03/09 12:29:49 $
-// OBSOLETE * Contributor: Lake Stevens Instrument Division$
-// OBSOLETE *
-// OBSOLETE * Description: low level support for gdb debugger. $
-// OBSOLETE *
-// OBSOLETE * Considerations: only works on target hardware $
-// OBSOLETE *
-// OBSOLETE * Written by: Glenn Engel $
-// OBSOLETE * ModuleState: Experimental $
-// OBSOLETE *
-// OBSOLETE * NOTES: See Below $
-// OBSOLETE *
-// OBSOLETE * Modified for SPARC by Stu Grossman, Cygnus Support.
-// OBSOLETE * Based on sparc-stub.c, it's modified for SPARClite Debug Unit hardware
-// OBSOLETE * breakpoint support to create sparclite-stub.c, by Kung Hsu, Cygnus Support.
-// OBSOLETE *
-// OBSOLETE * This code has been extensively tested on the Fujitsu SPARClite demo board.
-// OBSOLETE *
-// OBSOLETE * To enable debugger support, two things need to happen. One, a
-// OBSOLETE * call to set_debug_traps() is necessary in order to allow any breakpoints
-// OBSOLETE * or error conditions to be properly intercepted and reported to gdb.
-// OBSOLETE * Two, a breakpoint needs to be generated to begin communication. This
-// OBSOLETE * is most easily accomplished by a call to breakpoint(). Breakpoint()
-// OBSOLETE * simulates a breakpoint by executing a trap #1.
-// OBSOLETE *
-// OBSOLETE *************
-// OBSOLETE *
-// OBSOLETE * The following gdb commands are supported:
-// OBSOLETE *
-// OBSOLETE * command function Return value
-// OBSOLETE *
-// OBSOLETE * g return the value of the CPU registers hex data or ENN
-// OBSOLETE * G set the value of the CPU registers OK or ENN
-// OBSOLETE * P set the value of a single CPU register OK or ENN
-// OBSOLETE *
-// OBSOLETE * mAA..AA,LLLL Read LLLL bytes at address AA..AA hex data or ENN
-// OBSOLETE * MAA..AA,LLLL: Write LLLL bytes at address AA.AA OK or ENN
-// OBSOLETE *
-// OBSOLETE * c Resume at current address SNN ( signal NN)
-// OBSOLETE * cAA..AA Continue at address AA..AA SNN
-// OBSOLETE *
-// OBSOLETE * s Step one instruction SNN
-// OBSOLETE * sAA..AA Step one instruction from AA..AA SNN
-// OBSOLETE *
-// OBSOLETE * k kill
-// OBSOLETE *
-// OBSOLETE * ? What was the last sigval ? SNN (signal NN)
-// OBSOLETE *
-// OBSOLETE * All commands and responses are sent with a packet which includes a
-// OBSOLETE * checksum. A packet consists of
-// OBSOLETE *
-// OBSOLETE * $<packet info>#<checksum>.
-// OBSOLETE *
-// OBSOLETE * where
-// OBSOLETE * <packet info> :: <characters representing the command or response>
-// OBSOLETE * <checksum> :: < two hex digits computed as modulo 256 sum of <packetinfo>>
-// OBSOLETE *
-// OBSOLETE * When a packet is received, it is first acknowledged with either '+' or '-'.
-// OBSOLETE * '+' indicates a successful transfer. '-' indicates a failed transfer.
-// OBSOLETE *
-// OBSOLETE * Example:
-// OBSOLETE *
-// OBSOLETE * Host: Reply:
-// OBSOLETE * $m0,10#2a +$00010203040506070809101112131415#42
-// OBSOLETE *
-// OBSOLETE ****************************************************************************/
-// OBSOLETE
-// OBSOLETE #include <string.h>
-// OBSOLETE #include <signal.h>
-// OBSOLETE #include <sparclite.h>
-// OBSOLETE
-// OBSOLETE /************************************************************************
-// OBSOLETE *
-// OBSOLETE * external low-level support routines
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE extern void putDebugChar (int c); /* write a single character */
-// OBSOLETE extern int getDebugChar (void); /* read and return a single char */
-// OBSOLETE
-// OBSOLETE /************************************************************************/
-// OBSOLETE /* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/
-// OBSOLETE /* at least NUMREGBYTES*2 are needed for register packets */
-// OBSOLETE #define BUFMAX 2048
-// OBSOLETE
-// OBSOLETE static int initialized = 0; /* !0 means we've been initialized */
-// OBSOLETE
-// OBSOLETE extern void breakinst ();
-// OBSOLETE static void set_mem_fault_trap (int enable);
-// OBSOLETE static void get_in_break_mode (void);
-// OBSOLETE
-// OBSOLETE static const char hexchars[]="0123456789abcdef";
-// OBSOLETE
-// OBSOLETE #define NUMREGS 80
-// OBSOLETE
-// OBSOLETE /* Number of bytes of registers. */
-// OBSOLETE #define NUMREGBYTES (NUMREGS * 4)
-// OBSOLETE enum regnames {G0, G1, G2, G3, G4, G5, G6, G7,
-// OBSOLETE O0, O1, O2, O3, O4, O5, SP, O7,
-// OBSOLETE L0, L1, L2, L3, L4, L5, L6, L7,
-// OBSOLETE I0, I1, I2, I3, I4, I5, FP, I7,
-// OBSOLETE
-// OBSOLETE F0, F1, F2, F3, F4, F5, F6, F7,
-// OBSOLETE F8, F9, F10, F11, F12, F13, F14, F15,
-// OBSOLETE F16, F17, F18, F19, F20, F21, F22, F23,
-// OBSOLETE F24, F25, F26, F27, F28, F29, F30, F31,
-// OBSOLETE Y, PSR, WIM, TBR, PC, NPC, FPSR, CPSR,
-// OBSOLETE DIA1, DIA2, DDA1, DDA2, DDV1, DDV2, DCR, DSR };
-// OBSOLETE
-// OBSOLETE /*************************** ASSEMBLY CODE MACROS *************************/
-// OBSOLETE /* */
-// OBSOLETE
-// OBSOLETE extern void trap_low();
-// OBSOLETE
-// OBSOLETE /* Create private copies of common functions used by the stub. This prevents
-// OBSOLETE nasty interactions between app code and the stub (for instance if user steps
-// OBSOLETE into strlen, etc..) */
-// OBSOLETE
-// OBSOLETE static char *
-// OBSOLETE strcpy (char *dst, const char *src)
-// OBSOLETE {
-// OBSOLETE char *retval = dst;
-// OBSOLETE
-// OBSOLETE while ((*dst++ = *src++) != '\000');
-// OBSOLETE
-// OBSOLETE return retval;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void *
-// OBSOLETE memcpy (void *vdst, const void *vsrc, int n)
-// OBSOLETE {
-// OBSOLETE char *dst = vdst;
-// OBSOLETE const char *src = vsrc;
-// OBSOLETE char *retval = dst;
-// OBSOLETE
-// OBSOLETE while (n-- > 0)
-// OBSOLETE *dst++ = *src++;
-// OBSOLETE
-// OBSOLETE return retval;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE asm("
-// OBSOLETE .reserve trapstack, 1000 * 4, \"bss\", 8
-// OBSOLETE
-// OBSOLETE .data
-// OBSOLETE .align 4
-// OBSOLETE
-// OBSOLETE in_trap_handler:
-// OBSOLETE .word 0
-// OBSOLETE
-// OBSOLETE .text
-// OBSOLETE .align 4
-// OBSOLETE
-// OBSOLETE ! This function is called when any SPARC trap (except window overflow or
-// OBSOLETE ! underflow) occurs. It makes sure that the invalid register window is still
-// OBSOLETE ! available before jumping into C code. It will also restore the world if you
-// OBSOLETE ! return from handle_exception.
-// OBSOLETE !
-// OBSOLETE ! On entry, trap_low expects l1 and l2 to contain pc and npc respectivly.
-// OBSOLETE ! Register usage throughout the routine is as follows:
-// OBSOLETE !
-// OBSOLETE ! l0 - psr
-// OBSOLETE ! l1 - pc
-// OBSOLETE ! l2 - npc
-// OBSOLETE ! l3 - wim
-// OBSOLETE ! l4 - scratch and y reg
-// OBSOLETE ! l5 - scratch and tbr
-// OBSOLETE ! l6 - unused
-// OBSOLETE ! l7 - unused
-// OBSOLETE
-// OBSOLETE .globl _trap_low
-// OBSOLETE _trap_low:
-// OBSOLETE mov %psr, %l0
-// OBSOLETE mov %wim, %l3
-// OBSOLETE
-// OBSOLETE srl %l3, %l0, %l4 ! wim >> cwp
-// OBSOLETE cmp %l4, 1
-// OBSOLETE bne window_fine ! Branch if not in the invalid window
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE ! Handle window overflow
-// OBSOLETE
-// OBSOLETE mov %g1, %l4 ! Save g1, we use it to hold the wim
-// OBSOLETE srl %l3, 1, %g1 ! Rotate wim right
-// OBSOLETE tst %g1
-// OBSOLETE bg good_wim ! Branch if new wim is non-zero
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE ! At this point, we need to bring a 1 into the high order bit of the wim.
-// OBSOLETE ! Since we don't want to make any assumptions about the number of register
-// OBSOLETE ! windows, we figure it out dynamically so as to setup the wim correctly.
-// OBSOLETE
-// OBSOLETE not %g1 ! Fill g1 with ones
-// OBSOLETE mov %g1, %wim ! Fill the wim with ones
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE mov %wim, %g1 ! Read back the wim
-// OBSOLETE inc %g1 ! Now g1 has 1 just to left of wim
-// OBSOLETE srl %g1, 1, %g1 ! Now put 1 at top of wim
-// OBSOLETE mov %g0, %wim ! Clear wim so that subsequent save
-// OBSOLETE nop ! won't trap
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE good_wim:
-// OBSOLETE save %g0, %g0, %g0 ! Slip into next window
-// OBSOLETE mov %g1, %wim ! Install the new wim
-// OBSOLETE
-// OBSOLETE std %l0, [%sp + 0 * 4] ! save L & I registers
-// OBSOLETE std %l2, [%sp + 2 * 4]
-// OBSOLETE std %l4, [%sp + 4 * 4]
-// OBSOLETE std %l6, [%sp + 6 * 4]
-// OBSOLETE
-// OBSOLETE std %i0, [%sp + 8 * 4]
-// OBSOLETE std %i2, [%sp + 10 * 4]
-// OBSOLETE std %i4, [%sp + 12 * 4]
-// OBSOLETE std %i6, [%sp + 14 * 4]
-// OBSOLETE
-// OBSOLETE restore ! Go back to trap window.
-// OBSOLETE mov %l4, %g1 ! Restore %g1
-// OBSOLETE
-// OBSOLETE window_fine:
-// OBSOLETE sethi %hi(in_trap_handler), %l4
-// OBSOLETE ld [%lo(in_trap_handler) + %l4], %l5
-// OBSOLETE tst %l5
-// OBSOLETE bg recursive_trap
-// OBSOLETE inc %l5
-// OBSOLETE
-// OBSOLETE set trapstack+1000*4, %sp ! Switch to trap stack
-// OBSOLETE
-// OBSOLETE recursive_trap:
-// OBSOLETE st %l5, [%lo(in_trap_handler) + %l4]
-// OBSOLETE sub %sp,(16+1+6+1+80)*4,%sp ! Make room for input & locals
-// OBSOLETE ! + hidden arg + arg spill
-// OBSOLETE ! + doubleword alignment
-// OBSOLETE ! + registers[72] local var
-// OBSOLETE
-// OBSOLETE std %g0, [%sp + (24 + 0) * 4] ! registers[Gx]
-// OBSOLETE std %g2, [%sp + (24 + 2) * 4]
-// OBSOLETE std %g4, [%sp + (24 + 4) * 4]
-// OBSOLETE std %g6, [%sp + (24 + 6) * 4]
-// OBSOLETE
-// OBSOLETE std %i0, [%sp + (24 + 8) * 4] ! registers[Ox]
-// OBSOLETE std %i2, [%sp + (24 + 10) * 4]
-// OBSOLETE std %i4, [%sp + (24 + 12) * 4]
-// OBSOLETE std %i6, [%sp + (24 + 14) * 4]
-// OBSOLETE
-// OBSOLETE mov %y, %l4
-// OBSOLETE mov %tbr, %l5
-// OBSOLETE st %l4, [%sp + (24 + 64) * 4] ! Y
-// OBSOLETE st %l0, [%sp + (24 + 65) * 4] ! PSR
-// OBSOLETE st %l3, [%sp + (24 + 66) * 4] ! WIM
-// OBSOLETE st %l5, [%sp + (24 + 67) * 4] ! TBR
-// OBSOLETE st %l1, [%sp + (24 + 68) * 4] ! PC
-// OBSOLETE st %l2, [%sp + (24 + 69) * 4] ! NPC
-// OBSOLETE
-// OBSOLETE or %l0, 0xf20, %l4
-// OBSOLETE mov %l4, %psr ! Turn on traps, disable interrupts
-// OBSOLETE
-// OBSOLETE set 0x1000, %l1
-// OBSOLETE btst %l1, %l0 ! FP enabled?
-// OBSOLETE be no_fpstore
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE ! Must save fsr first, to flush the FQ. This may cause a deferred fp trap, so
-// OBSOLETE ! traps must be enabled to allow the trap handler to clean things up.
-// OBSOLETE
-// OBSOLETE st %fsr, [%sp + (24 + 70) * 4]
-// OBSOLETE
-// OBSOLETE std %f0, [%sp + (24 + 32) * 4]
-// OBSOLETE std %f2, [%sp + (24 + 34) * 4]
-// OBSOLETE std %f4, [%sp + (24 + 36) * 4]
-// OBSOLETE std %f6, [%sp + (24 + 38) * 4]
-// OBSOLETE std %f8, [%sp + (24 + 40) * 4]
-// OBSOLETE std %f10, [%sp + (24 + 42) * 4]
-// OBSOLETE std %f12, [%sp + (24 + 44) * 4]
-// OBSOLETE std %f14, [%sp + (24 + 46) * 4]
-// OBSOLETE std %f16, [%sp + (24 + 48) * 4]
-// OBSOLETE std %f18, [%sp + (24 + 50) * 4]
-// OBSOLETE std %f20, [%sp + (24 + 52) * 4]
-// OBSOLETE std %f22, [%sp + (24 + 54) * 4]
-// OBSOLETE std %f24, [%sp + (24 + 56) * 4]
-// OBSOLETE std %f26, [%sp + (24 + 58) * 4]
-// OBSOLETE std %f28, [%sp + (24 + 60) * 4]
-// OBSOLETE std %f30, [%sp + (24 + 62) * 4]
-// OBSOLETE no_fpstore:
-// OBSOLETE
-// OBSOLETE call _handle_exception
-// OBSOLETE add %sp, 24 * 4, %o0 ! Pass address of registers
-// OBSOLETE
-// OBSOLETE ! Reload all of the registers that aren't on the stack
-// OBSOLETE
-// OBSOLETE ld [%sp + (24 + 1) * 4], %g1 ! registers[Gx]
-// OBSOLETE ldd [%sp + (24 + 2) * 4], %g2
-// OBSOLETE ldd [%sp + (24 + 4) * 4], %g4
-// OBSOLETE ldd [%sp + (24 + 6) * 4], %g6
-// OBSOLETE
-// OBSOLETE ldd [%sp + (24 + 8) * 4], %i0 ! registers[Ox]
-// OBSOLETE ldd [%sp + (24 + 10) * 4], %i2
-// OBSOLETE ldd [%sp + (24 + 12) * 4], %i4
-// OBSOLETE ldd [%sp + (24 + 14) * 4], %i6
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE ldd [%sp + (24 + 64) * 4], %l0 ! Y & PSR
-// OBSOLETE ldd [%sp + (24 + 68) * 4], %l2 ! PC & NPC
-// OBSOLETE
-// OBSOLETE set 0x1000, %l5
-// OBSOLETE btst %l5, %l1 ! FP enabled?
-// OBSOLETE be no_fpreload
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE ldd [%sp + (24 + 32) * 4], %f0
-// OBSOLETE ldd [%sp + (24 + 34) * 4], %f2
-// OBSOLETE ldd [%sp + (24 + 36) * 4], %f4
-// OBSOLETE ldd [%sp + (24 + 38) * 4], %f6
-// OBSOLETE ldd [%sp + (24 + 40) * 4], %f8
-// OBSOLETE ldd [%sp + (24 + 42) * 4], %f10
-// OBSOLETE ldd [%sp + (24 + 44) * 4], %f12
-// OBSOLETE ldd [%sp + (24 + 46) * 4], %f14
-// OBSOLETE ldd [%sp + (24 + 48) * 4], %f16
-// OBSOLETE ldd [%sp + (24 + 50) * 4], %f18
-// OBSOLETE ldd [%sp + (24 + 52) * 4], %f20
-// OBSOLETE ldd [%sp + (24 + 54) * 4], %f22
-// OBSOLETE ldd [%sp + (24 + 56) * 4], %f24
-// OBSOLETE ldd [%sp + (24 + 58) * 4], %f26
-// OBSOLETE ldd [%sp + (24 + 60) * 4], %f28
-// OBSOLETE ldd [%sp + (24 + 62) * 4], %f30
-// OBSOLETE
-// OBSOLETE ld [%sp + (24 + 70) * 4], %fsr
-// OBSOLETE no_fpreload:
-// OBSOLETE
-// OBSOLETE restore ! Ensure that previous window is valid
-// OBSOLETE save %g0, %g0, %g0 ! by causing a window_underflow trap
-// OBSOLETE
-// OBSOLETE mov %l0, %y
-// OBSOLETE mov %l1, %psr ! Make sure that traps are disabled
-// OBSOLETE ! for rett
-// OBSOLETE sethi %hi(in_trap_handler), %l4
-// OBSOLETE ld [%lo(in_trap_handler) + %l4], %l5
-// OBSOLETE dec %l5
-// OBSOLETE st %l5, [%lo(in_trap_handler) + %l4]
-// OBSOLETE
-// OBSOLETE jmpl %l2, %g0 ! Restore old PC
-// OBSOLETE rett %l3 ! Restore old nPC
-// OBSOLETE ");
-// OBSOLETE
-// OBSOLETE /* Convert ch from a hex digit to an int */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE hex (unsigned char ch)
-// OBSOLETE {
-// OBSOLETE if (ch >= 'a' && ch <= 'f')
-// OBSOLETE return ch-'a'+10;
-// OBSOLETE if (ch >= '0' && ch <= '9')
-// OBSOLETE return ch-'0';
-// OBSOLETE if (ch >= 'A' && ch <= 'F')
-// OBSOLETE return ch-'A'+10;
-// OBSOLETE return -1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static char remcomInBuffer[BUFMAX];
-// OBSOLETE static char remcomOutBuffer[BUFMAX];
-// OBSOLETE
-// OBSOLETE /* scan for the sequence $<data>#<checksum> */
-// OBSOLETE
-// OBSOLETE unsigned char *
-// OBSOLETE getpacket (void)
-// OBSOLETE {
-// OBSOLETE unsigned char *buffer = &remcomInBuffer[0];
-// OBSOLETE unsigned char checksum;
-// OBSOLETE unsigned char xmitcsum;
-// OBSOLETE int count;
-// OBSOLETE char ch;
-// OBSOLETE
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE /* wait around for the start character, ignore all other characters */
-// OBSOLETE while ((ch = getDebugChar ()) != '$')
-// OBSOLETE ;
-// OBSOLETE
-// OBSOLETE retry:
-// OBSOLETE checksum = 0;
-// OBSOLETE xmitcsum = -1;
-// OBSOLETE count = 0;
-// OBSOLETE
-// OBSOLETE /* now, read until a # or end of buffer is found */
-// OBSOLETE while (count < BUFMAX)
-// OBSOLETE {
-// OBSOLETE ch = getDebugChar ();
-// OBSOLETE if (ch == '$')
-// OBSOLETE goto retry;
-// OBSOLETE if (ch == '#')
-// OBSOLETE break;
-// OBSOLETE checksum = checksum + ch;
-// OBSOLETE buffer[count] = ch;
-// OBSOLETE count = count + 1;
-// OBSOLETE }
-// OBSOLETE buffer[count] = 0;
-// OBSOLETE
-// OBSOLETE if (ch == '#')
-// OBSOLETE {
-// OBSOLETE ch = getDebugChar ();
-// OBSOLETE xmitcsum = hex (ch) << 4;
-// OBSOLETE ch = getDebugChar ();
-// OBSOLETE xmitcsum += hex (ch);
-// OBSOLETE
-// OBSOLETE if (checksum != xmitcsum)
-// OBSOLETE {
-// OBSOLETE putDebugChar ('-'); /* failed checksum */
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE putDebugChar ('+'); /* successful transfer */
-// OBSOLETE
-// OBSOLETE /* if a sequence char is present, reply the sequence ID */
-// OBSOLETE if (buffer[2] == ':')
-// OBSOLETE {
-// OBSOLETE putDebugChar (buffer[0]);
-// OBSOLETE putDebugChar (buffer[1]);
-// OBSOLETE
-// OBSOLETE return &buffer[3];
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return &buffer[0];
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* send the packet in buffer. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE putpacket (unsigned char *buffer)
-// OBSOLETE {
-// OBSOLETE unsigned char checksum;
-// OBSOLETE int count;
-// OBSOLETE unsigned char ch;
-// OBSOLETE
-// OBSOLETE /* $<packet info>#<checksum>. */
-// OBSOLETE do
-// OBSOLETE {
-// OBSOLETE putDebugChar('$');
-// OBSOLETE checksum = 0;
-// OBSOLETE count = 0;
-// OBSOLETE
-// OBSOLETE while (ch = buffer[count])
-// OBSOLETE {
-// OBSOLETE putDebugChar (ch);
-// OBSOLETE checksum += ch;
-// OBSOLETE count += 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE putDebugChar('#');
-// OBSOLETE putDebugChar(hexchars[checksum >> 4]);
-// OBSOLETE putDebugChar(hexchars[checksum & 0xf]);
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE while (getDebugChar() != '+');
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Indicate to caller of mem2hex or hex2mem that there has been an
-// OBSOLETE error. */
-// OBSOLETE static volatile int mem_err = 0;
-// OBSOLETE
-// OBSOLETE /* Convert the memory pointed to by mem into hex, placing result in buf.
-// OBSOLETE * Return a pointer to the last char put in buf (null), in case of mem fault,
-// OBSOLETE * return 0.
-// OBSOLETE * If MAY_FAULT is non-zero, then we will handle memory faults by returning
-// OBSOLETE * a 0, else treat a fault like any other fault in the stub.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE static unsigned char *
-// OBSOLETE mem2hex (unsigned char *mem, unsigned char *buf, int count, int may_fault)
-// OBSOLETE {
-// OBSOLETE unsigned char ch;
-// OBSOLETE
-// OBSOLETE set_mem_fault_trap(may_fault);
-// OBSOLETE
-// OBSOLETE while (count-- > 0)
-// OBSOLETE {
-// OBSOLETE ch = *mem++;
-// OBSOLETE if (mem_err)
-// OBSOLETE return 0;
-// OBSOLETE *buf++ = hexchars[ch >> 4];
-// OBSOLETE *buf++ = hexchars[ch & 0xf];
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE *buf = 0;
-// OBSOLETE
-// OBSOLETE set_mem_fault_trap(0);
-// OBSOLETE
-// OBSOLETE return buf;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* convert the hex array pointed to by buf into binary to be placed in mem
-// OBSOLETE * return a pointer to the character AFTER the last byte written */
-// OBSOLETE
-// OBSOLETE static char *
-// OBSOLETE hex2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE unsigned char ch;
-// OBSOLETE
-// OBSOLETE set_mem_fault_trap(may_fault);
-// OBSOLETE
-// OBSOLETE for (i=0; i<count; i++)
-// OBSOLETE {
-// OBSOLETE ch = hex(*buf++) << 4;
-// OBSOLETE ch |= hex(*buf++);
-// OBSOLETE *mem++ = ch;
-// OBSOLETE if (mem_err)
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE set_mem_fault_trap(0);
-// OBSOLETE
-// OBSOLETE return mem;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* This table contains the mapping between SPARC hardware trap types, and
-// OBSOLETE signals, which are primarily what GDB understands. It also indicates
-// OBSOLETE which hardware traps we need to commandeer when initializing the stub. */
-// OBSOLETE
-// OBSOLETE static struct hard_trap_info
-// OBSOLETE {
-// OBSOLETE unsigned char tt; /* Trap type code for SPARClite */
-// OBSOLETE unsigned char signo; /* Signal that we map this trap into */
-// OBSOLETE } hard_trap_info[] = {
-// OBSOLETE {0x01, SIGSEGV}, /* instruction access error */
-// OBSOLETE {0x02, SIGILL}, /* privileged instruction */
-// OBSOLETE {0x03, SIGILL}, /* illegal instruction */
-// OBSOLETE {0x04, SIGEMT}, /* fp disabled */
-// OBSOLETE {0x07, SIGBUS}, /* mem address not aligned */
-// OBSOLETE {0x09, SIGSEGV}, /* data access exception */
-// OBSOLETE {0x0a, SIGEMT}, /* tag overflow */
-// OBSOLETE {0x20, SIGBUS}, /* r register access error */
-// OBSOLETE {0x21, SIGBUS}, /* instruction access error */
-// OBSOLETE {0x24, SIGEMT}, /* cp disabled */
-// OBSOLETE {0x29, SIGBUS}, /* data access error */
-// OBSOLETE {0x2a, SIGFPE}, /* divide by zero */
-// OBSOLETE {0x2b, SIGBUS}, /* data store error */
-// OBSOLETE {0x80+1, SIGTRAP}, /* ta 1 - normal breakpoint instruction */
-// OBSOLETE {0xff, SIGTRAP}, /* hardware breakpoint */
-// OBSOLETE {0, 0} /* Must be last */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /* Set up exception handlers for tracing and breakpoints */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE set_debug_traps (void)
-// OBSOLETE {
-// OBSOLETE struct hard_trap_info *ht;
-// OBSOLETE
-// OBSOLETE /* Only setup fp traps if the FP is disabled. */
-// OBSOLETE
-// OBSOLETE for (ht = hard_trap_info;
-// OBSOLETE ht->tt != 0 && ht->signo != 0;
-// OBSOLETE ht++)
-// OBSOLETE if (ht->tt != 4 || ! (read_psr () & 0x1000))
-// OBSOLETE exceptionHandler(ht->tt, trap_low);
-// OBSOLETE
-// OBSOLETE initialized = 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE asm ("
-// OBSOLETE ! Trap handler for memory errors. This just sets mem_err to be non-zero. It
-// OBSOLETE ! assumes that %l1 is non-zero. This should be safe, as it is doubtful that
-// OBSOLETE ! 0 would ever contain code that could mem fault. This routine will skip
-// OBSOLETE ! past the faulting instruction after setting mem_err.
-// OBSOLETE
-// OBSOLETE .text
-// OBSOLETE .align 4
-// OBSOLETE
-// OBSOLETE _fltr_set_mem_err:
-// OBSOLETE sethi %hi(_mem_err), %l0
-// OBSOLETE st %l1, [%l0 + %lo(_mem_err)]
-// OBSOLETE jmpl %l2, %g0
-// OBSOLETE rett %l2+4
-// OBSOLETE ");
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE set_mem_fault_trap (int enable)
-// OBSOLETE {
-// OBSOLETE extern void fltr_set_mem_err();
-// OBSOLETE mem_err = 0;
-// OBSOLETE
-// OBSOLETE if (enable)
-// OBSOLETE exceptionHandler(9, fltr_set_mem_err);
-// OBSOLETE else
-// OBSOLETE exceptionHandler(9, trap_low);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE asm ("
-// OBSOLETE .text
-// OBSOLETE .align 4
-// OBSOLETE
-// OBSOLETE _dummy_hw_breakpoint:
-// OBSOLETE jmpl %l2, %g0
-// OBSOLETE rett %l2+4
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE ");
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE get_in_break_mode (void)
-// OBSOLETE {
-// OBSOLETE extern void dummy_hw_breakpoint();
-// OBSOLETE
-// OBSOLETE exceptionHandler (255, dummy_hw_breakpoint);
-// OBSOLETE
-// OBSOLETE asm ("ta 255");
-// OBSOLETE
-// OBSOLETE exceptionHandler (255, trap_low);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Convert the SPARC hardware trap type code to a unix signal number. */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE computeSignal (int tt)
-// OBSOLETE {
-// OBSOLETE struct hard_trap_info *ht;
-// OBSOLETE
-// OBSOLETE for (ht = hard_trap_info; ht->tt && ht->signo; ht++)
-// OBSOLETE if (ht->tt == tt)
-// OBSOLETE return ht->signo;
-// OBSOLETE
-// OBSOLETE return SIGHUP; /* default for things we don't know about */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * While we find nice hex chars, build an int.
-// OBSOLETE * Return number of chars processed.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE hexToInt(char **ptr, int *intValue)
-// OBSOLETE {
-// OBSOLETE int numChars = 0;
-// OBSOLETE int hexValue;
-// OBSOLETE
-// OBSOLETE *intValue = 0;
-// OBSOLETE
-// OBSOLETE while (**ptr)
-// OBSOLETE {
-// OBSOLETE hexValue = hex(**ptr);
-// OBSOLETE if (hexValue < 0)
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE *intValue = (*intValue << 4) | hexValue;
-// OBSOLETE numChars ++;
-// OBSOLETE
-// OBSOLETE (*ptr)++;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return (numChars);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * This function does all command procesing for interfacing to gdb. It
-// OBSOLETE * returns 1 if you should skip the instruction at the trap address, 0
-// OBSOLETE * otherwise.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE handle_exception (unsigned long *registers)
-// OBSOLETE {
-// OBSOLETE int tt; /* Trap type */
-// OBSOLETE int sigval;
-// OBSOLETE int addr;
-// OBSOLETE int length;
-// OBSOLETE char *ptr;
-// OBSOLETE unsigned long *sp;
-// OBSOLETE unsigned long dsr;
-// OBSOLETE
-// OBSOLETE /* First, we must force all of the windows to be spilled out */
-// OBSOLETE
-// OBSOLETE asm(" save %sp, -64, %sp
-// OBSOLETE save %sp, -64, %sp
-// OBSOLETE save %sp, -64, %sp
-// OBSOLETE save %sp, -64, %sp
-// OBSOLETE save %sp, -64, %sp
-// OBSOLETE save %sp, -64, %sp
-// OBSOLETE save %sp, -64, %sp
-// OBSOLETE save %sp, -64, %sp
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE ");
-// OBSOLETE
-// OBSOLETE get_in_break_mode (); /* Enable DSU register writes */
-// OBSOLETE
-// OBSOLETE registers[DIA1] = read_asi (1, 0xff00);
-// OBSOLETE registers[DIA2] = read_asi (1, 0xff04);
-// OBSOLETE registers[DDA1] = read_asi (1, 0xff08);
-// OBSOLETE registers[DDA2] = read_asi (1, 0xff0c);
-// OBSOLETE registers[DDV1] = read_asi (1, 0xff10);
-// OBSOLETE registers[DDV2] = read_asi (1, 0xff14);
-// OBSOLETE registers[DCR] = read_asi (1, 0xff18);
-// OBSOLETE registers[DSR] = read_asi (1, 0xff1c);
-// OBSOLETE
-// OBSOLETE if (registers[PC] == (unsigned long)breakinst)
-// OBSOLETE {
-// OBSOLETE registers[PC] = registers[NPC];
-// OBSOLETE registers[NPC] += 4;
-// OBSOLETE }
-// OBSOLETE sp = (unsigned long *)registers[SP];
-// OBSOLETE
-// OBSOLETE dsr = (unsigned long)registers[DSR];
-// OBSOLETE if (dsr & 0x3c)
-// OBSOLETE tt = 255;
-// OBSOLETE else
-// OBSOLETE tt = (registers[TBR] >> 4) & 0xff;
-// OBSOLETE
-// OBSOLETE /* reply to host that an exception has occurred */
-// OBSOLETE sigval = computeSignal(tt);
-// OBSOLETE ptr = remcomOutBuffer;
-// OBSOLETE
-// OBSOLETE *ptr++ = 'T';
-// OBSOLETE *ptr++ = hexchars[sigval >> 4];
-// OBSOLETE *ptr++ = hexchars[sigval & 0xf];
-// OBSOLETE
-// OBSOLETE *ptr++ = hexchars[PC >> 4];
-// OBSOLETE *ptr++ = hexchars[PC & 0xf];
-// OBSOLETE *ptr++ = ':';
-// OBSOLETE ptr = mem2hex((char *)&registers[PC], ptr, 4, 0);
-// OBSOLETE *ptr++ = ';';
-// OBSOLETE
-// OBSOLETE *ptr++ = hexchars[FP >> 4];
-// OBSOLETE *ptr++ = hexchars[FP & 0xf];
-// OBSOLETE *ptr++ = ':';
-// OBSOLETE ptr = mem2hex(sp + 8 + 6, ptr, 4, 0); /* FP */
-// OBSOLETE *ptr++ = ';';
-// OBSOLETE
-// OBSOLETE *ptr++ = hexchars[SP >> 4];
-// OBSOLETE *ptr++ = hexchars[SP & 0xf];
-// OBSOLETE *ptr++ = ':';
-// OBSOLETE ptr = mem2hex((char *)&sp, ptr, 4, 0);
-// OBSOLETE *ptr++ = ';';
-// OBSOLETE
-// OBSOLETE *ptr++ = hexchars[NPC >> 4];
-// OBSOLETE *ptr++ = hexchars[NPC & 0xf];
-// OBSOLETE *ptr++ = ':';
-// OBSOLETE ptr = mem2hex((char *)&registers[NPC], ptr, 4, 0);
-// OBSOLETE *ptr++ = ';';
-// OBSOLETE
-// OBSOLETE *ptr++ = hexchars[O7 >> 4];
-// OBSOLETE *ptr++ = hexchars[O7 & 0xf];
-// OBSOLETE *ptr++ = ':';
-// OBSOLETE ptr = mem2hex((char *)&registers[O7], ptr, 4, 0);
-// OBSOLETE *ptr++ = ';';
-// OBSOLETE
-// OBSOLETE *ptr++ = 0;
-// OBSOLETE
-// OBSOLETE putpacket(remcomOutBuffer);
-// OBSOLETE
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE remcomOutBuffer[0] = 0;
-// OBSOLETE
-// OBSOLETE ptr = getpacket();
-// OBSOLETE switch (*ptr++)
-// OBSOLETE {
-// OBSOLETE case '?':
-// OBSOLETE remcomOutBuffer[0] = 'S';
-// OBSOLETE remcomOutBuffer[1] = hexchars[sigval >> 4];
-// OBSOLETE remcomOutBuffer[2] = hexchars[sigval & 0xf];
-// OBSOLETE remcomOutBuffer[3] = 0;
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'd':
-// OBSOLETE /* toggle debug flag */
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'g': /* return the value of the CPU registers */
-// OBSOLETE memcpy (&registers[L0], sp, 16 * 4); /* Copy L & I regs from stack */
-// OBSOLETE mem2hex ((char *)registers, remcomOutBuffer, NUMREGBYTES, 0);
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'G': /* Set the value of all registers */
-// OBSOLETE case 'P': /* Set the value of one register */
-// OBSOLETE {
-// OBSOLETE unsigned long *newsp, psr;
-// OBSOLETE
-// OBSOLETE psr = registers[PSR];
-// OBSOLETE
-// OBSOLETE if (ptr[-1] == 'P')
-// OBSOLETE {
-// OBSOLETE int regno;
-// OBSOLETE
-// OBSOLETE if (hexToInt (&ptr, &regno)
-// OBSOLETE && *ptr++ == '=')
-// OBSOLETE if (regno >= L0 && regno <= I7)
-// OBSOLETE hex2mem (ptr, sp + regno - L0, 4, 0);
-// OBSOLETE else
-// OBSOLETE hex2mem (ptr, (char *)&registers[regno], 4, 0);
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE strcpy (remcomOutBuffer, "E01");
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE hex2mem (ptr, (char *)registers, NUMREGBYTES, 0);
-// OBSOLETE memcpy (sp, &registers[L0], 16 * 4); /* Copy L & I regs to stack */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* See if the stack pointer has moved. If so, then copy the saved
-// OBSOLETE locals and ins to the new location. This keeps the window
-// OBSOLETE overflow and underflow routines happy. */
-// OBSOLETE
-// OBSOLETE newsp = (unsigned long *)registers[SP];
-// OBSOLETE if (sp != newsp)
-// OBSOLETE sp = memcpy(newsp, sp, 16 * 4);
-// OBSOLETE
-// OBSOLETE /* Don't allow CWP to be modified. */
-// OBSOLETE
-// OBSOLETE if (psr != registers[PSR])
-// OBSOLETE registers[PSR] = (psr & 0x1f) | (registers[PSR] & ~0x1f);
-// OBSOLETE
-// OBSOLETE strcpy(remcomOutBuffer,"OK");
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
-// OBSOLETE /* Try to read %x,%x. */
-// OBSOLETE
-// OBSOLETE if (hexToInt(&ptr, &addr)
-// OBSOLETE && *ptr++ == ','
-// OBSOLETE && hexToInt(&ptr, &length))
-// OBSOLETE {
-// OBSOLETE if (mem2hex((char *)addr, remcomOutBuffer, length, 1))
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE strcpy (remcomOutBuffer, "E03");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE strcpy(remcomOutBuffer,"E01");
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
-// OBSOLETE /* Try to read '%x,%x:'. */
-// OBSOLETE
-// OBSOLETE if (hexToInt(&ptr, &addr)
-// OBSOLETE && *ptr++ == ','
-// OBSOLETE && hexToInt(&ptr, &length)
-// OBSOLETE && *ptr++ == ':')
-// OBSOLETE {
-// OBSOLETE if (hex2mem(ptr, (char *)addr, length, 1))
-// OBSOLETE strcpy(remcomOutBuffer, "OK");
-// OBSOLETE else
-// OBSOLETE strcpy(remcomOutBuffer, "E03");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE strcpy(remcomOutBuffer, "E02");
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'c': /* cAA..AA Continue at address AA..AA(optional) */
-// OBSOLETE /* try to read optional parameter, pc unchanged if no parm */
-// OBSOLETE if (hexToInt(&ptr, &addr))
-// OBSOLETE {
-// OBSOLETE registers[PC] = addr;
-// OBSOLETE registers[NPC] = addr + 4;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Need to flush the instruction cache here, as we may have deposited a
-// OBSOLETE breakpoint, and the icache probably has no way of knowing that a data ref to
-// OBSOLETE some location may have changed something that is in the instruction cache.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE flush_i_cache ();
-// OBSOLETE
-// OBSOLETE if (!(registers[DSR] & 0x1) /* DSU enabled? */
-// OBSOLETE && !(registers[DCR] & 0x200)) /* Are we in break state? */
-// OBSOLETE { /* Yes, set the DSU regs */
-// OBSOLETE write_asi (1, 0xff00, registers[DIA1]);
-// OBSOLETE write_asi (1, 0xff04, registers[DIA2]);
-// OBSOLETE write_asi (1, 0xff08, registers[DDA1]);
-// OBSOLETE write_asi (1, 0xff0c, registers[DDA2]);
-// OBSOLETE write_asi (1, 0xff10, registers[DDV1]);
-// OBSOLETE write_asi (1, 0xff14, registers[DDV2]);
-// OBSOLETE write_asi (1, 0xff1c, registers[DSR]);
-// OBSOLETE write_asi (1, 0xff18, registers[DCR] | 0x200); /* Clear break */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE /* kill the program */
-// OBSOLETE case 'k' : /* do nothing */
-// OBSOLETE break;
-// OBSOLETE #if 0
-// OBSOLETE case 't': /* Test feature */
-// OBSOLETE asm (" std %f30,[%sp]");
-// OBSOLETE break;
-// OBSOLETE #endif
-// OBSOLETE case 'r': /* Reset */
-// OBSOLETE asm ("call 0
-// OBSOLETE nop ");
-// OBSOLETE break;
-// OBSOLETE } /* switch */
-// OBSOLETE
-// OBSOLETE /* reply to the request */
-// OBSOLETE putpacket(remcomOutBuffer);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* This function will generate a breakpoint exception. It is used at the
-// OBSOLETE beginning of a program to sync up with a debugger and can be used
-// OBSOLETE otherwise as a quick means to stop program execution and "break" into
-// OBSOLETE the debugger. */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE breakpoint (void)
-// OBSOLETE {
-// OBSOLETE if (!initialized)
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE asm(" .globl _breakinst
-// OBSOLETE
-// OBSOLETE _breakinst: ta 1
-// OBSOLETE ");
-// OBSOLETE }
diff --git a/gdb/sparcl-tdep.c b/gdb/sparcl-tdep.c
deleted file mode 100644
index 8c376c5..0000000
--- a/gdb/sparcl-tdep.c
+++ /dev/null
@@ -1,869 +0,0 @@
-// OBSOLETE /* Target dependent code for the Fujitsu SPARClite for GDB, the GNU debugger.
-// OBSOLETE Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001
-// 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 "defs.h"
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include "breakpoint.h"
-// OBSOLETE #include "target.h"
-// OBSOLETE #include "serial.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE #include <sys/types.h>
-// OBSOLETE
-// OBSOLETE #if (!defined(__GO32__) && !defined(_WIN32)) || defined(__CYGWIN__)
-// OBSOLETE #define HAVE_SOCKETS
-// OBSOLETE #include <sys/time.h>
-// OBSOLETE #include <sys/socket.h>
-// OBSOLETE #include <netinet/in.h>
-// OBSOLETE #include <netdb.h>
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE static struct target_ops sparclite_ops;
-// OBSOLETE
-// OBSOLETE static char *remote_target_name = NULL;
-// OBSOLETE static struct serial *remote_desc = NULL;
-// OBSOLETE static int serial_flag;
-// OBSOLETE #ifdef HAVE_SOCKETS
-// OBSOLETE static int udp_fd = -1;
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE static struct serial *open_tty (char *name);
-// OBSOLETE static int send_resp (struct serial *desc, char c);
-// OBSOLETE static void close_tty (void * ignore);
-// OBSOLETE #ifdef HAVE_SOCKETS
-// OBSOLETE static int recv_udp_buf (int fd, unsigned char *buf, int len, int timeout);
-// OBSOLETE static int send_udp_buf (int fd, unsigned char *buf, int len);
-// OBSOLETE #endif
-// OBSOLETE static void sparclite_open (char *name, int from_tty);
-// OBSOLETE static void sparclite_close (int quitting);
-// OBSOLETE static void download (char *target_name, char *args, int from_tty,
-// OBSOLETE void (*write_routine) (bfd * from_bfd,
-// OBSOLETE asection * from_sec,
-// OBSOLETE file_ptr from_addr,
-// OBSOLETE bfd_vma to_addr, int len),
-// OBSOLETE void (*start_routine) (bfd_vma entry));
-// OBSOLETE static void sparclite_serial_start (bfd_vma entry);
-// OBSOLETE static void sparclite_serial_write (bfd * from_bfd, asection * from_sec,
-// OBSOLETE file_ptr from_addr,
-// OBSOLETE bfd_vma to_addr, int len);
-// OBSOLETE #ifdef HAVE_SOCKETS
-// OBSOLETE static unsigned short calc_checksum (unsigned char *buffer, int count);
-// OBSOLETE static void sparclite_udp_start (bfd_vma entry);
-// OBSOLETE static void sparclite_udp_write (bfd * from_bfd, asection * from_sec,
-// OBSOLETE file_ptr from_addr, bfd_vma to_addr,
-// OBSOLETE int len);
-// OBSOLETE #endif
-// OBSOLETE static void sparclite_download (char *filename, int from_tty);
-// OBSOLETE
-// OBSOLETE #define DDA2_SUP_ASI 0xb000000
-// OBSOLETE #define DDA1_SUP_ASI 0xb0000
-// OBSOLETE
-// OBSOLETE #define DDA2_ASI_MASK 0xff000000
-// OBSOLETE #define DDA1_ASI_MASK 0xff0000
-// OBSOLETE #define DIA2_SUP_MODE 0x8000
-// OBSOLETE #define DIA1_SUP_MODE 0x4000
-// OBSOLETE #define DDA2_ENABLE 0x100
-// OBSOLETE #define DDA1_ENABLE 0x80
-// OBSOLETE #define DIA2_ENABLE 0x40
-// OBSOLETE #define DIA1_ENABLE 0x20
-// OBSOLETE #define DSINGLE_STEP 0x10 /* not used */
-// OBSOLETE #define DDV_TYPE_MASK 0xc
-// OBSOLETE #define DDV_TYPE_LOAD 0x0
-// OBSOLETE #define DDV_TYPE_STORE 0x4
-// OBSOLETE #define DDV_TYPE_ACCESS 0x8
-// OBSOLETE #define DDV_TYPE_ALWAYS 0xc
-// OBSOLETE #define DDV_COND 0x2
-// OBSOLETE #define DDV_MASK 0x1
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE sparclite_insert_watchpoint (CORE_ADDR addr, int len, int type)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR dcr;
-// OBSOLETE
-// OBSOLETE dcr = read_register (DCR_REGNUM);
-// OBSOLETE
-// OBSOLETE if (!(dcr & DDA1_ENABLE))
-// OBSOLETE {
-// OBSOLETE write_register (DDA1_REGNUM, addr);
-// OBSOLETE dcr &= ~(DDA1_ASI_MASK | DDV_TYPE_MASK);
-// OBSOLETE dcr |= (DDA1_SUP_ASI | DDA1_ENABLE);
-// OBSOLETE if (type == 1)
-// OBSOLETE {
-// OBSOLETE write_register (DDV1_REGNUM, 0);
-// OBSOLETE write_register (DDV2_REGNUM, 0xffffffff);
-// OBSOLETE dcr |= (DDV_TYPE_LOAD & (~DDV_COND & ~DDV_MASK));
-// OBSOLETE }
-// OBSOLETE else if (type == 0)
-// OBSOLETE {
-// OBSOLETE write_register (DDV1_REGNUM, 0);
-// OBSOLETE write_register (DDV2_REGNUM, 0xffffffff);
-// OBSOLETE dcr |= (DDV_TYPE_STORE & (~DDV_COND & ~DDV_MASK));
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE write_register (DDV1_REGNUM, 0);
-// OBSOLETE write_register (DDV2_REGNUM, 0xffffffff);
-// OBSOLETE dcr |= (DDV_TYPE_ACCESS);
-// OBSOLETE }
-// OBSOLETE write_register (DCR_REGNUM, dcr);
-// OBSOLETE }
-// OBSOLETE else if (!(dcr & DDA2_ENABLE))
-// OBSOLETE {
-// OBSOLETE write_register (DDA2_REGNUM, addr);
-// OBSOLETE dcr &= ~(DDA2_ASI_MASK & DDV_TYPE_MASK);
-// OBSOLETE dcr |= (DDA2_SUP_ASI | DDA2_ENABLE);
-// OBSOLETE if (type == 1)
-// OBSOLETE {
-// OBSOLETE write_register (DDV1_REGNUM, 0);
-// OBSOLETE write_register (DDV2_REGNUM, 0xffffffff);
-// OBSOLETE dcr |= (DDV_TYPE_LOAD & ~DDV_COND & ~DDV_MASK);
-// OBSOLETE }
-// OBSOLETE else if (type == 0)
-// OBSOLETE {
-// OBSOLETE write_register (DDV1_REGNUM, 0);
-// OBSOLETE write_register (DDV2_REGNUM, 0xffffffff);
-// OBSOLETE dcr |= (DDV_TYPE_STORE & ~DDV_COND & ~DDV_MASK);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE write_register (DDV1_REGNUM, 0);
-// OBSOLETE write_register (DDV2_REGNUM, 0xffffffff);
-// OBSOLETE dcr |= (DDV_TYPE_ACCESS);
-// OBSOLETE }
-// OBSOLETE write_register (DCR_REGNUM, dcr);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE return -1;
-// OBSOLETE
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE sparclite_remove_watchpoint (CORE_ADDR addr, int len, int type)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR dcr, dda1, dda2;
-// OBSOLETE
-// OBSOLETE dcr = read_register (DCR_REGNUM);
-// OBSOLETE dda1 = read_register (DDA1_REGNUM);
-// OBSOLETE dda2 = read_register (DDA2_REGNUM);
-// OBSOLETE
-// OBSOLETE if ((dcr & DDA1_ENABLE) && addr == dda1)
-// OBSOLETE write_register (DCR_REGNUM, (dcr & ~DDA1_ENABLE));
-// OBSOLETE else if ((dcr & DDA2_ENABLE) && addr == dda2)
-// OBSOLETE write_register (DCR_REGNUM, (dcr & ~DDA2_ENABLE));
-// OBSOLETE else
-// OBSOLETE return -1;
-// OBSOLETE
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE sparclite_insert_hw_breakpoint (CORE_ADDR addr, int len)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR dcr;
-// OBSOLETE
-// OBSOLETE dcr = read_register (DCR_REGNUM);
-// OBSOLETE
-// OBSOLETE if (!(dcr & DIA1_ENABLE))
-// OBSOLETE {
-// OBSOLETE write_register (DIA1_REGNUM, addr);
-// OBSOLETE write_register (DCR_REGNUM, (dcr | DIA1_ENABLE | DIA1_SUP_MODE));
-// OBSOLETE }
-// OBSOLETE else if (!(dcr & DIA2_ENABLE))
-// OBSOLETE {
-// OBSOLETE write_register (DIA2_REGNUM, addr);
-// OBSOLETE write_register (DCR_REGNUM, (dcr | DIA2_ENABLE | DIA2_SUP_MODE));
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE return -1;
-// OBSOLETE
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE sparclite_remove_hw_breakpoint (CORE_ADDR addr, int shadow)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR dcr, dia1, dia2;
-// OBSOLETE
-// OBSOLETE dcr = read_register (DCR_REGNUM);
-// OBSOLETE dia1 = read_register (DIA1_REGNUM);
-// OBSOLETE dia2 = read_register (DIA2_REGNUM);
-// OBSOLETE
-// OBSOLETE if ((dcr & DIA1_ENABLE) && addr == dia1)
-// OBSOLETE write_register (DCR_REGNUM, (dcr & ~DIA1_ENABLE));
-// OBSOLETE else if ((dcr & DIA2_ENABLE) && addr == dia2)
-// OBSOLETE write_register (DCR_REGNUM, (dcr & ~DIA2_ENABLE));
-// OBSOLETE else
-// OBSOLETE return -1;
-// OBSOLETE
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE sparclite_check_watch_resources (int type, int cnt, int ot)
-// OBSOLETE {
-// OBSOLETE /* Watchpoints not supported on simulator. */
-// OBSOLETE if (strcmp (target_shortname, "sim") == 0)
-// OBSOLETE return 0;
-// OBSOLETE
-// OBSOLETE if (type == bp_hardware_breakpoint)
-// OBSOLETE {
-// OBSOLETE if (TARGET_HW_BREAK_LIMIT == 0)
-// OBSOLETE return 0;
-// OBSOLETE else if (cnt <= TARGET_HW_BREAK_LIMIT)
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (TARGET_HW_WATCH_LIMIT == 0)
-// OBSOLETE return 0;
-// OBSOLETE else if (ot)
-// OBSOLETE return -1;
-// OBSOLETE else if (cnt <= TARGET_HW_WATCH_LIMIT)
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE return -1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE sparclite_stopped_data_address (void)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR dsr, dda1, dda2;
-// OBSOLETE
-// OBSOLETE dsr = read_register (DSR_REGNUM);
-// OBSOLETE dda1 = read_register (DDA1_REGNUM);
-// OBSOLETE dda2 = read_register (DDA2_REGNUM);
-// OBSOLETE
-// OBSOLETE if (dsr & 0x10)
-// OBSOLETE return dda1;
-// OBSOLETE else if (dsr & 0x20)
-// OBSOLETE return dda2;
-// OBSOLETE else
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static struct serial *
-// OBSOLETE open_tty (char *name)
-// OBSOLETE {
-// OBSOLETE struct serial *desc;
-// OBSOLETE
-// OBSOLETE desc = serial_open (name);
-// OBSOLETE if (!desc)
-// OBSOLETE perror_with_name (name);
-// OBSOLETE
-// OBSOLETE if (baud_rate != -1)
-// OBSOLETE {
-// OBSOLETE if (serial_setbaudrate (desc, baud_rate))
-// OBSOLETE {
-// OBSOLETE serial_close (desc);
-// OBSOLETE perror_with_name (name);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE serial_raw (desc);
-// OBSOLETE
-// OBSOLETE serial_flush_input (desc);
-// OBSOLETE
-// OBSOLETE return desc;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Read a single character from the remote end, masking it down to 7 bits. */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE readchar (struct serial *desc, int timeout)
-// OBSOLETE {
-// OBSOLETE int ch;
-// OBSOLETE char s[10];
-// OBSOLETE
-// OBSOLETE ch = serial_readchar (desc, timeout);
-// OBSOLETE
-// OBSOLETE switch (ch)
-// OBSOLETE {
-// OBSOLETE case SERIAL_EOF:
-// OBSOLETE error ("SPARClite remote connection closed");
-// OBSOLETE case SERIAL_ERROR:
-// OBSOLETE perror_with_name ("SPARClite communication error");
-// OBSOLETE case SERIAL_TIMEOUT:
-// OBSOLETE error ("SPARClite remote timeout");
-// OBSOLETE default:
-// OBSOLETE if (remote_debug > 0)
-// OBSOLETE {
-// OBSOLETE sprintf (s, "[%02x]", ch & 0xff);
-// OBSOLETE puts_debug ("read -->", s, "<--");
-// OBSOLETE }
-// OBSOLETE return ch;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE debug_serial_write (struct serial *desc, char *buf, int len)
-// OBSOLETE {
-// OBSOLETE char s[10];
-// OBSOLETE
-// OBSOLETE serial_write (desc, buf, len);
-// OBSOLETE if (remote_debug > 0)
-// OBSOLETE {
-// OBSOLETE while (len-- > 0)
-// OBSOLETE {
-// OBSOLETE sprintf (s, "[%02x]", *buf & 0xff);
-// OBSOLETE puts_debug ("Sent -->", s, "<--");
-// OBSOLETE buf++;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE send_resp (struct serial *desc, char c)
-// OBSOLETE {
-// OBSOLETE debug_serial_write (desc, &c, 1);
-// OBSOLETE return readchar (desc, remote_timeout);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE close_tty (void *ignore)
-// OBSOLETE {
-// OBSOLETE if (!remote_desc)
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE serial_close (remote_desc);
-// OBSOLETE
-// OBSOLETE remote_desc = NULL;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #ifdef HAVE_SOCKETS
-// OBSOLETE static int
-// OBSOLETE recv_udp_buf (int fd, unsigned char *buf, int len, int timeout)
-// OBSOLETE {
-// OBSOLETE int cc;
-// OBSOLETE fd_set readfds;
-// OBSOLETE
-// OBSOLETE FD_ZERO (&readfds);
-// OBSOLETE FD_SET (fd, &readfds);
-// OBSOLETE
-// OBSOLETE if (timeout >= 0)
-// OBSOLETE {
-// OBSOLETE struct timeval timebuf;
-// OBSOLETE
-// OBSOLETE timebuf.tv_sec = timeout;
-// OBSOLETE timebuf.tv_usec = 0;
-// OBSOLETE cc = select (fd + 1, &readfds, 0, 0, &timebuf);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE cc = select (fd + 1, &readfds, 0, 0, 0);
-// OBSOLETE
-// OBSOLETE if (cc == 0)
-// OBSOLETE return 0;
-// OBSOLETE
-// OBSOLETE if (cc != 1)
-// OBSOLETE perror_with_name ("recv_udp_buf: Bad return value from select:");
-// OBSOLETE
-// OBSOLETE cc = recv (fd, buf, len, 0);
-// OBSOLETE
-// OBSOLETE if (cc < 0)
-// OBSOLETE perror_with_name ("Got an error from recv: ");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE send_udp_buf (int fd, unsigned char *buf, int len)
-// OBSOLETE {
-// OBSOLETE int cc;
-// OBSOLETE
-// OBSOLETE cc = send (fd, buf, len, 0);
-// OBSOLETE
-// OBSOLETE if (cc == len)
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE if (cc < 0)
-// OBSOLETE perror_with_name ("Got an error from send: ");
-// OBSOLETE
-// OBSOLETE error ("Short count in send: tried %d, sent %d\n", len, cc);
-// OBSOLETE }
-// OBSOLETE #endif /* HAVE_SOCKETS */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE sparclite_open (char *name, int from_tty)
-// OBSOLETE {
-// OBSOLETE struct cleanup *old_chain;
-// OBSOLETE int c;
-// OBSOLETE char *p;
-// OBSOLETE
-// OBSOLETE if (!name)
-// OBSOLETE error ("You need to specify what device or hostname is associated with the SparcLite board.");
-// OBSOLETE
-// OBSOLETE target_preopen (from_tty);
-// OBSOLETE
-// OBSOLETE unpush_target (&sparclite_ops);
-// OBSOLETE
-// OBSOLETE if (remote_target_name)
-// OBSOLETE xfree (remote_target_name);
-// OBSOLETE
-// OBSOLETE remote_target_name = xstrdup (name);
-// OBSOLETE
-// OBSOLETE /* We need a 'serial' or 'udp' keyword to disambiguate host:port, which can
-// OBSOLETE mean either a serial port on a terminal server, or the IP address of a
-// OBSOLETE SPARClite demo board. If there's no colon, then it pretty much has to be
-// OBSOLETE a local device (except for DOS... grrmble) */
-// OBSOLETE
-// OBSOLETE p = strchr (name, ' ');
-// OBSOLETE
-// OBSOLETE if (p)
-// OBSOLETE {
-// OBSOLETE *p++ = '\000';
-// OBSOLETE while ((*p != '\000') && isspace (*p))
-// OBSOLETE p++;
-// OBSOLETE
-// OBSOLETE if (strncmp (name, "serial", strlen (name)) == 0)
-// OBSOLETE serial_flag = 1;
-// OBSOLETE else if (strncmp (name, "udp", strlen (name)) == 0)
-// OBSOLETE serial_flag = 0;
-// OBSOLETE else
-// OBSOLETE error ("Must specify either `serial' or `udp'.");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE p = name;
-// OBSOLETE
-// OBSOLETE if (!strchr (name, ':'))
-// OBSOLETE serial_flag = 1; /* No colon is unambiguous (local device) */
-// OBSOLETE else
-// OBSOLETE error ("Usage: target sparclite serial /dev/ttyb\n\
-// OBSOLETE or: target sparclite udp host");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (serial_flag)
-// OBSOLETE {
-// OBSOLETE remote_desc = open_tty (p);
-// OBSOLETE
-// OBSOLETE old_chain = make_cleanup (close_tty, 0 /*ignore*/);
-// OBSOLETE
-// OBSOLETE c = send_resp (remote_desc, 0x00);
-// OBSOLETE
-// OBSOLETE if (c != 0xaa)
-// OBSOLETE error ("Unknown response (0x%x) from SparcLite. Try resetting the board.",
-// OBSOLETE c);
-// OBSOLETE
-// OBSOLETE c = send_resp (remote_desc, 0x55);
-// OBSOLETE
-// OBSOLETE if (c != 0x55)
-// OBSOLETE error ("Sparclite appears to be ill.");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE #ifdef HAVE_SOCKETS
-// OBSOLETE struct hostent *he;
-// OBSOLETE struct sockaddr_in sockaddr;
-// OBSOLETE unsigned char buffer[100];
-// OBSOLETE int cc;
-// OBSOLETE
-// OBSOLETE /* Setup the socket. Must be raw UDP. */
-// OBSOLETE
-// OBSOLETE he = gethostbyname (p);
-// OBSOLETE
-// OBSOLETE if (!he)
-// OBSOLETE error ("No such host %s.", p);
-// OBSOLETE
-// OBSOLETE udp_fd = socket (PF_INET, SOCK_DGRAM, 0);
-// OBSOLETE
-// OBSOLETE old_chain = make_cleanup (close, udp_fd);
-// OBSOLETE
-// OBSOLETE sockaddr.sin_family = PF_INET;
-// OBSOLETE sockaddr.sin_port = htons (7000);
-// OBSOLETE memcpy (&sockaddr.sin_addr.s_addr, he->h_addr, sizeof (struct in_addr));
-// OBSOLETE
-// OBSOLETE if (connect (udp_fd, &sockaddr, sizeof (sockaddr)))
-// OBSOLETE perror_with_name ("Connect failed");
-// OBSOLETE
-// OBSOLETE buffer[0] = 0x5;
-// OBSOLETE buffer[1] = 0;
-// OBSOLETE
-// OBSOLETE send_udp_buf (udp_fd, buffer, 2); /* Request version */
-// OBSOLETE cc = recv_udp_buf (udp_fd, buffer, sizeof (buffer), 5); /* Get response */
-// OBSOLETE if (cc == 0)
-// OBSOLETE error ("SPARClite isn't responding.");
-// OBSOLETE
-// OBSOLETE if (cc < 3)
-// OBSOLETE error ("SPARClite appears to be ill.");
-// OBSOLETE #else
-// OBSOLETE error ("UDP downloading is not supported for DOS hosts.");
-// OBSOLETE #endif /* HAVE_SOCKETS */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE printf_unfiltered ("[SPARClite appears to be alive]\n");
-// OBSOLETE
-// OBSOLETE push_target (&sparclite_ops);
-// OBSOLETE
-// OBSOLETE discard_cleanups (old_chain);
-// OBSOLETE
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE sparclite_close (int quitting)
-// OBSOLETE {
-// OBSOLETE if (serial_flag)
-// OBSOLETE close_tty (0);
-// OBSOLETE #ifdef HAVE_SOCKETS
-// OBSOLETE else if (udp_fd != -1)
-// OBSOLETE close (udp_fd);
-// OBSOLETE #endif
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define LOAD_ADDRESS 0x40000000
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE download (char *target_name, char *args, int from_tty,
-// OBSOLETE void (*write_routine) (bfd *from_bfd, asection *from_sec,
-// OBSOLETE file_ptr from_addr, bfd_vma to_addr, int len),
-// OBSOLETE void (*start_routine) (bfd_vma entry))
-// OBSOLETE {
-// OBSOLETE struct cleanup *old_chain;
-// OBSOLETE asection *section;
-// OBSOLETE bfd *pbfd;
-// OBSOLETE bfd_vma entry;
-// OBSOLETE int i;
-// OBSOLETE #define WRITESIZE 1024
-// OBSOLETE char *filename;
-// OBSOLETE int quiet;
-// OBSOLETE int nostart;
-// OBSOLETE
-// OBSOLETE quiet = 0;
-// OBSOLETE nostart = 0;
-// OBSOLETE filename = NULL;
-// OBSOLETE
-// OBSOLETE while (*args != '\000')
-// OBSOLETE {
-// OBSOLETE char *arg;
-// OBSOLETE
-// OBSOLETE while (isspace (*args))
-// OBSOLETE args++;
-// OBSOLETE
-// OBSOLETE arg = args;
-// OBSOLETE
-// OBSOLETE while ((*args != '\000') && !isspace (*args))
-// OBSOLETE args++;
-// OBSOLETE
-// OBSOLETE if (*args != '\000')
-// OBSOLETE *args++ = '\000';
-// OBSOLETE
-// OBSOLETE if (*arg != '-')
-// OBSOLETE filename = arg;
-// OBSOLETE else if (strncmp (arg, "-quiet", strlen (arg)) == 0)
-// OBSOLETE quiet = 1;
-// OBSOLETE else if (strncmp (arg, "-nostart", strlen (arg)) == 0)
-// OBSOLETE nostart = 1;
-// OBSOLETE else
-// OBSOLETE error ("unknown option `%s'", arg);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (!filename)
-// OBSOLETE filename = get_exec_file (1);
-// OBSOLETE
-// OBSOLETE pbfd = bfd_openr (filename, gnutarget);
-// OBSOLETE if (pbfd == NULL)
-// OBSOLETE {
-// OBSOLETE perror_with_name (filename);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE old_chain = make_cleanup_bfd_close (pbfd);
-// OBSOLETE
-// OBSOLETE if (!bfd_check_format (pbfd, bfd_object))
-// OBSOLETE error ("\"%s\" is not an object file: %s", filename,
-// OBSOLETE bfd_errmsg (bfd_get_error ()));
-// OBSOLETE
-// OBSOLETE for (section = pbfd->sections; section; section = section->next)
-// OBSOLETE {
-// OBSOLETE if (bfd_get_section_flags (pbfd, section) & SEC_LOAD)
-// OBSOLETE {
-// OBSOLETE bfd_vma section_address;
-// OBSOLETE bfd_size_type section_size;
-// OBSOLETE file_ptr fptr;
-// OBSOLETE const char *section_name;
-// OBSOLETE
-// OBSOLETE section_name = bfd_get_section_name (pbfd, section);
-// OBSOLETE
-// OBSOLETE section_address = bfd_get_section_vma (pbfd, section);
-// OBSOLETE
-// OBSOLETE /* Adjust sections from a.out files, since they don't
-// OBSOLETE carry their addresses with. */
-// OBSOLETE if (bfd_get_flavour (pbfd) == bfd_target_aout_flavour)
-// OBSOLETE {
-// OBSOLETE if (strcmp (section_name, ".text") == 0)
-// OBSOLETE section_address = bfd_get_start_address (pbfd);
-// OBSOLETE else if (strcmp (section_name, ".data") == 0)
-// OBSOLETE {
-// OBSOLETE /* Read the first 8 bytes of the data section.
-// OBSOLETE There should be the string 'DaTa' followed by
-// OBSOLETE a word containing the actual section address. */
-// OBSOLETE struct data_marker
-// OBSOLETE {
-// OBSOLETE char signature[4]; /* 'DaTa' */
-// OBSOLETE unsigned char sdata[4]; /* &sdata */
-// OBSOLETE }
-// OBSOLETE marker;
-// OBSOLETE bfd_get_section_contents (pbfd, section, &marker, 0,
-// OBSOLETE sizeof (marker));
-// OBSOLETE if (strncmp (marker.signature, "DaTa", 4) == 0)
-// OBSOLETE {
-// OBSOLETE if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-// OBSOLETE section_address = bfd_getb32 (marker.sdata);
-// OBSOLETE else
-// OBSOLETE section_address = bfd_getl32 (marker.sdata);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE section_size = bfd_get_section_size_before_reloc (section);
-// OBSOLETE
-// OBSOLETE if (!quiet)
-// OBSOLETE printf_filtered ("[Loading section %s at 0x%x (%d bytes)]\n",
-// OBSOLETE bfd_get_section_name (pbfd, section),
-// OBSOLETE section_address,
-// OBSOLETE section_size);
-// OBSOLETE
-// OBSOLETE fptr = 0;
-// OBSOLETE while (section_size > 0)
-// OBSOLETE {
-// OBSOLETE int count;
-// OBSOLETE static char inds[] = "|/-\\";
-// OBSOLETE static int k = 0;
-// OBSOLETE
-// OBSOLETE QUIT;
-// OBSOLETE
-// OBSOLETE count = min (section_size, WRITESIZE);
-// OBSOLETE
-// OBSOLETE write_routine (pbfd, section, fptr, section_address, count);
-// OBSOLETE
-// OBSOLETE if (!quiet)
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("\r%c", inds[k++ % 4]);
-// OBSOLETE gdb_flush (gdb_stdout);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE section_address += count;
-// OBSOLETE fptr += count;
-// OBSOLETE section_size -= count;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (!nostart)
-// OBSOLETE {
-// OBSOLETE entry = bfd_get_start_address (pbfd);
-// OBSOLETE
-// OBSOLETE if (!quiet)
-// OBSOLETE printf_unfiltered ("[Starting %s at 0x%x]\n", filename, entry);
-// OBSOLETE
-// OBSOLETE start_routine (entry);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE do_cleanups (old_chain);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE sparclite_serial_start (bfd_vma entry)
-// OBSOLETE {
-// OBSOLETE char buffer[5];
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE buffer[0] = 0x03;
-// OBSOLETE store_unsigned_integer (buffer + 1, 4, entry);
-// OBSOLETE
-// OBSOLETE debug_serial_write (remote_desc, buffer, 1 + 4);
-// OBSOLETE i = readchar (remote_desc, remote_timeout);
-// OBSOLETE if (i != 0x55)
-// OBSOLETE error ("Can't start SparcLite. Error code %d\n", i);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE sparclite_serial_write (bfd *from_bfd, asection *from_sec, file_ptr from_addr,
-// OBSOLETE bfd_vma to_addr, int len)
-// OBSOLETE {
-// OBSOLETE char buffer[4 + 4 + WRITESIZE]; /* addr + len + data */
-// OBSOLETE unsigned char checksum;
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE store_unsigned_integer (buffer, 4, to_addr); /* Address */
-// OBSOLETE store_unsigned_integer (buffer + 4, 4, len); /* Length */
-// OBSOLETE
-// OBSOLETE bfd_get_section_contents (from_bfd, from_sec, buffer + 8, from_addr, len);
-// OBSOLETE
-// OBSOLETE checksum = 0;
-// OBSOLETE for (i = 0; i < len; i++)
-// OBSOLETE checksum += buffer[8 + i];
-// OBSOLETE
-// OBSOLETE i = send_resp (remote_desc, 0x01);
-// OBSOLETE
-// OBSOLETE if (i != 0x5a)
-// OBSOLETE error ("Bad response from load command (0x%x)", i);
-// OBSOLETE
-// OBSOLETE debug_serial_write (remote_desc, buffer, 4 + 4 + len);
-// OBSOLETE i = readchar (remote_desc, remote_timeout);
-// OBSOLETE
-// OBSOLETE if (i != checksum)
-// OBSOLETE error ("Bad checksum from load command (0x%x)", i);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #ifdef HAVE_SOCKETS
-// OBSOLETE
-// OBSOLETE static unsigned short
-// OBSOLETE calc_checksum (unsigned char *buffer, int count)
-// OBSOLETE {
-// OBSOLETE unsigned short checksum;
-// OBSOLETE
-// OBSOLETE checksum = 0;
-// OBSOLETE for (; count > 0; count -= 2, buffer += 2)
-// OBSOLETE checksum += (*buffer << 8) | *(buffer + 1);
-// OBSOLETE
-// OBSOLETE if (count != 0)
-// OBSOLETE checksum += *buffer << 8;
-// OBSOLETE
-// OBSOLETE return checksum;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE sparclite_udp_start (bfd_vma entry)
-// OBSOLETE {
-// OBSOLETE unsigned char buffer[6];
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE buffer[0] = 0x3;
-// OBSOLETE buffer[1] = 0;
-// OBSOLETE buffer[2] = entry >> 24;
-// OBSOLETE buffer[3] = entry >> 16;
-// OBSOLETE buffer[4] = entry >> 8;
-// OBSOLETE buffer[5] = entry;
-// OBSOLETE
-// OBSOLETE send_udp_buf (udp_fd, buffer, 6); /* Send start addr */
-// OBSOLETE i = recv_udp_buf (udp_fd, buffer, sizeof (buffer), -1); /* Get response */
-// OBSOLETE
-// OBSOLETE if (i < 1 || buffer[0] != 0x55)
-// OBSOLETE error ("Failed to take start address.");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE sparclite_udp_write (bfd *from_bfd, asection *from_sec, file_ptr from_addr,
-// OBSOLETE bfd_vma to_addr, int len)
-// OBSOLETE {
-// OBSOLETE unsigned char buffer[2000];
-// OBSOLETE unsigned short checksum;
-// OBSOLETE static int pkt_num = 0;
-// OBSOLETE static unsigned long old_addr = -1;
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE if (to_addr != old_addr)
-// OBSOLETE {
-// OBSOLETE buffer[0] = 0x1; /* Load command */
-// OBSOLETE buffer[1] = 0x1; /* Loading address */
-// OBSOLETE buffer[2] = to_addr >> 24;
-// OBSOLETE buffer[3] = to_addr >> 16;
-// OBSOLETE buffer[4] = to_addr >> 8;
-// OBSOLETE buffer[5] = to_addr;
-// OBSOLETE
-// OBSOLETE checksum = 0;
-// OBSOLETE for (i = 0; i < 6; i++)
-// OBSOLETE checksum += buffer[i];
-// OBSOLETE checksum &= 0xff;
-// OBSOLETE
-// OBSOLETE send_udp_buf (udp_fd, buffer, 6);
-// OBSOLETE i = recv_udp_buf (udp_fd, buffer, sizeof buffer, -1);
-// OBSOLETE
-// OBSOLETE if (i < 1)
-// OBSOLETE error ("Got back short checksum for load addr.");
-// OBSOLETE
-// OBSOLETE if (checksum != buffer[0])
-// OBSOLETE error ("Got back bad checksum for load addr.");
-// OBSOLETE
-// OBSOLETE pkt_num = 0; /* Load addr resets packet seq # */
-// OBSOLETE old_addr = to_addr;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE bfd_get_section_contents (from_bfd, from_sec, buffer + 6, from_addr,
-// OBSOLETE len);
-// OBSOLETE
-// OBSOLETE checksum = calc_checksum (buffer + 6, len);
-// OBSOLETE
-// OBSOLETE buffer[0] = 0x1; /* Load command */
-// OBSOLETE buffer[1] = 0x2; /* Loading data */
-// OBSOLETE buffer[2] = pkt_num >> 8;
-// OBSOLETE buffer[3] = pkt_num;
-// OBSOLETE buffer[4] = checksum >> 8;
-// OBSOLETE buffer[5] = checksum;
-// OBSOLETE
-// OBSOLETE send_udp_buf (udp_fd, buffer, len + 6);
-// OBSOLETE i = recv_udp_buf (udp_fd, buffer, sizeof buffer, 3);
-// OBSOLETE
-// OBSOLETE if (i == 0)
-// OBSOLETE {
-// OBSOLETE fprintf_unfiltered (gdb_stderr, "send_data: timeout sending %d bytes to address 0x%x retrying\n", len, to_addr);
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (buffer[0] != 0xff)
-// OBSOLETE error ("Got back bad response for load data.");
-// OBSOLETE
-// OBSOLETE old_addr += len;
-// OBSOLETE pkt_num++;
-// OBSOLETE
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #endif /* HAVE_SOCKETS */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE sparclite_download (char *filename, int from_tty)
-// OBSOLETE {
-// OBSOLETE if (!serial_flag)
-// OBSOLETE #ifdef HAVE_SOCKETS
-// OBSOLETE download (remote_target_name, filename, from_tty, sparclite_udp_write,
-// OBSOLETE sparclite_udp_start);
-// OBSOLETE #else
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check"); /* sparclite_open should prevent this! */
-// OBSOLETE #endif
-// OBSOLETE else
-// OBSOLETE download (remote_target_name, filename, from_tty, sparclite_serial_write,
-// OBSOLETE sparclite_serial_start);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Set up the sparclite target vector. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE init_sparclite_ops (void)
-// OBSOLETE {
-// OBSOLETE sparclite_ops.to_shortname = "sparclite";
-// OBSOLETE sparclite_ops.to_longname = "SPARClite download target";
-// OBSOLETE sparclite_ops.to_doc = "Download to a remote SPARClite target board via serial of UDP.\n\
-// OBSOLETE Specify the device it is connected to (e.g. /dev/ttya).";
-// OBSOLETE sparclite_ops.to_open = sparclite_open;
-// OBSOLETE sparclite_ops.to_close = sparclite_close;
-// OBSOLETE sparclite_ops.to_load = sparclite_download;
-// OBSOLETE sparclite_ops.to_stratum = download_stratum;
-// OBSOLETE sparclite_ops.to_magic = OPS_MAGIC;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE _initialize_sparcl_tdep (void)
-// OBSOLETE {
-// OBSOLETE init_sparclite_ops ();
-// OBSOLETE add_target (&sparclite_ops);
-// OBSOLETE }
diff --git a/gdb/sparclet-rom.c b/gdb/sparclet-rom.c
deleted file mode 100644
index 9247131..0000000
--- a/gdb/sparclet-rom.c
+++ /dev/null
@@ -1,316 +0,0 @@
-// OBSOLETE /* Remote target glue for the SPARC Sparclet ROM monitor.
-// OBSOLETE
-// OBSOLETE Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free
-// OBSOLETE 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 #include "defs.h"
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include "target.h"
-// OBSOLETE #include "monitor.h"
-// OBSOLETE #include "serial.h"
-// OBSOLETE #include "srec.h"
-// OBSOLETE #include "symtab.h"
-// OBSOLETE #include "symfile.h" /* for generic_load */
-// OBSOLETE #include "regcache.h"
-// OBSOLETE #include <time.h>
-// OBSOLETE
-// OBSOLETE extern void report_transfer_performance (unsigned long, time_t, time_t);
-// OBSOLETE
-// OBSOLETE static struct target_ops sparclet_ops;
-// OBSOLETE
-// OBSOLETE static void sparclet_open (char *args, int from_tty);
-// OBSOLETE
-// OBSOLETE /* This array of registers need to match the indexes used by GDB.
-// OBSOLETE This exists because the various ROM monitors use different strings
-// OBSOLETE than does GDB, and don't necessarily support all the registers
-// OBSOLETE either. So, typing "info reg sp" becomes a "r30". */
-// OBSOLETE
-// OBSOLETE /*PSR 0x00000080 impl ver icc AW LE EE EC EF PIL S PS ET CWP WIM
-// OBSOLETE 0x0 0x0 0x0 0 0 0 0 0 0x0 1 0 0 0x00 0x2
-// OBSOLETE 0000010
-// OBSOLETE INS LOCALS OUTS GLOBALS
-// OBSOLETE 0 0x00000000 0x00000000 0x00000000 0x00000000
-// OBSOLETE 1 0x00000000 0x00000000 0x00000000 0x00000000
-// OBSOLETE 2 0x00000000 0x00000000 0x00000000 0x00000000
-// OBSOLETE 3 0x00000000 0x00000000 0x00000000 0x00000000
-// OBSOLETE 4 0x00000000 0x00000000 0x00000000 0x00000000
-// OBSOLETE 5 0x00000000 0x00001000 0x00000000 0x00000000
-// OBSOLETE 6 0x00000000 0x00000000 0x123f0000 0x00000000
-// OBSOLETE 7 0x00000000 0x00000000 0x00000000 0x00000000
-// OBSOLETE pc: 0x12010000 0x00000000 unimp
-// OBSOLETE npc: 0x12010004 0x00001000 unimp 0x1000
-// OBSOLETE tbr: 0x00000000
-// OBSOLETE y: 0x00000000
-// OBSOLETE */
-// OBSOLETE /* these correspond to the offsets from tm-* files from config directories */
-// OBSOLETE
-// OBSOLETE /* is wim part of psr?? */
-// OBSOLETE /* monitor wants lower case */
-// OBSOLETE static char *sparclet_regnames[] = {
-// OBSOLETE "g0", "g1", "g2", "g3", "g4", "g5", "g6", "g7",
-// OBSOLETE "o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7",
-// OBSOLETE "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7",
-// OBSOLETE "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7",
-// OBSOLETE
-// OBSOLETE "", "", "", "", "", "", "", "", /* no FPU regs */
-// OBSOLETE "", "", "", "", "", "", "", "",
-// OBSOLETE "", "", "", "", "", "", "", "",
-// OBSOLETE "", "", "", "", "", "", "", "",
-// OBSOLETE /* no CPSR, FPSR */
-// OBSOLETE "y", "psr", "wim", "tbr", "pc", "npc", "", "",
-// OBSOLETE
-// OBSOLETE "ccsr", "ccpr", "cccrcr", "ccor", "ccobr", "ccibr", "ccir", "",
-// OBSOLETE
-// OBSOLETE /* ASR15 ASR19 (don't display them) */
-// OBSOLETE "asr1", "", "asr17", "asr18", "", "asr20", "asr21", "asr22",
-// OBSOLETE /*
-// OBSOLETE "awr0", "awr1", "awr2", "awr3", "awr4", "awr5", "awr6", "awr7",
-// OBSOLETE "awr8", "awr9", "awr10", "awr11", "awr12", "awr13", "awr14", "awr15",
-// OBSOLETE "awr16", "awr17", "awr18", "awr19", "awr20", "awr21", "awr22", "awr23",
-// OBSOLETE "awr24", "awr25", "awr26", "awr27", "awr28", "awr29", "awr30", "awr31",
-// OBSOLETE "apsr",
-// OBSOLETE */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* Function: sparclet_supply_register
-// OBSOLETE Just returns with no action.
-// OBSOLETE This function is required, because parse_register_dump (monitor.c)
-// OBSOLETE expects to be able to call it. If we don't supply something, it will
-// OBSOLETE call a null pointer and core-dump. Since this function does not
-// OBSOLETE actually do anything, GDB will request the registers individually. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE sparclet_supply_register (char *regname, int regnamelen, char *val, int vallen)
-// OBSOLETE {
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE sparclet_load (struct serial *desc, char *file, int hashmark)
-// OBSOLETE {
-// OBSOLETE bfd *abfd;
-// OBSOLETE asection *s;
-// OBSOLETE int i;
-// OBSOLETE CORE_ADDR load_offset;
-// OBSOLETE time_t start_time, end_time;
-// OBSOLETE unsigned long data_count = 0;
-// OBSOLETE
-// OBSOLETE /* enable user to specify address for downloading as 2nd arg to load */
-// OBSOLETE
-// OBSOLETE i = sscanf (file, "%*s 0x%lx", &load_offset);
-// OBSOLETE if (i >= 1)
-// OBSOLETE {
-// OBSOLETE char *p;
-// OBSOLETE
-// OBSOLETE for (p = file; *p != '\000' && !isspace (*p); p++);
-// OBSOLETE
-// OBSOLETE *p = '\000';
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE load_offset = 0;
-// OBSOLETE
-// OBSOLETE abfd = bfd_openr (file, 0);
-// OBSOLETE if (!abfd)
-// OBSOLETE {
-// OBSOLETE printf_filtered ("Unable to open file %s\n", file);
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (bfd_check_format (abfd, bfd_object) == 0)
-// OBSOLETE {
-// OBSOLETE printf_filtered ("File is not an object file\n");
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE start_time = time (NULL);
-// OBSOLETE
-// OBSOLETE for (s = abfd->sections; s; s = s->next)
-// OBSOLETE if (s->flags & SEC_LOAD)
-// OBSOLETE {
-// OBSOLETE bfd_size_type section_size;
-// OBSOLETE bfd_vma vma;
-// OBSOLETE
-// OBSOLETE vma = bfd_get_section_vma (abfd, s) + load_offset;
-// OBSOLETE section_size = bfd_section_size (abfd, s);
-// OBSOLETE
-// OBSOLETE data_count += section_size;
-// OBSOLETE
-// OBSOLETE printf_filtered ("%s\t: 0x%4x .. 0x%4x ",
-// OBSOLETE bfd_get_section_name (abfd, s), vma,
-// OBSOLETE vma + section_size);
-// OBSOLETE gdb_flush (gdb_stdout);
-// OBSOLETE
-// OBSOLETE monitor_printf ("load c r %x %x\r", vma, section_size);
-// OBSOLETE
-// OBSOLETE monitor_expect ("load: loading ", NULL, 0);
-// OBSOLETE monitor_expect ("\r", NULL, 0);
-// OBSOLETE
-// OBSOLETE for (i = 0; i < section_size; i += 2048)
-// OBSOLETE {
-// OBSOLETE int numbytes;
-// OBSOLETE char buf[2048];
-// OBSOLETE
-// OBSOLETE numbytes = min (sizeof buf, section_size - i);
-// OBSOLETE
-// OBSOLETE bfd_get_section_contents (abfd, s, buf, i, numbytes);
-// OBSOLETE
-// OBSOLETE serial_write (desc, buf, numbytes);
-// OBSOLETE
-// OBSOLETE if (hashmark)
-// OBSOLETE {
-// OBSOLETE putchar_unfiltered ('#');
-// OBSOLETE gdb_flush (gdb_stdout);
-// OBSOLETE }
-// OBSOLETE } /* Per-packet (or S-record) loop */
-// OBSOLETE
-// OBSOLETE monitor_expect_prompt (NULL, 0);
-// OBSOLETE
-// OBSOLETE putchar_unfiltered ('\n');
-// OBSOLETE } /* Loadable sections */
-// OBSOLETE
-// OBSOLETE monitor_printf ("reg pc %x\r", bfd_get_start_address (abfd));
-// OBSOLETE monitor_expect_prompt (NULL, 0);
-// OBSOLETE monitor_printf ("reg npc %x\r", bfd_get_start_address (abfd) + 4);
-// OBSOLETE monitor_expect_prompt (NULL, 0);
-// OBSOLETE
-// OBSOLETE monitor_printf ("run\r");
-// OBSOLETE
-// OBSOLETE end_time = time (NULL);
-// OBSOLETE
-// OBSOLETE if (hashmark)
-// OBSOLETE putchar_unfiltered ('\n');
-// OBSOLETE
-// OBSOLETE report_transfer_performance (data_count, start_time, end_time);
-// OBSOLETE
-// OBSOLETE pop_target ();
-// OBSOLETE push_remote_target (monitor_get_dev_name (), 1);
-// OBSOLETE
-// OBSOLETE throw_exception (RETURN_QUIT);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Define the monitor command strings. Since these are passed directly
-// OBSOLETE through to a printf style function, we may include formatting
-// OBSOLETE strings. We also need a CR or LF on the end. */
-// OBSOLETE
-// OBSOLETE /* need to pause the monitor for timing reasons, so slow it down */
-// OBSOLETE
-// OBSOLETE static char *sparclet_inits[] =
-// OBSOLETE {"\n\r\r\n", NULL};
-// OBSOLETE
-// OBSOLETE static struct monitor_ops sparclet_cmds;
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE init_sparclet_cmds (void)
-// OBSOLETE {
-// OBSOLETE sparclet_cmds.flags = MO_CLR_BREAK_USES_ADDR |
-// OBSOLETE MO_HEX_PREFIX |
-// OBSOLETE MO_NO_ECHO_ON_OPEN |
-// OBSOLETE MO_NO_ECHO_ON_SETMEM |
-// OBSOLETE MO_RUN_FIRST_TIME |
-// OBSOLETE MO_GETMEM_READ_SINGLE; /* flags */
-// OBSOLETE sparclet_cmds.init = sparclet_inits; /* Init strings */
-// OBSOLETE sparclet_cmds.cont = "cont\r"; /* continue command */
-// OBSOLETE sparclet_cmds.step = "step\r"; /* single step */
-// OBSOLETE sparclet_cmds.stop = "\r"; /* break interrupts the program */
-// OBSOLETE sparclet_cmds.set_break = "+bp %x\r"; /* set a breakpoint */
-// OBSOLETE sparclet_cmds.clr_break = "-bp %x\r"; /* can't use "br" because only 2 hw bps are supported */
-// OBSOLETE sparclet_cmds.clr_all_break = "-bp %x\r"; /* clear a breakpoint */
-// OBSOLETE "-bp\r"; /* clear all breakpoints */
-// OBSOLETE sparclet_cmds.fill = "fill %x -n %x -v %x -b\r"; /* fill (start length val) */
-// OBSOLETE /* can't use "fi" because it takes words, not bytes */
-// OBSOLETE /* ex [addr] [-n count] [-b|-s|-l] default: ex cur -n 1 -b */
-// OBSOLETE sparclet_cmds.setmem.cmdb = "ex %x -b\r%x\rq\r"; /* setmem.cmdb (addr, value) */
-// OBSOLETE sparclet_cmds.setmem.cmdw = "ex %x -s\r%x\rq\r"; /* setmem.cmdw (addr, value) */
-// OBSOLETE sparclet_cmds.setmem.cmdl = "ex %x -l\r%x\rq\r"; /* setmem.cmdl (addr, value) */
-// OBSOLETE sparclet_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
-// OBSOLETE sparclet_cmds.setmem.resp_delim = NULL; /*": " *//* setmem.resp_delim */
-// OBSOLETE sparclet_cmds.setmem.term = NULL; /*"? " *//* setmem.term */
-// OBSOLETE sparclet_cmds.setmem.term_cmd = NULL; /*"q\r" *//* setmem.term_cmd */
-// OBSOLETE /* since the parsing of multiple bytes is difficult due to
-// OBSOLETE interspersed addresses, we'll only read 1 value at a time,
-// OBSOLETE even tho these can handle a count */
-// OBSOLETE /* we can use -n to set count to read, but may have to parse? */
-// OBSOLETE sparclet_cmds.getmem.cmdb = "ex %x -n 1 -b\r"; /* getmem.cmdb (addr, #bytes) */
-// OBSOLETE sparclet_cmds.getmem.cmdw = "ex %x -n 1 -s\r"; /* getmem.cmdw (addr, #swords) */
-// OBSOLETE sparclet_cmds.getmem.cmdl = "ex %x -n 1 -l\r"; /* getmem.cmdl (addr, #words) */
-// OBSOLETE sparclet_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, #dwords) */
-// OBSOLETE sparclet_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */
-// OBSOLETE sparclet_cmds.getmem.term = NULL; /* getmem.term */
-// OBSOLETE sparclet_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
-// OBSOLETE sparclet_cmds.setreg.cmd = "reg %s 0x%x\r"; /* setreg.cmd (name, value) */
-// OBSOLETE sparclet_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
-// OBSOLETE sparclet_cmds.setreg.term = NULL; /* setreg.term */
-// OBSOLETE sparclet_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
-// OBSOLETE sparclet_cmds.getreg.cmd = "reg %s\r"; /* getreg.cmd (name) */
-// OBSOLETE sparclet_cmds.getreg.resp_delim = " "; /* getreg.resp_delim */
-// OBSOLETE sparclet_cmds.getreg.term = NULL; /* getreg.term */
-// OBSOLETE sparclet_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
-// OBSOLETE sparclet_cmds.dump_registers = "reg\r"; /* dump_registers */
-// OBSOLETE sparclet_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\)"; /* register_pattern */
-// OBSOLETE sparclet_cmds.supply_register = sparclet_supply_register; /* supply_register */
-// OBSOLETE sparclet_cmds.load_routine = sparclet_load; /* load_routine */
-// OBSOLETE sparclet_cmds.load = NULL; /* download command (srecs on console) */
-// OBSOLETE sparclet_cmds.loadresp = NULL; /* load response */
-// OBSOLETE sparclet_cmds.prompt = "monitor>"; /* monitor command prompt */
-// OBSOLETE /* yikes! gdb core dumps without this delimitor!! */
-// OBSOLETE sparclet_cmds.line_term = "\r"; /* end-of-command delimitor */
-// OBSOLETE sparclet_cmds.cmd_end = NULL; /* optional command terminator */
-// OBSOLETE sparclet_cmds.target = &sparclet_ops; /* target operations */
-// OBSOLETE sparclet_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
-// OBSOLETE sparclet_cmds.regnames = sparclet_regnames; /* registers names */
-// OBSOLETE sparclet_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE sparclet_open (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE monitor_open (args, &sparclet_cmds, from_tty);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE _initialize_sparclet (void)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE init_sparclet_cmds ();
-// OBSOLETE
-// OBSOLETE for (i = 0; i < NUM_REGS; i++)
-// OBSOLETE if (sparclet_regnames[i][0] == 'c' ||
-// OBSOLETE sparclet_regnames[i][0] == 'a')
-// OBSOLETE sparclet_regnames[i] = 0; /* mon can't report c* or a* regs */
-// OBSOLETE
-// OBSOLETE sparclet_regnames[0] = 0; /* mon won't report %G0 */
-// OBSOLETE
-// OBSOLETE init_monitor_ops (&sparclet_ops);
-// OBSOLETE sparclet_ops.to_shortname = "sparclet"; /* for the target command */
-// OBSOLETE sparclet_ops.to_longname = "SPARC Sparclet monitor";
-// OBSOLETE /* use SW breaks; target only supports 2 HW breakpoints */
-// OBSOLETE sparclet_ops.to_insert_breakpoint = memory_insert_breakpoint;
-// OBSOLETE sparclet_ops.to_remove_breakpoint = memory_remove_breakpoint;
-// OBSOLETE
-// OBSOLETE sparclet_ops.to_doc =
-// OBSOLETE "Use a board running the Sparclet debug monitor.\n\
-// OBSOLETE Specify the serial device it is connected to (e.g. /dev/ttya).";
-// OBSOLETE
-// OBSOLETE sparclet_ops.to_open = sparclet_open;
-// OBSOLETE add_target (&sparclet_ops);
-// OBSOLETE }
diff --git a/gdb/sparclet-stub.c b/gdb/sparclet-stub.c
deleted file mode 100644
index 88740f2..0000000
--- a/gdb/sparclet-stub.c
+++ /dev/null
@@ -1,1167 +0,0 @@
-// OBSOLETE /****************************************************************************
-// OBSOLETE
-// OBSOLETE THIS SOFTWARE IS NOT COPYRIGHTED
-// OBSOLETE
-// OBSOLETE HP offers the following for use in the public domain. HP makes no
-// OBSOLETE warranty with regard to the software or it's performance and the
-// OBSOLETE user accepts the software "AS IS" with all faults.
-// OBSOLETE
-// OBSOLETE HP DISCLAIMS ANY WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD
-// OBSOLETE TO THIS SOFTWARE INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-// OBSOLETE OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-// OBSOLETE
-// OBSOLETE ****************************************************************************/
-// OBSOLETE
-// OBSOLETE /****************************************************************************
-// OBSOLETE * Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $
-// OBSOLETE *
-// OBSOLETE * Module name: remcom.c $
-// OBSOLETE * Revision: 1.34 $
-// OBSOLETE * Date: 91/03/09 12:29:49 $
-// OBSOLETE * Contributor: Lake Stevens Instrument Division$
-// OBSOLETE *
-// OBSOLETE * Description: low level support for gdb debugger. $
-// OBSOLETE *
-// OBSOLETE * Considerations: only works on target hardware $
-// OBSOLETE *
-// OBSOLETE * Written by: Glenn Engel $
-// OBSOLETE * ModuleState: Experimental $
-// OBSOLETE *
-// OBSOLETE * NOTES: See Below $
-// OBSOLETE *
-// OBSOLETE * Modified for SPARC by Stu Grossman, Cygnus Support.
-// OBSOLETE * Based on sparc-stub.c, it's modified for SPARClite Debug Unit hardware
-// OBSOLETE * breakpoint support to create sparclite-stub.c, by Kung Hsu, Cygnus Support.
-// OBSOLETE *
-// OBSOLETE * This code has been extensively tested on the Fujitsu SPARClite demo board.
-// OBSOLETE *
-// OBSOLETE * To enable debugger support, two things need to happen. One, a
-// OBSOLETE * call to set_debug_traps() is necessary in order to allow any breakpoints
-// OBSOLETE * or error conditions to be properly intercepted and reported to gdb.
-// OBSOLETE * Two, a breakpoint needs to be generated to begin communication. This
-// OBSOLETE * is most easily accomplished by a call to breakpoint(). Breakpoint()
-// OBSOLETE * simulates a breakpoint by executing a trap #1.
-// OBSOLETE *
-// OBSOLETE *************
-// OBSOLETE *
-// OBSOLETE * The following gdb commands are supported:
-// OBSOLETE *
-// OBSOLETE * command function Return value
-// OBSOLETE *
-// OBSOLETE * g return the value of the CPU registers hex data or ENN
-// OBSOLETE * G set the value of the CPU registers OK or ENN
-// OBSOLETE * P set the value of a single CPU register OK or ENN
-// OBSOLETE *
-// OBSOLETE * mAA..AA,LLLL Read LLLL bytes at address AA..AA hex data or ENN
-// OBSOLETE * MAA..AA,LLLL: Write LLLL bytes at address AA.AA OK or ENN
-// OBSOLETE *
-// OBSOLETE * c Resume at current address SNN ( signal NN)
-// OBSOLETE * cAA..AA Continue at address AA..AA SNN
-// OBSOLETE *
-// OBSOLETE * s Step one instruction SNN
-// OBSOLETE * sAA..AA Step one instruction from AA..AA SNN
-// OBSOLETE *
-// OBSOLETE * k kill
-// OBSOLETE *
-// OBSOLETE * ? What was the last sigval ? SNN (signal NN)
-// OBSOLETE *
-// OBSOLETE * All commands and responses are sent with a packet which includes a
-// OBSOLETE * checksum. A packet consists of
-// OBSOLETE *
-// OBSOLETE * $<packet info>#<checksum>.
-// OBSOLETE *
-// OBSOLETE * where
-// OBSOLETE * <packet info> :: <characters representing the command or response>
-// OBSOLETE * <checksum> :: <two hex digits computed as modulo 256 sum of <packetinfo>>
-// OBSOLETE *
-// OBSOLETE * When a packet is received, it is first acknowledged with either '+' or '-'.
-// OBSOLETE * '+' indicates a successful transfer. '-' indicates a failed transfer.
-// OBSOLETE *
-// OBSOLETE * Example:
-// OBSOLETE *
-// OBSOLETE * Host: Reply:
-// OBSOLETE * $m0,10#2a +$00010203040506070809101112131415#42
-// OBSOLETE *
-// OBSOLETE ****************************************************************************/
-// OBSOLETE
-// OBSOLETE #include <string.h>
-// OBSOLETE #include <signal.h>
-// OBSOLETE
-// OBSOLETE /************************************************************************
-// OBSOLETE *
-// OBSOLETE * external low-level support routines
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE extern void putDebugChar(); /* write a single character */
-// OBSOLETE extern int getDebugChar(); /* read and return a single char */
-// OBSOLETE
-// OBSOLETE /************************************************************************/
-// OBSOLETE /* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/
-// OBSOLETE /* at least NUMREGBYTES*2 are needed for register packets */
-// OBSOLETE #define BUFMAX 2048
-// OBSOLETE
-// OBSOLETE static int initialized = 0; /* !0 means we've been initialized */
-// OBSOLETE static int remote_debug = 0; /* turn on verbose debugging */
-// OBSOLETE
-// OBSOLETE extern void breakinst();
-// OBSOLETE void _cprint();
-// OBSOLETE static void hw_breakpoint();
-// OBSOLETE static void set_mem_fault_trap();
-// OBSOLETE static void get_in_break_mode();
-// OBSOLETE static unsigned char *mem2hex();
-// OBSOLETE
-// OBSOLETE static const char hexchars[]="0123456789abcdef";
-// OBSOLETE
-// OBSOLETE #define NUMREGS 121
-// OBSOLETE
-// OBSOLETE static unsigned long saved_stack_pointer;
-// OBSOLETE
-// OBSOLETE /* Number of bytes of registers. */
-// OBSOLETE #define NUMREGBYTES (NUMREGS * 4)
-// OBSOLETE enum regnames { G0, G1, G2, G3, G4, G5, G6, G7,
-// OBSOLETE O0, O1, O2, O3, O4, O5, SP, O7,
-// OBSOLETE L0, L1, L2, L3, L4, L5, L6, L7,
-// OBSOLETE I0, I1, I2, I3, I4, I5, FP, I7,
-// OBSOLETE
-// OBSOLETE F0, F1, F2, F3, F4, F5, F6, F7,
-// OBSOLETE F8, F9, F10, F11, F12, F13, F14, F15,
-// OBSOLETE F16, F17, F18, F19, F20, F21, F22, F23,
-// OBSOLETE F24, F25, F26, F27, F28, F29, F30, F31,
-// OBSOLETE
-// OBSOLETE Y, PSR, WIM, TBR, PC, NPC, FPSR, CPSR,
-// OBSOLETE CCSR, CCPR, CCCRCR, CCOR, CCOBR, CCIBR, CCIR, UNUSED1,
-// OBSOLETE
-// OBSOLETE ASR1, ASR15, ASR17, ASR18, ASR19, ASR20, ASR21, ASR22,
-// OBSOLETE /* the following not actually implemented */
-// OBSOLETE AWR0, AWR1, AWR2, AWR3, AWR4, AWR5, AWR6, AWR7,
-// OBSOLETE AWR8, AWR9, AWR10, AWR11, AWR12, AWR13, AWR14, AWR15,
-// OBSOLETE AWR16, AWR17, AWR18, AWR19, AWR20, AWR21, AWR22, AWR23,
-// OBSOLETE AWR24, AWR25, AWR26, AWR27, AWR28, AWR29, AWR30, AWR31,
-// OBSOLETE APSR
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /*************************** ASSEMBLY CODE MACROS *************************/
-// OBSOLETE /* */
-// OBSOLETE
-// OBSOLETE extern void trap_low();
-// OBSOLETE
-// OBSOLETE asm("
-// OBSOLETE .reserve trapstack, 1000 * 4, \"bss\", 8
-// OBSOLETE
-// OBSOLETE .data
-// OBSOLETE .align 4
-// OBSOLETE
-// OBSOLETE in_trap_handler:
-// OBSOLETE .word 0
-// OBSOLETE
-// OBSOLETE .text
-// OBSOLETE .align 4
-// OBSOLETE
-// OBSOLETE ! This function is called when any SPARC trap (except window overflow or
-// OBSOLETE ! underflow) occurs. It makes sure that the invalid register window is still
-// OBSOLETE ! available before jumping into C code. It will also restore the world if you
-// OBSOLETE ! return from handle_exception.
-// OBSOLETE !
-// OBSOLETE ! On entry, trap_low expects l1 and l2 to contain pc and npc respectivly.
-// OBSOLETE
-// OBSOLETE .globl _trap_low
-// OBSOLETE _trap_low:
-// OBSOLETE mov %psr, %l0
-// OBSOLETE mov %wim, %l3
-// OBSOLETE
-// OBSOLETE srl %l3, %l0, %l4 ! wim >> cwp
-// OBSOLETE and %l4, 0xff, %l4 ! Mask off windows 28, 29
-// OBSOLETE cmp %l4, 1
-// OBSOLETE bne window_fine ! Branch if not in the invalid window
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE ! Handle window overflow
-// OBSOLETE
-// OBSOLETE mov %g1, %l4 ! Save g1, we use it to hold the wim
-// OBSOLETE srl %l3, 1, %g1 ! Rotate wim right
-// OBSOLETE and %g1, 0xff, %g1 ! Mask off windows 28, 29
-// OBSOLETE tst %g1
-// OBSOLETE bg good_wim ! Branch if new wim is non-zero
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE ! At this point, we need to bring a 1 into the high order bit of the wim.
-// OBSOLETE ! Since we don't want to make any assumptions about the number of register
-// OBSOLETE ! windows, we figure it out dynamically so as to setup the wim correctly.
-// OBSOLETE
-// OBSOLETE ! The normal way doesn't work on the sparclet as register windows
-// OBSOLETE ! 28 and 29 are special purpose windows.
-// OBSOLETE !not %g1 ! Fill g1 with ones
-// OBSOLETE !mov %g1, %wim ! Fill the wim with ones
-// OBSOLETE !nop
-// OBSOLETE !nop
-// OBSOLETE !nop
-// OBSOLETE !mov %wim, %g1 ! Read back the wim
-// OBSOLETE !inc %g1 ! Now g1 has 1 just to left of wim
-// OBSOLETE !srl %g1, 1, %g1 ! Now put 1 at top of wim
-// OBSOLETE
-// OBSOLETE mov 0x80, %g1 ! Hack for sparclet
-// OBSOLETE
-// OBSOLETE ! This doesn't work on the sparclet.
-// OBSOLETE !mov %g0, %wim ! Clear wim so that subsequent save
-// OBSOLETE ! won't trap
-// OBSOLETE andn %l3, 0xff, %l5 ! Clear wim but not windows 28, 29
-// OBSOLETE mov %l5, %wim
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE good_wim:
-// OBSOLETE save %g0, %g0, %g0 ! Slip into next window
-// OBSOLETE mov %g1, %wim ! Install the new wim
-// OBSOLETE
-// OBSOLETE std %l0, [%sp + 0 * 4] ! save L & I registers
-// OBSOLETE std %l2, [%sp + 2 * 4]
-// OBSOLETE std %l4, [%sp + 4 * 4]
-// OBSOLETE std %l6, [%sp + 6 * 4]
-// OBSOLETE
-// OBSOLETE std %i0, [%sp + 8 * 4]
-// OBSOLETE std %i2, [%sp + 10 * 4]
-// OBSOLETE std %i4, [%sp + 12 * 4]
-// OBSOLETE std %i6, [%sp + 14 * 4]
-// OBSOLETE
-// OBSOLETE restore ! Go back to trap window.
-// OBSOLETE mov %l4, %g1 ! Restore %g1
-// OBSOLETE
-// OBSOLETE window_fine:
-// OBSOLETE sethi %hi(in_trap_handler), %l4
-// OBSOLETE ld [%lo(in_trap_handler) + %l4], %l5
-// OBSOLETE tst %l5
-// OBSOLETE bg recursive_trap
-// OBSOLETE inc %l5
-// OBSOLETE
-// OBSOLETE set trapstack+1000*4, %sp ! Switch to trap stack
-// OBSOLETE
-// OBSOLETE recursive_trap:
-// OBSOLETE st %l5, [%lo(in_trap_handler) + %l4]
-// OBSOLETE sub %sp,(16+1+6+1+88)*4,%sp ! Make room for input & locals
-// OBSOLETE ! + hidden arg + arg spill
-// OBSOLETE ! + doubleword alignment
-// OBSOLETE ! + registers[121]
-// OBSOLETE
-// OBSOLETE std %g0, [%sp + (24 + 0) * 4] ! registers[Gx]
-// OBSOLETE std %g2, [%sp + (24 + 2) * 4]
-// OBSOLETE std %g4, [%sp + (24 + 4) * 4]
-// OBSOLETE std %g6, [%sp + (24 + 6) * 4]
-// OBSOLETE
-// OBSOLETE std %i0, [%sp + (24 + 8) * 4] ! registers[Ox]
-// OBSOLETE std %i2, [%sp + (24 + 10) * 4]
-// OBSOLETE std %i4, [%sp + (24 + 12) * 4]
-// OBSOLETE std %i6, [%sp + (24 + 14) * 4]
-// OBSOLETE
-// OBSOLETE ! FP regs (sparclet doesn't have fpu)
-// OBSOLETE
-// OBSOLETE mov %y, %l4
-// OBSOLETE mov %tbr, %l5
-// OBSOLETE st %l4, [%sp + (24 + 64) * 4] ! Y
-// OBSOLETE st %l0, [%sp + (24 + 65) * 4] ! PSR
-// OBSOLETE st %l3, [%sp + (24 + 66) * 4] ! WIM
-// OBSOLETE st %l5, [%sp + (24 + 67) * 4] ! TBR
-// OBSOLETE st %l1, [%sp + (24 + 68) * 4] ! PC
-// OBSOLETE st %l2, [%sp + (24 + 69) * 4] ! NPC
-// OBSOLETE ! CPSR and FPSR not impl
-// OBSOLETE or %l0, 0xf20, %l4
-// OBSOLETE mov %l4, %psr ! Turn on traps, disable interrupts
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE ! Save coprocessor state.
-// OBSOLETE ! See SK/demo/hdlc_demo/ldc_swap_context.S.
-// OBSOLETE
-// OBSOLETE mov %psr, %l0
-// OBSOLETE sethi %hi(0x2000), %l5 ! EC bit in PSR
-// OBSOLETE or %l5, %l0, %l5
-// OBSOLETE mov %l5, %psr ! enable coprocessor
-// OBSOLETE nop ! 3 nops after write to %psr (needed?)
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE crdcxt %ccsr, %l1 ! capture CCSR
-// OBSOLETE mov 0x6, %l2
-// OBSOLETE cwrcxt %l2, %ccsr ! set CCP state machine for CCFR
-// OBSOLETE crdcxt %ccfr, %l2 ! capture CCOR
-// OBSOLETE cwrcxt %l2, %ccfr ! tickle CCFR
-// OBSOLETE crdcxt %ccfr, %l3 ! capture CCOBR
-// OBSOLETE cwrcxt %l3, %ccfr ! tickle CCFR
-// OBSOLETE crdcxt %ccfr, %l4 ! capture CCIBR
-// OBSOLETE cwrcxt %l4, %ccfr ! tickle CCFR
-// OBSOLETE crdcxt %ccfr, %l5 ! capture CCIR
-// OBSOLETE cwrcxt %l5, %ccfr ! tickle CCFR
-// OBSOLETE crdcxt %ccpr, %l6 ! capture CCPR
-// OBSOLETE crdcxt %cccrcr, %l7 ! capture CCCRCR
-// OBSOLETE st %l1, [%sp + (24 + 72) * 4] ! save CCSR
-// OBSOLETE st %l2, [%sp + (24 + 75) * 4] ! save CCOR
-// OBSOLETE st %l3, [%sp + (24 + 76) * 4] ! save CCOBR
-// OBSOLETE st %l4, [%sp + (24 + 77) * 4] ! save CCIBR
-// OBSOLETE st %l5, [%sp + (24 + 78) * 4] ! save CCIR
-// OBSOLETE st %l6, [%sp + (24 + 73) * 4] ! save CCPR
-// OBSOLETE st %l7, [%sp + (24 + 74) * 4] ! save CCCRCR
-// OBSOLETE mov %l0, %psr ! restore original PSR
-// OBSOLETE nop ! 3 nops after write to %psr (needed?)
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE ! End of saving coprocessor state.
-// OBSOLETE ! Save asr regs
-// OBSOLETE
-// OBSOLETE ! Part of this is silly -- we should not display ASR15 or ASR19 at all.
-// OBSOLETE
-// OBSOLETE sethi %hi(0x01000000), %l6
-// OBSOLETE st %l6, [%sp + (24 + 81) * 4] ! ASR15 == NOP
-// OBSOLETE sethi %hi(0xdeadc0de), %l6
-// OBSOLETE or %l6, %lo(0xdeadc0de), %l6
-// OBSOLETE st %l6, [%sp + (24 + 84) * 4] ! ASR19 == DEADC0DE
-// OBSOLETE
-// OBSOLETE rd %asr1, %l4
-// OBSOLETE st %l4, [%sp + (24 + 80) * 4]
-// OBSOLETE ! rd %asr15, %l4 ! must not read ASR15
-// OBSOLETE ! st %l4, [%sp + (24 + 81) * 4] ! (illegal instr trap)
-// OBSOLETE rd %asr17, %l4
-// OBSOLETE st %l4, [%sp + (24 + 82) * 4]
-// OBSOLETE rd %asr18, %l4
-// OBSOLETE st %l4, [%sp + (24 + 83) * 4]
-// OBSOLETE ! rd %asr19, %l4 ! must not read asr19
-// OBSOLETE ! st %l4, [%sp + (24 + 84) * 4] ! (halts the CPU)
-// OBSOLETE rd %asr20, %l4
-// OBSOLETE st %l4, [%sp + (24 + 85) * 4]
-// OBSOLETE rd %asr21, %l4
-// OBSOLETE st %l4, [%sp + (24 + 86) * 4]
-// OBSOLETE rd %asr22, %l4
-// OBSOLETE st %l4, [%sp + (24 + 87) * 4]
-// OBSOLETE
-// OBSOLETE ! End of saving asr regs
-// OBSOLETE
-// OBSOLETE call _handle_exception
-// OBSOLETE add %sp, 24 * 4, %o0 ! Pass address of registers
-// OBSOLETE
-// OBSOLETE ! Reload all of the registers that aren't on the stack
-// OBSOLETE
-// OBSOLETE ld [%sp + (24 + 1) * 4], %g1 ! registers[Gx]
-// OBSOLETE ldd [%sp + (24 + 2) * 4], %g2
-// OBSOLETE ldd [%sp + (24 + 4) * 4], %g4
-// OBSOLETE ldd [%sp + (24 + 6) * 4], %g6
-// OBSOLETE
-// OBSOLETE ldd [%sp + (24 + 8) * 4], %i0 ! registers[Ox]
-// OBSOLETE ldd [%sp + (24 + 10) * 4], %i2
-// OBSOLETE ldd [%sp + (24 + 12) * 4], %i4
-// OBSOLETE ldd [%sp + (24 + 14) * 4], %i6
-// OBSOLETE
-// OBSOLETE ! FP regs (sparclet doesn't have fpu)
-// OBSOLETE
-// OBSOLETE ! Update the coprocessor registers.
-// OBSOLETE ! See SK/demo/hdlc_demo/ldc_swap_context.S.
-// OBSOLETE
-// OBSOLETE mov %psr, %l0
-// OBSOLETE sethi %hi(0x2000), %l5 ! EC bit in PSR
-// OBSOLETE or %l5, %l0, %l5
-// OBSOLETE mov %l5, %psr ! enable coprocessor
-// OBSOLETE nop ! 3 nops after write to %psr (needed?)
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE mov 0x6, %l2
-// OBSOLETE cwrcxt %l2, %ccsr ! set CCP state machine for CCFR
-// OBSOLETE
-// OBSOLETE ld [%sp + (24 + 72) * 4], %l1 ! saved CCSR
-// OBSOLETE ld [%sp + (24 + 75) * 4], %l2 ! saved CCOR
-// OBSOLETE ld [%sp + (24 + 76) * 4], %l3 ! saved CCOBR
-// OBSOLETE ld [%sp + (24 + 77) * 4], %l4 ! saved CCIBR
-// OBSOLETE ld [%sp + (24 + 78) * 4], %l5 ! saved CCIR
-// OBSOLETE ld [%sp + (24 + 73) * 4], %l6 ! saved CCPR
-// OBSOLETE ld [%sp + (24 + 74) * 4], %l7 ! saved CCCRCR
-// OBSOLETE
-// OBSOLETE cwrcxt %l2, %ccfr ! restore CCOR
-// OBSOLETE cwrcxt %l3, %ccfr ! restore CCOBR
-// OBSOLETE cwrcxt %l4, %ccfr ! restore CCIBR
-// OBSOLETE cwrcxt %l5, %ccfr ! restore CCIR
-// OBSOLETE cwrcxt %l6, %ccpr ! restore CCPR
-// OBSOLETE cwrcxt %l7, %cccrcr ! restore CCCRCR
-// OBSOLETE cwrcxt %l1, %ccsr ! restore CCSR
-// OBSOLETE
-// OBSOLETE mov %l0, %psr ! restore PSR
-// OBSOLETE nop ! 3 nops after write to %psr (needed?)
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE ! End of coprocessor handling stuff.
-// OBSOLETE ! Update asr regs
-// OBSOLETE
-// OBSOLETE ld [%sp + (24 + 80) * 4], %l4
-// OBSOLETE wr %l4, %asr1
-// OBSOLETE ! ld [%sp + (24 + 81) * 4], %l4 ! can't write asr15
-// OBSOLETE ! wr %l4, %asr15
-// OBSOLETE ld [%sp + (24 + 82) * 4], %l4
-// OBSOLETE wr %l4, %asr17
-// OBSOLETE ld [%sp + (24 + 83) * 4], %l4
-// OBSOLETE wr %l4, %asr18
-// OBSOLETE ! ld [%sp + (24 + 84) * 4], %l4 ! can't write asr19
-// OBSOLETE ! wr %l4, %asr19
-// OBSOLETE ! ld [%sp + (24 + 85) * 4], %l4 ! can't write asr20
-// OBSOLETE ! wr %l4, %asr20
-// OBSOLETE ! ld [%sp + (24 + 86) * 4], %l4 ! can't write asr21
-// OBSOLETE ! wr %l4, %asr21
-// OBSOLETE ld [%sp + (24 + 87) * 4], %l4
-// OBSOLETE wr %l4, %asr22
-// OBSOLETE
-// OBSOLETE ! End of restoring asr regs
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE ldd [%sp + (24 + 64) * 4], %l0 ! Y & PSR
-// OBSOLETE ldd [%sp + (24 + 68) * 4], %l2 ! PC & NPC
-// OBSOLETE
-// OBSOLETE restore ! Ensure that previous window is valid
-// OBSOLETE save %g0, %g0, %g0 ! by causing a window_underflow trap
-// OBSOLETE
-// OBSOLETE mov %l0, %y
-// OBSOLETE mov %l1, %psr ! Make sure that traps are disabled
-// OBSOLETE ! for rett
-// OBSOLETE nop ! 3 nops after write to %psr (needed?)
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE sethi %hi(in_trap_handler), %l4
-// OBSOLETE ld [%lo(in_trap_handler) + %l4], %l5
-// OBSOLETE dec %l5
-// OBSOLETE st %l5, [%lo(in_trap_handler) + %l4]
-// OBSOLETE
-// OBSOLETE jmpl %l2, %g0 ! Restore old PC
-// OBSOLETE rett %l3 ! Restore old nPC
-// OBSOLETE ");
-// OBSOLETE
-// OBSOLETE /* Convert ch from a hex digit to an int */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE hex (unsigned char ch)
-// OBSOLETE {
-// OBSOLETE if (ch >= 'a' && ch <= 'f')
-// OBSOLETE return ch-'a'+10;
-// OBSOLETE if (ch >= '0' && ch <= '9')
-// OBSOLETE return ch-'0';
-// OBSOLETE if (ch >= 'A' && ch <= 'F')
-// OBSOLETE return ch-'A'+10;
-// OBSOLETE return -1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static char remcomInBuffer[BUFMAX];
-// OBSOLETE static char remcomOutBuffer[BUFMAX];
-// OBSOLETE
-// OBSOLETE /* scan for the sequence $<data>#<checksum> */
-// OBSOLETE
-// OBSOLETE unsigned char *
-// OBSOLETE getpacket (void)
-// OBSOLETE {
-// OBSOLETE unsigned char *buffer = &remcomInBuffer[0];
-// OBSOLETE unsigned char checksum;
-// OBSOLETE unsigned char xmitcsum;
-// OBSOLETE int count;
-// OBSOLETE char ch;
-// OBSOLETE
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE /* wait around for the start character, ignore all other characters */
-// OBSOLETE while ((ch = getDebugChar ()) != '$')
-// OBSOLETE ;
-// OBSOLETE
-// OBSOLETE retry:
-// OBSOLETE checksum = 0;
-// OBSOLETE xmitcsum = -1;
-// OBSOLETE count = 0;
-// OBSOLETE
-// OBSOLETE /* now, read until a # or end of buffer is found */
-// OBSOLETE while (count < BUFMAX)
-// OBSOLETE {
-// OBSOLETE ch = getDebugChar ();
-// OBSOLETE if (ch == '$')
-// OBSOLETE goto retry;
-// OBSOLETE if (ch == '#')
-// OBSOLETE break;
-// OBSOLETE checksum = checksum + ch;
-// OBSOLETE buffer[count] = ch;
-// OBSOLETE count = count + 1;
-// OBSOLETE }
-// OBSOLETE buffer[count] = 0;
-// OBSOLETE
-// OBSOLETE if (ch == '#')
-// OBSOLETE {
-// OBSOLETE ch = getDebugChar ();
-// OBSOLETE xmitcsum = hex (ch) << 4;
-// OBSOLETE ch = getDebugChar ();
-// OBSOLETE xmitcsum += hex (ch);
-// OBSOLETE
-// OBSOLETE if (checksum != xmitcsum)
-// OBSOLETE {
-// OBSOLETE putDebugChar ('-'); /* failed checksum */
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE putDebugChar ('+'); /* successful transfer */
-// OBSOLETE
-// OBSOLETE /* if a sequence char is present, reply the sequence ID */
-// OBSOLETE if (buffer[2] == ':')
-// OBSOLETE {
-// OBSOLETE putDebugChar (buffer[0]);
-// OBSOLETE putDebugChar (buffer[1]);
-// OBSOLETE
-// OBSOLETE return &buffer[3];
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return &buffer[0];
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* send the packet in buffer. */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE putpacket (unsigned char *buffer)
-// OBSOLETE {
-// OBSOLETE unsigned char checksum;
-// OBSOLETE int count;
-// OBSOLETE unsigned char ch;
-// OBSOLETE
-// OBSOLETE /* $<packet info>#<checksum>. */
-// OBSOLETE do
-// OBSOLETE {
-// OBSOLETE putDebugChar('$');
-// OBSOLETE checksum = 0;
-// OBSOLETE count = 0;
-// OBSOLETE
-// OBSOLETE while (ch = buffer[count])
-// OBSOLETE {
-// OBSOLETE putDebugChar(ch);
-// OBSOLETE checksum += ch;
-// OBSOLETE count += 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE putDebugChar('#');
-// OBSOLETE putDebugChar(hexchars[checksum >> 4]);
-// OBSOLETE putDebugChar(hexchars[checksum & 0xf]);
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE while (getDebugChar() != '+');
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Indicate to caller of mem2hex or hex2mem that there has been an
-// OBSOLETE error. */
-// OBSOLETE static volatile int mem_err = 0;
-// OBSOLETE
-// OBSOLETE /* Convert the memory pointed to by mem into hex, placing result in buf.
-// OBSOLETE * Return a pointer to the last char put in buf (null), in case of mem fault,
-// OBSOLETE * return 0.
-// OBSOLETE * If MAY_FAULT is non-zero, then we will handle memory faults by returning
-// OBSOLETE * a 0, else treat a fault like any other fault in the stub.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE static unsigned char *
-// OBSOLETE mem2hex (unsigned char *mem, unsigned char *buf, int count, int may_fault)
-// OBSOLETE {
-// OBSOLETE unsigned char ch;
-// OBSOLETE
-// OBSOLETE set_mem_fault_trap(may_fault);
-// OBSOLETE
-// OBSOLETE while (count-- > 0)
-// OBSOLETE {
-// OBSOLETE ch = *mem++;
-// OBSOLETE if (mem_err)
-// OBSOLETE return 0;
-// OBSOLETE *buf++ = hexchars[ch >> 4];
-// OBSOLETE *buf++ = hexchars[ch & 0xf];
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE *buf = 0;
-// OBSOLETE
-// OBSOLETE set_mem_fault_trap(0);
-// OBSOLETE
-// OBSOLETE return buf;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* convert the hex array pointed to by buf into binary to be placed in mem
-// OBSOLETE * return a pointer to the character AFTER the last byte written */
-// OBSOLETE
-// OBSOLETE static char *
-// OBSOLETE hex2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE unsigned char ch;
-// OBSOLETE
-// OBSOLETE set_mem_fault_trap(may_fault);
-// OBSOLETE
-// OBSOLETE for (i=0; i<count; i++)
-// OBSOLETE {
-// OBSOLETE ch = hex(*buf++) << 4;
-// OBSOLETE ch |= hex(*buf++);
-// OBSOLETE *mem++ = ch;
-// OBSOLETE if (mem_err)
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE set_mem_fault_trap(0);
-// OBSOLETE
-// OBSOLETE return mem;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* This table contains the mapping between SPARC hardware trap types, and
-// OBSOLETE signals, which are primarily what GDB understands. It also indicates
-// OBSOLETE which hardware traps we need to commandeer when initializing the stub. */
-// OBSOLETE
-// OBSOLETE static struct hard_trap_info
-// OBSOLETE {
-// OBSOLETE unsigned char tt; /* Trap type code for SPARClite */
-// OBSOLETE unsigned char signo; /* Signal that we map this trap into */
-// OBSOLETE } hard_trap_info[] = {
-// OBSOLETE {1, SIGSEGV}, /* instruction access exception */
-// OBSOLETE {0x3b, SIGSEGV}, /* instruction access error */
-// OBSOLETE {2, SIGILL}, /* illegal instruction */
-// OBSOLETE {3, SIGILL}, /* privileged instruction */
-// OBSOLETE {4, SIGEMT}, /* fp disabled */
-// OBSOLETE {0x24, SIGEMT}, /* cp disabled */
-// OBSOLETE {7, SIGBUS}, /* mem address not aligned */
-// OBSOLETE {0x29, SIGSEGV}, /* data access exception */
-// OBSOLETE {10, SIGEMT}, /* tag overflow */
-// OBSOLETE {128+1, SIGTRAP}, /* ta 1 - normal breakpoint instruction */
-// OBSOLETE {0, 0} /* Must be last */
-// OBSOLETE };
-// OBSOLETE
-// OBSOLETE /* Set up exception handlers for tracing and breakpoints */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE set_debug_traps (void)
-// OBSOLETE {
-// OBSOLETE struct hard_trap_info *ht;
-// OBSOLETE
-// OBSOLETE for (ht = hard_trap_info; ht->tt && ht->signo; ht++)
-// OBSOLETE exceptionHandler(ht->tt, trap_low);
-// OBSOLETE
-// OBSOLETE initialized = 1;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE asm ("
-// OBSOLETE ! Trap handler for memory errors. This just sets mem_err to be non-zero. It
-// OBSOLETE ! assumes that %l1 is non-zero. This should be safe, as it is doubtful that
-// OBSOLETE ! 0 would ever contain code that could mem fault. This routine will skip
-// OBSOLETE ! past the faulting instruction after setting mem_err.
-// OBSOLETE
-// OBSOLETE .text
-// OBSOLETE .align 4
-// OBSOLETE
-// OBSOLETE _fltr_set_mem_err:
-// OBSOLETE sethi %hi(_mem_err), %l0
-// OBSOLETE st %l1, [%l0 + %lo(_mem_err)]
-// OBSOLETE jmpl %l2, %g0
-// OBSOLETE rett %l2+4
-// OBSOLETE ");
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE set_mem_fault_trap (int enable)
-// OBSOLETE {
-// OBSOLETE extern void fltr_set_mem_err();
-// OBSOLETE mem_err = 0;
-// OBSOLETE
-// OBSOLETE if (enable)
-// OBSOLETE exceptionHandler(0x29, fltr_set_mem_err);
-// OBSOLETE else
-// OBSOLETE exceptionHandler(0x29, trap_low);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE asm ("
-// OBSOLETE .text
-// OBSOLETE .align 4
-// OBSOLETE
-// OBSOLETE _dummy_hw_breakpoint:
-// OBSOLETE jmpl %l2, %g0
-// OBSOLETE rett %l2+4
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE ");
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE set_hw_breakpoint_trap (int enable)
-// OBSOLETE {
-// OBSOLETE extern void dummy_hw_breakpoint();
-// OBSOLETE
-// OBSOLETE if (enable)
-// OBSOLETE exceptionHandler(255, dummy_hw_breakpoint);
-// OBSOLETE else
-// OBSOLETE exceptionHandler(255, trap_low);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE get_in_break_mode (void)
-// OBSOLETE {
-// OBSOLETE #if 0
-// OBSOLETE int x;
-// OBSOLETE mesg("get_in_break_mode, sp = ");
-// OBSOLETE phex(&x);
-// OBSOLETE #endif
-// OBSOLETE set_hw_breakpoint_trap(1);
-// OBSOLETE
-// OBSOLETE asm("
-// OBSOLETE sethi %hi(0xff10), %l4
-// OBSOLETE or %l4, %lo(0xff10), %l4
-// OBSOLETE sta %g0, [%l4]0x1
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE ");
-// OBSOLETE
-// OBSOLETE set_hw_breakpoint_trap(0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Convert the SPARC hardware trap type code to a unix signal number. */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE computeSignal (int tt)
-// OBSOLETE {
-// OBSOLETE struct hard_trap_info *ht;
-// OBSOLETE
-// OBSOLETE for (ht = hard_trap_info; ht->tt && ht->signo; ht++)
-// OBSOLETE if (ht->tt == tt)
-// OBSOLETE return ht->signo;
-// OBSOLETE
-// OBSOLETE return SIGHUP; /* default for things we don't know about */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * While we find nice hex chars, build an int.
-// OBSOLETE * Return number of chars processed.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE hexToInt(char **ptr, int *intValue)
-// OBSOLETE {
-// OBSOLETE int numChars = 0;
-// OBSOLETE int hexValue;
-// OBSOLETE
-// OBSOLETE *intValue = 0;
-// OBSOLETE
-// OBSOLETE while (**ptr)
-// OBSOLETE {
-// OBSOLETE hexValue = hex(**ptr);
-// OBSOLETE if (hexValue < 0)
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE *intValue = (*intValue << 4) | hexValue;
-// OBSOLETE numChars ++;
-// OBSOLETE
-// OBSOLETE (*ptr)++;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE return (numChars);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * This function does all command procesing for interfacing to gdb. It
-// OBSOLETE * returns 1 if you should skip the instruction at the trap address, 0
-// OBSOLETE * otherwise.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE handle_exception (unsigned long *registers)
-// OBSOLETE {
-// OBSOLETE int tt; /* Trap type */
-// OBSOLETE int sigval;
-// OBSOLETE int addr;
-// OBSOLETE int length;
-// OBSOLETE char *ptr;
-// OBSOLETE unsigned long *sp;
-// OBSOLETE unsigned long dsr;
-// OBSOLETE
-// OBSOLETE /* First, we must force all of the windows to be spilled out */
-// OBSOLETE
-// OBSOLETE asm("
-// OBSOLETE ! Ugh. sparclet has broken save
-// OBSOLETE !save %sp, -64, %sp
-// OBSOLETE save
-// OBSOLETE add %fp,-64,%sp
-// OBSOLETE !save %sp, -64, %sp
-// OBSOLETE save
-// OBSOLETE add %fp,-64,%sp
-// OBSOLETE !save %sp, -64, %sp
-// OBSOLETE save
-// OBSOLETE add %fp,-64,%sp
-// OBSOLETE !save %sp, -64, %sp
-// OBSOLETE save
-// OBSOLETE add %fp,-64,%sp
-// OBSOLETE !save %sp, -64, %sp
-// OBSOLETE save
-// OBSOLETE add %fp,-64,%sp
-// OBSOLETE !save %sp, -64, %sp
-// OBSOLETE save
-// OBSOLETE add %fp,-64,%sp
-// OBSOLETE !save %sp, -64, %sp
-// OBSOLETE save
-// OBSOLETE add %fp,-64,%sp
-// OBSOLETE !save %sp, -64, %sp
-// OBSOLETE save
-// OBSOLETE add %fp,-64,%sp
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE restore
-// OBSOLETE ");
-// OBSOLETE
-// OBSOLETE if (registers[PC] == (unsigned long)breakinst)
-// OBSOLETE {
-// OBSOLETE registers[PC] = registers[NPC];
-// OBSOLETE registers[NPC] += 4;
-// OBSOLETE }
-// OBSOLETE sp = (unsigned long *)registers[SP];
-// OBSOLETE
-// OBSOLETE tt = (registers[TBR] >> 4) & 0xff;
-// OBSOLETE
-// OBSOLETE /* reply to host that an exception has occurred */
-// OBSOLETE sigval = computeSignal(tt);
-// OBSOLETE ptr = remcomOutBuffer;
-// OBSOLETE
-// OBSOLETE *ptr++ = 'T';
-// OBSOLETE *ptr++ = hexchars[sigval >> 4];
-// OBSOLETE *ptr++ = hexchars[sigval & 0xf];
-// OBSOLETE
-// OBSOLETE *ptr++ = hexchars[PC >> 4];
-// OBSOLETE *ptr++ = hexchars[PC & 0xf];
-// OBSOLETE *ptr++ = ':';
-// OBSOLETE ptr = mem2hex((char *)&registers[PC], ptr, 4, 0);
-// OBSOLETE *ptr++ = ';';
-// OBSOLETE
-// OBSOLETE *ptr++ = hexchars[FP >> 4];
-// OBSOLETE *ptr++ = hexchars[FP & 0xf];
-// OBSOLETE *ptr++ = ':';
-// OBSOLETE ptr = mem2hex(sp + 8 + 6, ptr, 4, 0); /* FP */
-// OBSOLETE *ptr++ = ';';
-// OBSOLETE
-// OBSOLETE *ptr++ = hexchars[SP >> 4];
-// OBSOLETE *ptr++ = hexchars[SP & 0xf];
-// OBSOLETE *ptr++ = ':';
-// OBSOLETE ptr = mem2hex((char *)&sp, ptr, 4, 0);
-// OBSOLETE *ptr++ = ';';
-// OBSOLETE
-// OBSOLETE *ptr++ = hexchars[NPC >> 4];
-// OBSOLETE *ptr++ = hexchars[NPC & 0xf];
-// OBSOLETE *ptr++ = ':';
-// OBSOLETE ptr = mem2hex((char *)&registers[NPC], ptr, 4, 0);
-// OBSOLETE *ptr++ = ';';
-// OBSOLETE
-// OBSOLETE *ptr++ = hexchars[O7 >> 4];
-// OBSOLETE *ptr++ = hexchars[O7 & 0xf];
-// OBSOLETE *ptr++ = ':';
-// OBSOLETE ptr = mem2hex((char *)&registers[O7], ptr, 4, 0);
-// OBSOLETE *ptr++ = ';';
-// OBSOLETE
-// OBSOLETE *ptr++ = 0;
-// OBSOLETE
-// OBSOLETE putpacket(remcomOutBuffer);
-// OBSOLETE
-// OBSOLETE while (1)
-// OBSOLETE {
-// OBSOLETE remcomOutBuffer[0] = 0;
-// OBSOLETE
-// OBSOLETE ptr = getpacket();
-// OBSOLETE switch (*ptr++)
-// OBSOLETE {
-// OBSOLETE case '?':
-// OBSOLETE remcomOutBuffer[0] = 'S';
-// OBSOLETE remcomOutBuffer[1] = hexchars[sigval >> 4];
-// OBSOLETE remcomOutBuffer[2] = hexchars[sigval & 0xf];
-// OBSOLETE remcomOutBuffer[3] = 0;
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'd':
-// OBSOLETE remote_debug = !(remote_debug); /* toggle debug flag */
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'g': /* return the value of the CPU registers */
-// OBSOLETE {
-// OBSOLETE ptr = remcomOutBuffer;
-// OBSOLETE ptr = mem2hex((char *)registers, ptr, 16 * 4, 0); /* G & O regs */
-// OBSOLETE ptr = mem2hex(sp + 0, ptr, 16 * 4, 0); /* L & I regs */
-// OBSOLETE memset(ptr, '0', 32 * 8); /* Floating point */
-// OBSOLETE ptr = mem2hex((char *)&registers[Y],
-// OBSOLETE ptr + 32 * 4 * 2,
-// OBSOLETE 8 * 4,
-// OBSOLETE 0); /* Y, PSR, WIM, TBR, PC, NPC, FPSR, CPSR */
-// OBSOLETE ptr = mem2hex((char *)&registers[CCSR],
-// OBSOLETE ptr,
-// OBSOLETE 8 * 4,
-// OBSOLETE 0); /* CCSR, CCPR, CCCRCR, CCOR, CCOBR, CCIBR, CCIR */
-// OBSOLETE ptr = mem2hex((char *)&registers[ASR1],
-// OBSOLETE ptr,
-// OBSOLETE 8 * 4,
-// OBSOLETE 0); /* ASR1,ASR15,ASR17,ASR18,ASR19,ASR20,ASR21,ASR22 */
-// OBSOLETE #if 0 /* not implemented */
-// OBSOLETE ptr = mem2hex((char *) &registers[AWR0],
-// OBSOLETE ptr,
-// OBSOLETE 32 * 4,
-// OBSOLETE 0); /* Alternate Window Registers */
-// OBSOLETE #endif
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'G': /* set value of all the CPU registers - return OK */
-// OBSOLETE case 'P': /* set value of one CPU register - return OK */
-// OBSOLETE {
-// OBSOLETE unsigned long *newsp, psr;
-// OBSOLETE
-// OBSOLETE psr = registers[PSR];
-// OBSOLETE
-// OBSOLETE if (ptr[-1] == 'P') /* do a single register */
-// OBSOLETE {
-// OBSOLETE int regno;
-// OBSOLETE
-// OBSOLETE if (hexToInt (&ptr, &regno)
-// OBSOLETE && *ptr++ == '=')
-// OBSOLETE if (regno >= L0 && regno <= I7)
-// OBSOLETE hex2mem (ptr, sp + regno - L0, 4, 0);
-// OBSOLETE else
-// OBSOLETE hex2mem (ptr, (char *)&registers[regno], 4, 0);
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE strcpy (remcomOutBuffer, "E01");
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE hex2mem(ptr, (char *)registers, 16 * 4, 0); /* G & O regs */
-// OBSOLETE hex2mem(ptr + 16 * 4 * 2, sp + 0, 16 * 4, 0); /* L & I regs */
-// OBSOLETE hex2mem(ptr + 64 * 4 * 2, (char *)&registers[Y],
-// OBSOLETE 8 * 4, 0); /* Y,PSR,WIM,TBR,PC,NPC,FPSR,CPSR */
-// OBSOLETE hex2mem(ptr + 72 * 4 * 2, (char *)&registers[CCSR],
-// OBSOLETE 8 * 4, 0); /* CCSR,CCPR,CCCRCR,CCOR,CCOBR,CCIBR,CCIR */
-// OBSOLETE hex2mem(ptr + 80 * 4 * 2, (char *)&registers[ASR1],
-// OBSOLETE 8 * 4, 0); /* ASR1 ... ASR22 */
-// OBSOLETE #if 0 /* not implemented */
-// OBSOLETE hex2mem(ptr + 88 * 4 * 2, (char *)&registers[AWR0],
-// OBSOLETE 8 * 4, 0); /* Alternate Window Registers */
-// OBSOLETE #endif
-// OBSOLETE }
-// OBSOLETE /* See if the stack pointer has moved. If so, then copy the saved
-// OBSOLETE locals and ins to the new location. This keeps the window
-// OBSOLETE overflow and underflow routines happy. */
-// OBSOLETE
-// OBSOLETE newsp = (unsigned long *)registers[SP];
-// OBSOLETE if (sp != newsp)
-// OBSOLETE sp = memcpy(newsp, sp, 16 * 4);
-// OBSOLETE
-// OBSOLETE /* Don't allow CWP to be modified. */
-// OBSOLETE
-// OBSOLETE if (psr != registers[PSR])
-// OBSOLETE registers[PSR] = (psr & 0x1f) | (registers[PSR] & ~0x1f);
-// OBSOLETE
-// OBSOLETE strcpy(remcomOutBuffer,"OK");
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'm': /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */
-// OBSOLETE /* Try to read %x,%x. */
-// OBSOLETE
-// OBSOLETE if (hexToInt(&ptr, &addr)
-// OBSOLETE && *ptr++ == ','
-// OBSOLETE && hexToInt(&ptr, &length))
-// OBSOLETE {
-// OBSOLETE if (mem2hex((char *)addr, remcomOutBuffer, length, 1))
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE strcpy (remcomOutBuffer, "E03");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE strcpy(remcomOutBuffer,"E01");
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'M': /* MAA..AA,LLLL: Write LLLL bytes at address AA.AA return OK */
-// OBSOLETE /* Try to read '%x,%x:'. */
-// OBSOLETE
-// OBSOLETE if (hexToInt(&ptr, &addr)
-// OBSOLETE && *ptr++ == ','
-// OBSOLETE && hexToInt(&ptr, &length)
-// OBSOLETE && *ptr++ == ':')
-// OBSOLETE {
-// OBSOLETE if (hex2mem(ptr, (char *)addr, length, 1))
-// OBSOLETE strcpy(remcomOutBuffer, "OK");
-// OBSOLETE else
-// OBSOLETE strcpy(remcomOutBuffer, "E03");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE strcpy(remcomOutBuffer, "E02");
-// OBSOLETE break;
-// OBSOLETE
-// OBSOLETE case 'c': /* cAA..AA Continue at address AA..AA(optional) */
-// OBSOLETE /* try to read optional parameter, pc unchanged if no parm */
-// OBSOLETE
-// OBSOLETE if (hexToInt(&ptr, &addr))
-// OBSOLETE {
-// OBSOLETE registers[PC] = addr;
-// OBSOLETE registers[NPC] = addr + 4;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Need to flush the instruction cache here, as we may have deposited a
-// OBSOLETE breakpoint, and the icache probably has no way of knowing that a data ref to
-// OBSOLETE some location may have changed something that is in the instruction cache.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE flush_i_cache();
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE /* kill the program */
-// OBSOLETE case 'k' : /* do nothing */
-// OBSOLETE break;
-// OBSOLETE #if 0
-// OBSOLETE case 't': /* Test feature */
-// OBSOLETE asm (" std %f30,[%sp]");
-// OBSOLETE break;
-// OBSOLETE #endif
-// OBSOLETE case 'r': /* Reset */
-// OBSOLETE asm ("call 0
-// OBSOLETE nop ");
-// OBSOLETE break;
-// OBSOLETE } /* switch */
-// OBSOLETE
-// OBSOLETE /* reply to the request */
-// OBSOLETE putpacket(remcomOutBuffer);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* This function will generate a breakpoint exception. It is used at the
-// OBSOLETE beginning of a program to sync up with a debugger and can be used
-// OBSOLETE otherwise as a quick means to stop program execution and "break" into
-// OBSOLETE the debugger. */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE breakpoint (void)
-// OBSOLETE {
-// OBSOLETE if (!initialized)
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE asm(" .globl _breakinst
-// OBSOLETE
-// OBSOLETE _breakinst: ta 1
-// OBSOLETE ");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE hw_breakpoint (void)
-// OBSOLETE {
-// OBSOLETE asm("
-// OBSOLETE ta 127
-// OBSOLETE ");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #if 0 /* experimental and never finished, left here for reference */
-// OBSOLETE static void
-// OBSOLETE splet_temp(void)
-// OBSOLETE {
-// OBSOLETE asm(" sub %sp,(16+1+6+1+121)*4,%sp ! Make room for input & locals
-// OBSOLETE ! + hidden arg + arg spill
-// OBSOLETE ! + doubleword alignment
-// OBSOLETE ! + registers[121]
-// OBSOLETE
-// OBSOLETE ! Leave a trail of breadcrumbs! (save register save area for debugging)
-// OBSOLETE mov %sp, %l0
-// OBSOLETE add %l0, 24*4, %l0
-// OBSOLETE sethi %hi(_debug_registers), %l1
-// OBSOLETE st %l0, [%lo(_debug_registers) + %l1]
-// OBSOLETE
-// OBSOLETE ! Save the Alternate Register Set: (not implemented yet)
-// OBSOLETE ! To save the Alternate Register set, we must:
-// OBSOLETE ! 1) Save the current SP in some global location.
-// OBSOLETE ! 2) Swap the register sets.
-// OBSOLETE ! 3) Save the Alternate SP in the Y register
-// OBSOLETE ! 4) Fetch the SP that we saved in step 1.
-// OBSOLETE ! 5) Use that to save the rest of the regs (not forgetting ASP in Y)
-// OBSOLETE ! 6) Restore the Alternate SP from Y
-// OBSOLETE ! 7) Swap the registers back.
-// OBSOLETE
-// OBSOLETE ! 1) Copy the current stack pointer to global _SAVED_STACK_POINTER:
-// OBSOLETE sethi %hi(_saved_stack_pointer), %l0
-// OBSOLETE st %sp, [%lo(_saved_stack_pointer) + %l0]
-// OBSOLETE
-// OBSOLETE ! 2) Swap the register sets:
-// OBSOLETE mov %psr, %l1
-// OBSOLETE sethi %hi(0x10000), %l2
-// OBSOLETE xor %l1, %l2, %l1
-// OBSOLETE mov %l1, %psr
-// OBSOLETE nop ! 3 nops after write to %psr (needed?)
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE
-// OBSOLETE ! 3) Save Alternate L0 in Y
-// OBSOLETE wr %l0, 0, %y
-// OBSOLETE
-// OBSOLETE ! 4) Load former SP into alternate SP, using L0
-// OBSOLETE sethi %hi(_saved_stack_pointer), %l0
-// OBSOLETE or %lo(_saved_stack_pointer), %l0, %l0
-// OBSOLETE swap [%l0], %sp
-// OBSOLETE
-// OBSOLETE ! 4.5) Restore alternate L0
-// OBSOLETE rd %y, %l0
-// OBSOLETE
-// OBSOLETE ! 5) Save the Alternate Window Registers
-// OBSOLETE st %r0, [%sp + (24 + 88) * 4] ! AWR0
-// OBSOLETE st %r1, [%sp + (24 + 89) * 4] ! AWR1
-// OBSOLETE st %r2, [%sp + (24 + 90) * 4] ! AWR2
-// OBSOLETE st %r3, [%sp + (24 + 91) * 4] ! AWR3
-// OBSOLETE st %r4, [%sp + (24 + 92) * 4] ! AWR4
-// OBSOLETE st %r5, [%sp + (24 + 93) * 4] ! AWR5
-// OBSOLETE st %r6, [%sp + (24 + 94) * 4] ! AWR6
-// OBSOLETE st %r7, [%sp + (24 + 95) * 4] ! AWR7
-// OBSOLETE st %r8, [%sp + (24 + 96) * 4] ! AWR8
-// OBSOLETE st %r9, [%sp + (24 + 97) * 4] ! AWR9
-// OBSOLETE st %r10, [%sp + (24 + 98) * 4] ! AWR10
-// OBSOLETE st %r11, [%sp + (24 + 99) * 4] ! AWR11
-// OBSOLETE st %r12, [%sp + (24 + 100) * 4] ! AWR12
-// OBSOLETE st %r13, [%sp + (24 + 101) * 4] ! AWR13
-// OBSOLETE ! st %r14, [%sp + (24 + 102) * 4] ! AWR14 (SP)
-// OBSOLETE st %r15, [%sp + (24 + 103) * 4] ! AWR15
-// OBSOLETE st %r16, [%sp + (24 + 104) * 4] ! AWR16
-// OBSOLETE st %r17, [%sp + (24 + 105) * 4] ! AWR17
-// OBSOLETE st %r18, [%sp + (24 + 106) * 4] ! AWR18
-// OBSOLETE st %r19, [%sp + (24 + 107) * 4] ! AWR19
-// OBSOLETE st %r20, [%sp + (24 + 108) * 4] ! AWR20
-// OBSOLETE st %r21, [%sp + (24 + 109) * 4] ! AWR21
-// OBSOLETE st %r22, [%sp + (24 + 110) * 4] ! AWR22
-// OBSOLETE st %r23, [%sp + (24 + 111) * 4] ! AWR23
-// OBSOLETE st %r24, [%sp + (24 + 112) * 4] ! AWR24
-// OBSOLETE st %r25, [%sp + (24 + 113) * 4] ! AWR25
-// OBSOLETE st %r26, [%sp + (24 + 114) * 4] ! AWR26
-// OBSOLETE st %r27, [%sp + (24 + 115) * 4] ! AWR27
-// OBSOLETE st %r28, [%sp + (24 + 116) * 4] ! AWR28
-// OBSOLETE st %r29, [%sp + (24 + 117) * 4] ! AWR29
-// OBSOLETE st %r30, [%sp + (24 + 118) * 4] ! AWR30
-// OBSOLETE st %r31, [%sp + (24 + 119) * 4] ! AWR21
-// OBSOLETE
-// OBSOLETE ! Get the Alternate PSR (I hope...)
-// OBSOLETE
-// OBSOLETE rd %psr, %l2
-// OBSOLETE st %l2, [%sp + (24 + 120) * 4] ! APSR
-// OBSOLETE
-// OBSOLETE ! Don't forget the alternate stack pointer
-// OBSOLETE
-// OBSOLETE rd %y, %l3
-// OBSOLETE st %l3, [%sp + (24 + 102) * 4] ! AWR14 (SP)
-// OBSOLETE
-// OBSOLETE ! 6) Restore the Alternate SP (saved in Y)
-// OBSOLETE
-// OBSOLETE rd %y, %o6
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE ! 7) Swap the registers back:
-// OBSOLETE
-// OBSOLETE mov %psr, %l1
-// OBSOLETE sethi %hi(0x10000), %l2
-// OBSOLETE xor %l1, %l2, %l1
-// OBSOLETE mov %l1, %psr
-// OBSOLETE nop ! 3 nops after write to %psr (needed?)
-// OBSOLETE nop
-// OBSOLETE nop
-// OBSOLETE ");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #endif
diff --git a/gdb/sparcnbsd-nat.c b/gdb/sparcnbsd-nat.c
index f63d9e5..ef52746 100644
--- a/gdb/sparcnbsd-nat.c
+++ b/gdb/sparcnbsd-nat.c
@@ -39,7 +39,7 @@ getregs_supplies (int regno)
{
return (regno == PS_REGNUM
|| regno == PC_REGNUM
- || regno == NPC_REGNUM
+ || regno == DEPRECATED_NPC_REGNUM
|| regno == Y_REGNUM
|| (regno >= G0_REGNUM && regno <= G7_REGNUM)
|| (regno >= O0_REGNUM && regno <= O7_REGNUM)
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index e3400f8..7d04cc7 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -153,43 +153,13 @@ static void add_undefined_type (struct type *);
static int
read_cpp_abbrev (struct field_info *, char **, struct type *,
struct objfile *);
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* new functions added for cfront support */
-
-// OBSOLETE static int
-// OBSOLETE copy_cfront_struct_fields (struct field_info *, struct type *,
-// OBSOLETE struct objfile *);
-
-// OBSOLETE static char *get_cfront_method_physname (char *);
-
-// OBSOLETE static int
-// OBSOLETE read_cfront_baseclasses (struct field_info *, char **,
-// OBSOLETE struct type *, struct objfile *);
-
-// OBSOLETE static int
-// OBSOLETE read_cfront_static_fields (struct field_info *, char **,
-// OBSOLETE struct type *, struct objfile *);
-// OBSOLETE static int
-// OBSOLETE read_cfront_member_functions (struct field_info *, char **,
-// OBSOLETE struct type *, struct objfile *);
-
-// OBSOLETE /* end new functions added for cfront support */
-#endif /* OBSOLETE CFront */
static char *find_name_end (char *name);
-static void add_live_range (struct objfile *, struct symbol *, CORE_ADDR,
- CORE_ADDR);
-
-static int resolve_live_range (struct objfile *, struct symbol *, char *);
-
static int process_reference (char **string);
static CORE_ADDR ref_search_value (int refnum);
-static int resolve_symbol_reference (struct objfile *, struct symbol *,
- char *);
-
void stabsread_clear_cache (void);
static const char vptr_name[] = "_vptr$";
@@ -497,592 +467,6 @@ read_type_number (char **pp, int *typenums)
#define VISIBILITY_PUBLIC '2' /* Stabs character for public field */
#define VISIBILITY_IGNORE '9' /* Optimized out or zero length */
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE #define CFRONT_VISIBILITY_PRIVATE '2' /* Stabs character for private field */
-// OBSOLETE #define CFRONT_VISIBILITY_PUBLIC '1' /* Stabs character for public field */
-
-// OBSOLETE /* This code added to support parsing of ARM/Cfront stabs strings */
-
-// OBSOLETE /* Get substring from string up to char c, advance string pointer past
-// OBSOLETE suibstring. */
-
-// OBSOLETE static char *
-// OBSOLETE get_substring (char **p, int c)
-// OBSOLETE {
-// OBSOLETE char *str;
-// OBSOLETE str = *p;
-// OBSOLETE *p = strchr (*p, c);
-// OBSOLETE if (*p)
-// OBSOLETE {
-// OBSOLETE **p = 0;
-// OBSOLETE (*p)++;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE str = 0;
-// OBSOLETE return str;
-// OBSOLETE }
-
-// OBSOLETE /* Physname gets strcat'd onto sname in order to recreate the mangled
-// OBSOLETE name (see funtion gdb_mangle_name in gdbtypes.c). For cfront, make
-// OBSOLETE the physname look like that of g++ - take out the initial mangling
-// OBSOLETE eg: for sname="a" and fname="foo__1aFPFs_i" return "FPFs_i" */
-
-// OBSOLETE static char *
-// OBSOLETE get_cfront_method_physname (char *fname)
-// OBSOLETE {
-// OBSOLETE int len = 0;
-// OBSOLETE /* FIXME would like to make this generic for g++ too, but
-// OBSOLETE that is already handled in read_member_funcctions */
-// OBSOLETE char *p = fname;
-
-// OBSOLETE /* search ahead to find the start of the mangled suffix */
-// OBSOLETE if (*p == '_' && *(p + 1) == '_') /* compiler generated; probably a ctor/dtor */
-// OBSOLETE p += 2;
-// OBSOLETE while (p && (unsigned) ((p + 1) - fname) < strlen (fname) && *(p + 1) != '_')
-// OBSOLETE p = strchr (p, '_');
-// OBSOLETE if (!(p && *p == '_' && *(p + 1) == '_'))
-// OBSOLETE error ("Invalid mangled function name %s", fname);
-// OBSOLETE p += 2; /* advance past '__' */
-
-// OBSOLETE /* struct name length and name of type should come next; advance past it */
-// OBSOLETE while (isdigit (*p))
-// OBSOLETE {
-// OBSOLETE len = len * 10 + (*p - '0');
-// OBSOLETE p++;
-// OBSOLETE }
-// OBSOLETE p += len;
-
-// OBSOLETE return p;
-// OBSOLETE }
-
-// OBSOLETE static void
-// OBSOLETE msg_unknown_complaint (const char *arg1)
-// OBSOLETE {
-// OBSOLETE complaint (&symfile_complaints, "Unsupported token in stabs string %s", arg1);
-// OBSOLETE }
-
-// OBSOLETE /* Read base classes within cfront class definition.
-// OBSOLETE eg: A:ZcA;1@Bpub v2@Bvirpri;__ct__1AFv func__1AFv *sfunc__1AFv ;as__1A ;;
-// OBSOLETE ^^^^^^^^^^^^^^^^^^
-
-// OBSOLETE A:ZcA;;foopri__1AFv foopro__1AFv __ct__1AFv __ct__1AFRC1A foopub__1AFv ;;;
-// OBSOLETE ^
-// OBSOLETE */
-
-// OBSOLETE static int
-// OBSOLETE read_cfront_baseclasses (struct field_info *fip, char **pp, struct type *type,
-// OBSOLETE struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE int bnum = 0;
-// OBSOLETE char *p;
-// OBSOLETE int i;
-// OBSOLETE struct nextfield *new;
-
-// OBSOLETE if (**pp == ';') /* no base classes; return */
-// OBSOLETE {
-// OBSOLETE ++(*pp);
-// OBSOLETE return 1;
-// OBSOLETE }
-
-// OBSOLETE /* first count base classes so we can allocate space before parsing */
-// OBSOLETE for (p = *pp; p && *p && *p != ';'; p++)
-// OBSOLETE {
-// OBSOLETE if (*p == ' ')
-// OBSOLETE bnum++;
-// OBSOLETE }
-// OBSOLETE bnum++; /* add one more for last one */
-
-// OBSOLETE /* now parse the base classes until we get to the start of the methods
-// OBSOLETE (code extracted and munged from read_baseclasses) */
-// OBSOLETE ALLOCATE_CPLUS_STRUCT_TYPE (type);
-// OBSOLETE TYPE_N_BASECLASSES (type) = bnum;
-
-// OBSOLETE /* allocate space */
-// OBSOLETE {
-// OBSOLETE int num_bytes = B_BYTES (TYPE_N_BASECLASSES (type));
-// OBSOLETE char *pointer;
-
-// OBSOLETE pointer = (char *) TYPE_ALLOC (type, num_bytes);
-// OBSOLETE TYPE_FIELD_VIRTUAL_BITS (type) = (B_TYPE *) pointer;
-// OBSOLETE }
-// OBSOLETE B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), TYPE_N_BASECLASSES (type));
-
-// OBSOLETE for (i = 0; i < TYPE_N_BASECLASSES (type); i++)
-// OBSOLETE {
-// OBSOLETE new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
-// OBSOLETE make_cleanup (xfree, new);
-// OBSOLETE memset (new, 0, sizeof (struct nextfield));
-// OBSOLETE new->next = fip->list;
-// OBSOLETE fip->list = new;
-// OBSOLETE FIELD_BITSIZE (new->field) = 0; /* this should be an unpacked field! */
-
-// OBSOLETE STABS_CONTINUE (pp, objfile);
-
-// OBSOLETE /* virtual? eg: v2@Bvir */
-// OBSOLETE if (**pp == 'v')
-// OBSOLETE {
-// OBSOLETE SET_TYPE_FIELD_VIRTUAL (type, i);
-// OBSOLETE ++(*pp);
-// OBSOLETE }
-
-// OBSOLETE /* access? eg: 2@Bvir */
-// OBSOLETE /* Note: protected inheritance not supported in cfront */
-// OBSOLETE switch (*(*pp)++)
-// OBSOLETE {
-// OBSOLETE case CFRONT_VISIBILITY_PRIVATE:
-// OBSOLETE new->visibility = VISIBILITY_PRIVATE;
-// OBSOLETE break;
-// OBSOLETE case CFRONT_VISIBILITY_PUBLIC:
-// OBSOLETE new->visibility = VISIBILITY_PUBLIC;
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE /* Bad visibility format. Complain and treat it as
-// OBSOLETE public. */
-// OBSOLETE {
-// OBSOLETE complaint (&symfile_complaints,
-// OBSOLETE "Unknown visibility `%c' for baseclass",
-// OBSOLETE new->visibility);
-// OBSOLETE new->visibility = VISIBILITY_PUBLIC;
-// OBSOLETE }
-// OBSOLETE }
-
-// OBSOLETE /* "@" comes next - eg: @Bvir */
-// OBSOLETE if (**pp != '@')
-// OBSOLETE {
-// OBSOLETE msg_unknown_complaint (*pp);
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE ++(*pp);
-
-
-// OBSOLETE /* Set the bit offset of the portion of the object corresponding
-// OBSOLETE to this baseclass. Always zero in the absence of
-// OBSOLETE multiple inheritance. */
-// OBSOLETE /* Unable to read bit position from stabs;
-// OBSOLETE Assuming no multiple inheritance for now FIXME! */
-// OBSOLETE /* We may have read this in the structure definition;
-// OBSOLETE now we should fixup the members to be the actual base classes */
-// OBSOLETE FIELD_BITPOS (new->field) = 0;
-
-// OBSOLETE /* Get the base class name and type */
-// OBSOLETE {
-// OBSOLETE char *bname; /* base class name */
-// OBSOLETE struct symbol *bsym; /* base class */
-// OBSOLETE char *p1, *p2;
-// OBSOLETE p1 = strchr (*pp, ' ');
-// OBSOLETE p2 = strchr (*pp, ';');
-// OBSOLETE if (p1 < p2)
-// OBSOLETE bname = get_substring (pp, ' ');
-// OBSOLETE else
-// OBSOLETE bname = get_substring (pp, ';');
-// OBSOLETE if (!bname || !*bname)
-// OBSOLETE {
-// OBSOLETE msg_unknown_complaint (*pp);
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE /* FIXME! attach base info to type */
-// OBSOLETE bsym = lookup_symbol (bname, 0, STRUCT_DOMAIN, 0, 0); /*demangled_name */
-// OBSOLETE if (bsym)
-// OBSOLETE {
-// OBSOLETE new->field.type = SYMBOL_TYPE (bsym);
-// OBSOLETE new->field.name = type_name_no_tag (new->field.type);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE complaint (&symfile_complaints, "Unable to find base type for %s",
-// OBSOLETE *pp);
-// OBSOLETE return 1;
-// OBSOLETE }
-// OBSOLETE }
-
-// OBSOLETE /* If more base classes to parse, loop again.
-// OBSOLETE We ate the last ' ' or ';' in get_substring,
-// OBSOLETE so on exit we will have skipped the trailing ';' */
-// OBSOLETE /* if invalid, return 0; add code to detect - FIXME! */
-// OBSOLETE }
-// OBSOLETE return 1;
-// OBSOLETE }
-
-// OBSOLETE /* read cfront member functions.
-// OBSOLETE pp points to string starting with list of functions
-// OBSOLETE eg: A:ZcA;1@Bpub v2@Bvirpri;__ct__1AFv func__1AFv *sfunc__1AFv ;as__1A ;;
-// OBSOLETE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// OBSOLETE A:ZcA;;foopri__1AFv foopro__1AFv __ct__1AFv __ct__1AFRC1A foopub__1AFv ;;;
-// OBSOLETE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// OBSOLETE */
-
-// OBSOLETE static int
-// OBSOLETE read_cfront_member_functions (struct field_info *fip, char **pp,
-// OBSOLETE struct type *type, struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE /* This code extracted from read_member_functions
-// OBSOLETE so as to do the similar thing for our funcs */
-
-// OBSOLETE int nfn_fields = 0;
-// OBSOLETE int length = 0;
-// OBSOLETE /* Total number of member functions defined in this class. If the class
-// OBSOLETE defines two `f' functions, and one `g' function, then this will have
-// OBSOLETE the value 3. */
-// OBSOLETE int total_length = 0;
-// OBSOLETE int i;
-// OBSOLETE struct next_fnfield
-// OBSOLETE {
-// OBSOLETE struct next_fnfield *next;
-// OBSOLETE struct fn_field fn_field;
-// OBSOLETE }
-// OBSOLETE *sublist;
-// OBSOLETE struct type *look_ahead_type;
-// OBSOLETE struct next_fnfieldlist *new_fnlist;
-// OBSOLETE struct next_fnfield *new_sublist;
-// OBSOLETE char *main_fn_name;
-// OBSOLETE char *fname;
-// OBSOLETE struct symbol *ref_func = 0;
-
-// OBSOLETE /* Process each list until we find the end of the member functions.
-// OBSOLETE eg: p = "__ct__1AFv foo__1AFv ;;;" */
-
-// OBSOLETE STABS_CONTINUE (pp, objfile); /* handle \\ */
-
-// OBSOLETE while (**pp != ';' && (fname = get_substring (pp, ' '), fname))
-// OBSOLETE {
-// OBSOLETE int is_static = 0;
-// OBSOLETE int sublist_count = 0;
-// OBSOLETE char *pname;
-// OBSOLETE if (fname[0] == '*') /* static member */
-// OBSOLETE {
-// OBSOLETE is_static = 1;
-// OBSOLETE sublist_count++;
-// OBSOLETE fname++;
-// OBSOLETE }
-// OBSOLETE ref_func = lookup_symbol (fname, 0, VAR_DOMAIN, 0, 0); /* demangled name */
-// OBSOLETE if (!ref_func)
-// OBSOLETE {
-// OBSOLETE complaint (&symfile_complaints,
-// OBSOLETE "Unable to find function symbol for %s", fname);
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE sublist = NULL;
-// OBSOLETE look_ahead_type = NULL;
-// OBSOLETE length = 0;
-
-// OBSOLETE new_fnlist = (struct next_fnfieldlist *)
-// OBSOLETE xmalloc (sizeof (struct next_fnfieldlist));
-// OBSOLETE make_cleanup (xfree, new_fnlist);
-// OBSOLETE memset (new_fnlist, 0, sizeof (struct next_fnfieldlist));
-
-// OBSOLETE /* The following is code to work around cfront generated stabs.
-// OBSOLETE The stabs contains full mangled name for each field.
-// OBSOLETE We try to demangle the name and extract the field name out of it. */
-// OBSOLETE {
-// OBSOLETE char *dem, *dem_p, *dem_args;
-// OBSOLETE int dem_len;
-// OBSOLETE dem = cplus_demangle (fname, DMGL_ANSI | DMGL_PARAMS);
-// OBSOLETE if (dem != NULL)
-// OBSOLETE {
-// OBSOLETE dem_p = strrchr (dem, ':');
-// OBSOLETE if (dem_p != 0 && *(dem_p - 1) == ':')
-// OBSOLETE dem_p++;
-// OBSOLETE /* get rid of args */
-// OBSOLETE dem_args = strchr (dem_p, '(');
-// OBSOLETE if (dem_args == NULL)
-// OBSOLETE dem_len = strlen (dem_p);
-// OBSOLETE else
-// OBSOLETE dem_len = dem_args - dem_p;
-// OBSOLETE main_fn_name =
-// OBSOLETE obsavestring (dem_p, dem_len, &objfile->type_obstack);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE main_fn_name =
-// OBSOLETE obsavestring (fname, strlen (fname), &objfile->type_obstack);
-// OBSOLETE }
-// OBSOLETE } /* end of code for cfront work around */
-
-// OBSOLETE new_fnlist->fn_fieldlist.name = main_fn_name;
-
-// OBSOLETE /*-------------------------------------------------*/
-// OBSOLETE /* Set up the sublists
-// OBSOLETE Sublists are stuff like args, static, visibility, etc.
-// OBSOLETE so in ARM, we have to set that info some other way.
-// OBSOLETE Multiple sublists happen if overloading
-// OBSOLETE eg: foo::26=##1;:;2A.;
-// OBSOLETE In g++, we'd loop here thru all the sublists... */
-
-// OBSOLETE new_sublist =
-// OBSOLETE (struct next_fnfield *) xmalloc (sizeof (struct next_fnfield));
-// OBSOLETE make_cleanup (xfree, new_sublist);
-// OBSOLETE memset (new_sublist, 0, sizeof (struct next_fnfield));
-
-// OBSOLETE /* eat 1; from :;2A.; */
-// OBSOLETE new_sublist->fn_field.type = SYMBOL_TYPE (ref_func); /* normally takes a read_type */
-// OBSOLETE /* Make this type look like a method stub for gdb */
-// OBSOLETE TYPE_FLAGS (new_sublist->fn_field.type) |= TYPE_FLAG_STUB;
-// OBSOLETE TYPE_CODE (new_sublist->fn_field.type) = TYPE_CODE_METHOD;
-
-// OBSOLETE /* If this is just a stub, then we don't have the real name here. */
-// OBSOLETE if (TYPE_STUB (new_sublist->fn_field.type))
-// OBSOLETE {
-// OBSOLETE if (!TYPE_DOMAIN_TYPE (new_sublist->fn_field.type))
-// OBSOLETE TYPE_DOMAIN_TYPE (new_sublist->fn_field.type) = type;
-// OBSOLETE new_sublist->fn_field.is_stub = 1;
-// OBSOLETE }
-
-// OBSOLETE /* physname used later in mangling; eg PFs_i,5 for foo__1aFPFs_i
-// OBSOLETE physname gets strcat'd in order to recreate the onto mangled name */
-// OBSOLETE pname = get_cfront_method_physname (fname);
-// OBSOLETE new_sublist->fn_field.physname = savestring (pname, strlen (pname));
-
-
-// OBSOLETE /* Set this member function's visibility fields.
-// OBSOLETE Unable to distinguish access from stabs definition!
-// OBSOLETE Assuming public for now. FIXME!
-// OBSOLETE (for private, set new_sublist->fn_field.is_private = 1,
-// OBSOLETE for public, set new_sublist->fn_field.is_protected = 1) */
-
-// OBSOLETE /* Unable to distinguish const/volatile from stabs definition!
-// OBSOLETE Assuming normal for now. FIXME! */
-
-// OBSOLETE new_sublist->fn_field.is_const = 0;
-// OBSOLETE new_sublist->fn_field.is_volatile = 0; /* volatile not implemented in cfront */
-
-// OBSOLETE /* Set virtual/static function info
-// OBSOLETE How to get vtable offsets ?
-// OBSOLETE Assuming normal for now FIXME!!
-// OBSOLETE For vtables, figure out from whence this virtual function came.
-// OBSOLETE It may belong to virtual function table of
-// OBSOLETE one of its baseclasses.
-// OBSOLETE set:
-// OBSOLETE new_sublist -> fn_field.voffset = vtable offset,
-// OBSOLETE new_sublist -> fn_field.fcontext = look_ahead_type;
-// OBSOLETE where look_ahead_type is type of baseclass */
-// OBSOLETE if (is_static)
-// OBSOLETE new_sublist->fn_field.voffset = VOFFSET_STATIC;
-// OBSOLETE else /* normal member function. */
-// OBSOLETE new_sublist->fn_field.voffset = 0;
-// OBSOLETE new_sublist->fn_field.fcontext = 0;
-
-
-// OBSOLETE /* Prepare new sublist */
-// OBSOLETE new_sublist->next = sublist;
-// OBSOLETE sublist = new_sublist;
-// OBSOLETE length++;
-
-// OBSOLETE /* In g++, we loop thu sublists - now we set from functions. */
-// OBSOLETE new_fnlist->fn_fieldlist.fn_fields = (struct fn_field *)
-// OBSOLETE obstack_alloc (&objfile->type_obstack,
-// OBSOLETE sizeof (struct fn_field) * length);
-// OBSOLETE memset (new_fnlist->fn_fieldlist.fn_fields, 0,
-// OBSOLETE sizeof (struct fn_field) * length);
-// OBSOLETE for (i = length; (i--, sublist); sublist = sublist->next)
-// OBSOLETE {
-// OBSOLETE new_fnlist->fn_fieldlist.fn_fields[i] = sublist->fn_field;
-// OBSOLETE }
-
-// OBSOLETE new_fnlist->fn_fieldlist.length = length;
-// OBSOLETE new_fnlist->next = fip->fnlist;
-// OBSOLETE fip->fnlist = new_fnlist;
-// OBSOLETE nfn_fields++;
-// OBSOLETE total_length += length;
-// OBSOLETE STABS_CONTINUE (pp, objfile); /* handle \\ */
-// OBSOLETE } /* end of loop */
-
-// OBSOLETE if (nfn_fields)
-// OBSOLETE {
-// OBSOLETE /* type should already have space */
-// OBSOLETE TYPE_FN_FIELDLISTS (type) = (struct fn_fieldlist *)
-// OBSOLETE TYPE_ALLOC (type, sizeof (struct fn_fieldlist) * nfn_fields);
-// OBSOLETE memset (TYPE_FN_FIELDLISTS (type), 0,
-// OBSOLETE sizeof (struct fn_fieldlist) * nfn_fields);
-// OBSOLETE TYPE_NFN_FIELDS (type) = nfn_fields;
-// OBSOLETE TYPE_NFN_FIELDS_TOTAL (type) = total_length;
-// OBSOLETE }
-
-// OBSOLETE /* end of scope for reading member func */
-
-// OBSOLETE /* eg: ";;" */
-
-// OBSOLETE /* Skip trailing ';' and bump count of number of fields seen */
-// OBSOLETE if (**pp == ';')
-// OBSOLETE (*pp)++;
-// OBSOLETE else
-// OBSOLETE return 0;
-// OBSOLETE return 1;
-// OBSOLETE }
-
-// OBSOLETE /* This routine fixes up partial cfront types that were created
-// OBSOLETE while parsing the stabs. The main need for this function is
-// OBSOLETE to add information such as methods to classes.
-// OBSOLETE Examples of "p": "sA;;__ct__1AFv foo__1AFv ;;;" */
-// OBSOLETE int
-// OBSOLETE resolve_cfront_continuation (struct objfile *objfile, struct symbol *sym,
-// OBSOLETE char *p)
-// OBSOLETE {
-// OBSOLETE struct symbol *ref_sym = 0;
-// OBSOLETE char *sname;
-// OBSOLETE /* snarfed from read_struct_type */
-// OBSOLETE struct field_info fi;
-// OBSOLETE struct type *type;
-// OBSOLETE struct cleanup *back_to;
-
-// OBSOLETE /* Need to make sure that fi isn't gunna conflict with struct
-// OBSOLETE in case struct already had some fnfs */
-// OBSOLETE fi.list = NULL;
-// OBSOLETE fi.fnlist = NULL;
-// OBSOLETE back_to = make_cleanup (null_cleanup, 0);
-
-// OBSOLETE /* We only accept structs, classes and unions at the moment.
-// OBSOLETE Other continuation types include t (typedef), r (long dbl), ...
-// OBSOLETE We may want to add support for them as well;
-// OBSOLETE right now they are handled by duplicating the symbol information
-// OBSOLETE into the type information (see define_symbol) */
-// OBSOLETE if (*p != 's' /* structs */
-// OBSOLETE && *p != 'c' /* class */
-// OBSOLETE && *p != 'u') /* union */
-// OBSOLETE return 0; /* only handle C++ types */
-// OBSOLETE p++;
-
-// OBSOLETE /* Get symbol typs name and validate
-// OBSOLETE eg: p = "A;;__ct__1AFv foo__1AFv ;;;" */
-// OBSOLETE sname = get_substring (&p, ';');
-// OBSOLETE if (!sname || strcmp (sname, DEPRECATED_SYMBOL_NAME (sym)))
-// OBSOLETE error ("Internal error: base symbol type name does not match\n");
-
-// OBSOLETE /* Find symbol's internal gdb reference using demangled_name.
-// OBSOLETE This is the real sym that we want;
-// OBSOLETE sym was a temp hack to make debugger happy */
-// OBSOLETE ref_sym = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), 0, STRUCT_DOMAIN, 0, 0);
-// OBSOLETE type = SYMBOL_TYPE (ref_sym);
-
-
-// OBSOLETE /* Now read the baseclasses, if any, read the regular C struct or C++
-// OBSOLETE class member fields, attach the fields to the type, read the C++
-// OBSOLETE member functions, attach them to the type, and then read any tilde
-// OBSOLETE field (baseclass specifier for the class holding the main vtable). */
-
-// OBSOLETE if (!read_cfront_baseclasses (&fi, &p, type, objfile)
-// OBSOLETE /* g++ does this next, but cfront already did this:
-// OBSOLETE || !read_struct_fields (&fi, &p, type, objfile) */
-// OBSOLETE || !copy_cfront_struct_fields (&fi, type, objfile)
-// OBSOLETE || !read_cfront_member_functions (&fi, &p, type, objfile)
-// OBSOLETE || !read_cfront_static_fields (&fi, &p, type, objfile)
-// OBSOLETE || !attach_fields_to_type (&fi, type, objfile)
-// OBSOLETE || !attach_fn_fields_to_type (&fi, type)
-// OBSOLETE /* g++ does this next, but cfront doesn't seem to have this:
-// OBSOLETE || !read_tilde_fields (&fi, &p, type, objfile) */
-// OBSOLETE )
-// OBSOLETE {
-// OBSOLETE type = error_type (&p, objfile);
-// OBSOLETE }
-
-// OBSOLETE do_cleanups (back_to);
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE /* End of code added to support parsing of ARM/Cfront stabs strings */
-#endif /* OBSOLETE CFront */
-
-/* This routine fixes up symbol references/aliases to point to the original
- symbol definition. Returns 0 on failure, non-zero on success. */
-
-static int
-resolve_symbol_reference (struct objfile *objfile, struct symbol *sym, char *p)
-{
- int refnum;
- struct symbol *ref_sym = 0;
- struct alias_list *alias;
-
- /* If this is not a symbol reference return now. */
- if (*p != '#')
- return 0;
-
- /* Use "#<num>" as the name; we'll fix the name later.
- We stored the original symbol name as "#<id>=<name>"
- so we can now search for "#<id>" to resolving the reference.
- We'll fix the names later by removing the "#<id>" or "#<id>=" */
-
-/*---------------------------------------------------------*/
- /* Get the reference id number, and
- advance p past the names so we can parse the rest.
- eg: id=2 for p : "2=", "2=z:r(0,1)" "2:r(0,1);l(#5,#6),l(#7,#4)" */
-/*---------------------------------------------------------*/
-
- /* This gets reference name from string. sym may not have a name. */
-
- /* Get the reference number associated with the reference id in the
- gdb stab string. From that reference number, get the main/primary
- symbol for this alias. */
- refnum = process_reference (&p);
- ref_sym = ref_search (refnum);
- if (!ref_sym)
- {
- lrs_general_complaint ("symbol for reference not found");
- return 0;
- }
-
- /* Parse the stab of the referencing symbol
- now that we have the referenced symbol.
- Add it as a new symbol and a link back to the referenced symbol.
- eg: p : "=", "=z:r(0,1)" ":r(0,1);l(#5,#6),l(#7,#4)" */
-
-
- /* If the stab symbol table and string contain:
- RSYM 0 5 00000000 868 #15=z:r(0,1)
- LBRAC 0 0 00000000 899 #5=
- SLINE 0 16 00000003 923 #6=
- Then the same symbols can be later referenced by:
- RSYM 0 5 00000000 927 #15:r(0,1);l(#5,#6)
- This is used in live range splitting to:
- 1) specify that a symbol (#15) is actually just a new storage
- class for a symbol (#15=z) which was previously defined.
- 2) specify that the beginning and ending ranges for a symbol
- (#15) are the values of the beginning (#5) and ending (#6)
- symbols. */
-
- /* Read number as reference id.
- eg: p : "=", "=z:r(0,1)" ":r(0,1);l(#5,#6),l(#7,#4)" */
- /* FIXME! Might I want to use SYMBOL_CLASS (sym) = LOC_OPTIMIZED_OUT;
- in case of "l(0,0)"? */
-
-/*--------------------------------------------------*/
- /* Add this symbol to the reference list. */
-/*--------------------------------------------------*/
-
- alias = (struct alias_list *) obstack_alloc (&objfile->type_obstack,
- sizeof (struct alias_list));
- if (!alias)
- {
- lrs_general_complaint ("Unable to allocate alias list memory");
- return 0;
- }
-
- alias->next = 0;
- alias->sym = sym;
-
- if (!SYMBOL_ALIASES (ref_sym))
- {
- SYMBOL_ALIASES (ref_sym) = alias;
- }
- else
- {
- struct alias_list *temp;
-
- /* Get to the end of the list. */
- for (temp = SYMBOL_ALIASES (ref_sym);
- temp->next;
- temp = temp->next)
- ;
- temp->next = alias;
- }
-
- /* Want to fix up name so that other functions (eg. valops)
- will correctly print the name.
- Don't add_symbol_to_list so that lookup_symbol won't find it.
- nope... needed for fixups. */
- DEPRECATED_SYMBOL_NAME (sym) = DEPRECATED_SYMBOL_NAME (ref_sym);
-
- /* Done! */
- return 1;
-}
-
/* Structure for storing pointers to reference definitions for fast lookup
during "process_later". */
@@ -1211,7 +595,6 @@ symbol_reference_defined (char **string)
}
}
-/* ARGSUSED */
struct symbol *
define_symbol (CORE_ADDR valu, char *string, int desc, int type,
struct objfile *objfile)
@@ -1310,41 +693,6 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
goto normal; /* Do *something* with it */
}
}
- else if (string[0] == '#')
- {
- /* Special GNU C extension for referencing symbols. */
- char *s;
- int refnum, nlen;
-
- /* If STRING defines a new reference id, then add it to the
- reference map. Else it must be referring to a previously
- defined symbol, so add it to the alias list of the previously
- defined symbol. */
- s = string;
- refnum = symbol_reference_defined (&s);
- if (refnum >= 0)
- ref_add (refnum, sym, string, SYMBOL_VALUE (sym));
- else if (!resolve_symbol_reference (objfile, sym, string))
- return NULL;
-
- /* S..P contains the name of the symbol. We need to store
- the correct name into DEPRECATED_SYMBOL_NAME. */
- nlen = p - s;
- if (refnum >= 0)
- {
- if (nlen > 0)
- SYMBOL_SET_NAMES (sym, s, nlen, objfile);
- else
- /* FIXME! Want DEPRECATED_SYMBOL_NAME (sym) = 0;
- Get error if leave name 0. So give it something. */
- {
- nlen = p - string;
- SYMBOL_SET_NAMES (sym, string, nlen, objfile);
- }
- }
- /* Advance STRING beyond the reference id. */
- string = s;
- }
else
{
normal:
@@ -1748,17 +1096,20 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
if (within_function)
{
- /* Sun cc uses a pair of symbols, one 'p' and one 'r' with the same
- name to represent an argument passed in a register.
- GCC uses 'P' for the same case. So if we find such a symbol pair
- we combine it into one 'P' symbol. For Sun cc we need to do this
- regardless of DEPRECATED_REG_STRUCT_HAS_ADDR, because the compiler puts out
- the 'p' symbol even if it never saves the argument onto the stack.
-
- On most machines, we want to preserve both symbols, so that
- we can still get information about what is going on with the
- stack (VAX for computing args_printed, using stack slots instead
- of saved registers in backtraces, etc.).
+ /* Sun cc uses a pair of symbols, one 'p' and one 'r', with
+ the same name to represent an argument passed in a
+ register. GCC uses 'P' for the same case. So if we find
+ such a symbol pair we combine it into one 'P' symbol.
+ For Sun cc we need to do this regardless of
+ stabs_argument_has_addr, because the compiler puts out
+ the 'p' symbol even if it never saves the argument onto
+ the stack.
+
+ On most machines, we want to preserve both symbols, so
+ that we can still get information about what is going on
+ with the stack (VAX for computing args_printed, using
+ stack slots instead of saved registers in backtraces,
+ etc.).
Note that this code illegally combines
main(argc) struct foo argc; { register struct foo argc; }
@@ -1768,13 +1119,8 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
if (local_symbols
&& local_symbols->nsyms > 0
#ifndef USE_REGISTER_NOT_ARG
- && DEPRECATED_REG_STRUCT_HAS_ADDR_P ()
- && DEPRECATED_REG_STRUCT_HAS_ADDR (processing_gcc_compilation,
- SYMBOL_TYPE (sym))
- && (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_STRUCT
- || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_UNION
- || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_SET
- || TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_BITSTRING)
+ && gdbarch_stabs_argument_has_addr (current_gdbarch,
+ SYMBOL_TYPE (sym))
#endif
)
{
@@ -1782,7 +1128,8 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
prev_sym = local_symbols->symbol[local_symbols->nsyms - 1];
if ((SYMBOL_CLASS (prev_sym) == LOC_REF_ARG
|| SYMBOL_CLASS (prev_sym) == LOC_ARG)
- && STREQ (DEPRECATED_SYMBOL_NAME (prev_sym), DEPRECATED_SYMBOL_NAME (sym)))
+ && strcmp (DEPRECATED_SYMBOL_NAME (prev_sym),
+ DEPRECATED_SYMBOL_NAME (sym)) == 0)
{
SYMBOL_CLASS (prev_sym) = LOC_REGPARM;
/* Use the type from the LOC_REGISTER; that is the type
@@ -1913,15 +1260,6 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
if (synonym)
p++;
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* The semantics of C++ state that "struct foo { ... }" also defines
-// OBSOLETE a typedef for "foo". Unfortunately, cfront never makes the typedef
-// OBSOLETE when translating C++ into C. We make the typedef here so that
-// OBSOLETE "ptype foo" works as expected for cfront translated code. */
-// OBSOLETE else if ((current_subfile->language == language_cplus)
-// OBSOLETE || (current_subfile->language == language_objc))
-// OBSOLETE synonym = 1;
-#endif /* OBSOLETE CFront */
SYMBOL_TYPE (sym) = read_type (&p, objfile);
@@ -2011,32 +1349,6 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
add_symbol_to_list (sym, &local_symbols);
break;
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* New code added to support cfront stabs strings.
-// OBSOLETE Note: case 'P' already handled above */
-// OBSOLETE case 'Z':
-// OBSOLETE /* Cfront type continuation coming up!
-// OBSOLETE Find the original definition and add to it.
-// OBSOLETE We'll have to do this for the typedef too,
-// OBSOLETE since we cloned the symbol to define a type in read_type.
-// OBSOLETE Stabs info examples:
-// OBSOLETE __1C :Ztl
-// OBSOLETE foo__1CFv :ZtF (first def foo__1CFv:F(0,3);(0,24))
-// OBSOLETE C:ZsC;;__ct__1CFv func1__1CFv func2__1CFv ... ;;;
-// OBSOLETE where C is the name of the class.
-// OBSOLETE Unfortunately, we can't lookup the original symbol yet 'cuz
-// OBSOLETE we haven't finished reading all the symbols.
-// OBSOLETE Instead, we save it for processing later */
-// OBSOLETE process_later (sym, p, resolve_cfront_continuation);
-// OBSOLETE SYMBOL_TYPE (sym) = error_type (&p, objfile); /* FIXME! change later */
-// OBSOLETE SYMBOL_CLASS (sym) = LOC_CONST;
-// OBSOLETE SYMBOL_VALUE (sym) = 0;
-// OBSOLETE SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
-// OBSOLETE /* Don't add to list - we'll delete it later when
-// OBSOLETE we add the continuation to the real sym */
-// OBSOLETE return sym;
-// OBSOLETE /* End of new code added to support cfront stabs strings */
-#endif /* OBSOLETE CFront */
default:
SYMBOL_TYPE (sym) = error_type (&p, objfile);
@@ -2047,161 +1359,26 @@ define_symbol (CORE_ADDR valu, char *string, int desc, int type,
break;
}
- /* When passing structures to a function, some systems sometimes pass
- the address in a register, not the structure itself. */
+ /* Some systems pass variables of certain types by reference instead
+ of by value, i.e. they will pass the address of a structure (in a
+ register or on the stack) instead of the structure itself. */
- if (DEPRECATED_REG_STRUCT_HAS_ADDR_P ()
- && DEPRECATED_REG_STRUCT_HAS_ADDR (processing_gcc_compilation, SYMBOL_TYPE (sym))
+ if (gdbarch_stabs_argument_has_addr (current_gdbarch, SYMBOL_TYPE (sym))
&& (SYMBOL_CLASS (sym) == LOC_REGPARM || SYMBOL_CLASS (sym) == LOC_ARG))
{
- struct type *symbol_type = check_typedef (SYMBOL_TYPE (sym));
-
- if ((TYPE_CODE (symbol_type) == TYPE_CODE_STRUCT)
- || (TYPE_CODE (symbol_type) == TYPE_CODE_UNION)
- || (TYPE_CODE (symbol_type) == TYPE_CODE_BITSTRING)
- || (TYPE_CODE (symbol_type) == TYPE_CODE_SET))
- {
- /* If DEPRECATED_REG_STRUCT_HAS_ADDR yields non-zero we have to convert
- LOC_REGPARM to LOC_REGPARM_ADDR for structures and unions. */
- if (SYMBOL_CLASS (sym) == LOC_REGPARM)
- SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;
- /* Likewise for converting LOC_ARG to LOC_REF_ARG (for the 7th
- and subsequent arguments on the sparc, for example). */
- else if (SYMBOL_CLASS (sym) == LOC_ARG)
- SYMBOL_CLASS (sym) = LOC_REF_ARG;
- }
+ /* We have to convert LOC_REGPARM to LOC_REGPARM_ADDR (for
+ variables passed in a register). */
+ if (SYMBOL_CLASS (sym) == LOC_REGPARM)
+ SYMBOL_CLASS (sym) = LOC_REGPARM_ADDR;
+ /* Likewise for converting LOC_ARG to LOC_REF_ARG (for the 7th
+ and subsequent arguments on SPARC, for example). */
+ else if (SYMBOL_CLASS (sym) == LOC_ARG)
+ SYMBOL_CLASS (sym) = LOC_REF_ARG;
}
- /* Is there more to parse? For example LRS/alias information? */
- while (*p && *p == ';')
- {
- p++;
- if (*p && p[0] == 'l' && p[1] == '(')
- {
- /* GNU extensions for live range splitting may be appended to
- the end of the stab string. eg. "l(#1,#2);l(#3,#5)" */
-
- /* Resolve the live range and add it to SYM's live range list. */
- if (!resolve_live_range (objfile, sym, p))
- return NULL;
-
- /* Find end of live range info. */
- p = strchr (p, ')');
- if (!*p || *p != ')')
- {
- lrs_general_complaint ("live range format not recognized");
- return NULL;
- }
- p++;
- }
- }
return sym;
}
-/* Add the live range found in P to the symbol SYM in objfile OBJFILE. Returns
- non-zero on success, zero otherwise. */
-
-static int
-resolve_live_range (struct objfile *objfile, struct symbol *sym, char *p)
-{
- int refnum;
- CORE_ADDR start, end;
-
- /* Sanity check the beginning of the stabs string. */
- if (!*p || *p != 'l')
- {
- lrs_general_complaint ("live range string 1");
- return 0;
- }
- p++;
-
- if (!*p || *p != '(')
- {
- lrs_general_complaint ("live range string 2");
- return 0;
- }
- p++;
-
- /* Get starting value of range and advance P past the reference id.
-
- ?!? In theory, the process_reference should never fail, but we should
- catch that case just in case the compiler scrogged the stabs. */
- refnum = process_reference (&p);
- start = ref_search_value (refnum);
- if (!start)
- {
- lrs_general_complaint ("Live range symbol not found 1");
- return 0;
- }
-
- if (!*p || *p != ',')
- {
- lrs_general_complaint ("live range string 3");
- return 0;
- }
- p++;
-
- /* Get ending value of range and advance P past the reference id.
-
- ?!? In theory, the process_reference should never fail, but we should
- catch that case just in case the compiler scrogged the stabs. */
- refnum = process_reference (&p);
- end = ref_search_value (refnum);
- if (!end)
- {
- lrs_general_complaint ("Live range symbol not found 2");
- return 0;
- }
-
- if (!*p || *p != ')')
- {
- lrs_general_complaint ("live range string 4");
- return 0;
- }
-
- /* Now that we know the bounds of the range, add it to the
- symbol. */
- add_live_range (objfile, sym, start, end);
-
- return 1;
-}
-
-/* Add a new live range defined by START and END to the symbol SYM
- in objfile OBJFILE. */
-
-static void
-add_live_range (struct objfile *objfile, struct symbol *sym, CORE_ADDR start,
- CORE_ADDR end)
-{
- struct range_list *r, *rs;
-
- if (start >= end)
- {
- lrs_general_complaint ("end of live range follows start");
- return;
- }
-
- /* Alloc new live range structure. */
- r = (struct range_list *)
- obstack_alloc (&objfile->type_obstack,
- sizeof (struct range_list));
- r->start = start;
- r->end = end;
- r->next = 0;
-
- /* Append this range to the symbol's range list. */
- if (!SYMBOL_RANGES (sym))
- SYMBOL_RANGES (sym) = r;
- else
- {
- /* Get the last range for the symbol. */
- for (rs = SYMBOL_RANGES (sym); rs->next; rs = rs->next)
- ;
- rs->next = r;
- }
-}
-
-
/* Skip rest of this symbol and return an error type.
General notes on error recovery: error_type always skips to the
@@ -2399,7 +1576,7 @@ again:
if (SYMBOL_CLASS (sym) == LOC_TYPEDEF
&& SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN
&& (TYPE_CODE (SYMBOL_TYPE (sym)) == code)
- && STREQ (DEPRECATED_SYMBOL_NAME (sym), type_name))
+ && strcmp (DEPRECATED_SYMBOL_NAME (sym), type_name) == 0)
{
obstack_free (&objfile->type_obstack, type_name);
type = SYMBOL_TYPE (sym);
@@ -3558,39 +2735,8 @@ static void
read_one_struct_field (struct field_info *fip, char **pp, char *p,
struct type *type, struct objfile *objfile)
{
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* The following is code to work around cfront generated stabs.
-// OBSOLETE The stabs contains full mangled name for each field.
-// OBSOLETE We try to demangle the name and extract the field name out of it.
-// OBSOLETE */
-// OBSOLETE if (ARM_DEMANGLING && current_subfile->language == language_cplus)
-// OBSOLETE {
-// OBSOLETE char save_p;
-// OBSOLETE char *dem, *dem_p;
-// OBSOLETE save_p = *p;
-// OBSOLETE *p = '\0';
-// OBSOLETE dem = cplus_demangle (*pp, DMGL_ANSI | DMGL_PARAMS);
-// OBSOLETE if (dem != NULL)
-// OBSOLETE {
-// OBSOLETE dem_p = strrchr (dem, ':');
-// OBSOLETE if (dem_p != 0 && *(dem_p - 1) == ':')
-// OBSOLETE dem_p++;
-// OBSOLETE FIELD_NAME (fip->list->field) =
-// OBSOLETE obsavestring (dem_p, strlen (dem_p), &objfile->type_obstack);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE FIELD_NAME (fip->list->field) =
-// OBSOLETE obsavestring (*pp, p - *pp, &objfile->type_obstack);
-// OBSOLETE }
-// OBSOLETE *p = save_p;
-// OBSOLETE }
-// OBSOLETE /* end of code for cfront work around */
-
-// OBSOLETE else
-#endif /* OBSOLETE CFront */
- fip->list->field.name =
- obsavestring (*pp, p - *pp, &objfile->type_obstack);
+ fip->list->field.name =
+ obsavestring (*pp, p - *pp, &objfile->type_obstack);
*pp = p + 1;
/* This means we have a visibility for a field coming. */
@@ -4041,138 +3187,6 @@ attach_fn_fields_to_type (struct field_info *fip, struct type *type)
return 1;
}
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* read cfront class static data.
-// OBSOLETE pp points to string starting with the list of static data
-// OBSOLETE eg: A:ZcA;1@Bpub v2@Bvirpri;__ct__1AFv func__1AFv *sfunc__1AFv ;as__1A ;;
-// OBSOLETE ^^^^^^^^
-
-// OBSOLETE A:ZcA;;foopri__1AFv foopro__1AFv __ct__1AFv __ct__1AFRC1A foopub__1AFv ;;;
-// OBSOLETE ^
-// OBSOLETE */
-
-// OBSOLETE static int
-// OBSOLETE read_cfront_static_fields (struct field_info *fip, char **pp, struct type *type,
-// OBSOLETE struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE struct nextfield *new;
-// OBSOLETE struct type *stype;
-// OBSOLETE char *sname;
-// OBSOLETE struct symbol *ref_static = 0;
-
-// OBSOLETE if (**pp == ';') /* no static data; return */
-// OBSOLETE {
-// OBSOLETE ++(*pp);
-// OBSOLETE return 1;
-// OBSOLETE }
-
-// OBSOLETE /* Process each field in the list until we find the terminating ";" */
-
-// OBSOLETE /* eg: p = "as__1A ;;;" */
-// OBSOLETE STABS_CONTINUE (pp, objfile); /* handle \\ */
-// OBSOLETE while (**pp != ';' && (sname = get_substring (pp, ' '), sname))
-// OBSOLETE {
-// OBSOLETE ref_static = lookup_symbol (sname, 0, VAR_DOMAIN, 0, 0); /*demangled_name */
-// OBSOLETE if (!ref_static)
-// OBSOLETE {
-// OBSOLETE complaint (&symfile_complaints,
-// OBSOLETE "Unable to find symbol for static data field %s", sname);
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE stype = SYMBOL_TYPE (ref_static);
-
-// OBSOLETE /* allocate a new fip */
-// OBSOLETE new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
-// OBSOLETE make_cleanup (xfree, new);
-// OBSOLETE memset (new, 0, sizeof (struct nextfield));
-// OBSOLETE new->next = fip->list;
-// OBSOLETE fip->list = new;
-
-// OBSOLETE /* set visibility */
-// OBSOLETE /* FIXME! no way to tell visibility from stabs??? */
-// OBSOLETE new->visibility = VISIBILITY_PUBLIC;
-
-// OBSOLETE /* set field info into fip */
-// OBSOLETE fip->list->field.type = stype;
-
-// OBSOLETE /* set bitpos & bitsize */
-// OBSOLETE SET_FIELD_PHYSNAME (fip->list->field, savestring (sname, strlen (sname)));
-
-// OBSOLETE /* set name field */
-// OBSOLETE /* The following is code to work around cfront generated stabs.
-// OBSOLETE The stabs contains full mangled name for each field.
-// OBSOLETE We try to demangle the name and extract the field name out of it.
-// OBSOLETE */
-// OBSOLETE if (ARM_DEMANGLING)
-// OBSOLETE {
-// OBSOLETE char *dem, *dem_p;
-// OBSOLETE dem = cplus_demangle (sname, DMGL_ANSI | DMGL_PARAMS);
-// OBSOLETE if (dem != NULL)
-// OBSOLETE {
-// OBSOLETE dem_p = strrchr (dem, ':');
-// OBSOLETE if (dem_p != 0 && *(dem_p - 1) == ':')
-// OBSOLETE dem_p++;
-// OBSOLETE fip->list->field.name =
-// OBSOLETE obsavestring (dem_p, strlen (dem_p), &objfile->type_obstack);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE fip->list->field.name =
-// OBSOLETE obsavestring (sname, strlen (sname), &objfile->type_obstack);
-// OBSOLETE }
-// OBSOLETE } /* end of code for cfront work around */
-// OBSOLETE } /* loop again for next static field */
-// OBSOLETE return 1;
-// OBSOLETE }
-
-// OBSOLETE /* Copy structure fields to fip so attach_fields_to_type will work.
-// OBSOLETE type has already been created with the initial instance data fields.
-// OBSOLETE Now we want to be able to add the other members to the class,
-// OBSOLETE so we want to add them back to the fip and reattach them again
-// OBSOLETE once we have collected all the class members. */
-
-// OBSOLETE static int
-// OBSOLETE copy_cfront_struct_fields (struct field_info *fip, struct type *type,
-// OBSOLETE struct objfile *objfile)
-// OBSOLETE {
-// OBSOLETE int nfields = TYPE_NFIELDS (type);
-// OBSOLETE int i;
-// OBSOLETE struct nextfield *new;
-
-// OBSOLETE /* Copy the fields into the list of fips and reset the types
-// OBSOLETE to remove the old fields */
-
-// OBSOLETE for (i = 0; i < nfields; i++)
-// OBSOLETE {
-// OBSOLETE /* allocate a new fip */
-// OBSOLETE new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
-// OBSOLETE make_cleanup (xfree, new);
-// OBSOLETE memset (new, 0, sizeof (struct nextfield));
-// OBSOLETE new->next = fip->list;
-// OBSOLETE fip->list = new;
-
-// OBSOLETE /* copy field info into fip */
-// OBSOLETE new->field = TYPE_FIELD (type, i);
-// OBSOLETE /* set visibility */
-// OBSOLETE if (TYPE_FIELD_PROTECTED (type, i))
-// OBSOLETE new->visibility = VISIBILITY_PROTECTED;
-// OBSOLETE else if (TYPE_FIELD_PRIVATE (type, i))
-// OBSOLETE new->visibility = VISIBILITY_PRIVATE;
-// OBSOLETE else
-// OBSOLETE new->visibility = VISIBILITY_PUBLIC;
-// OBSOLETE }
-// OBSOLETE /* Now delete the fields from the type since we will be
-// OBSOLETE allocing new space once we get the rest of the fields
-// OBSOLETE in attach_fields_to_type.
-// OBSOLETE The pointer TYPE_FIELDS(type) is left dangling but should
-// OBSOLETE be freed later by objstack_free */
-// OBSOLETE TYPE_FIELDS (type) = 0;
-// OBSOLETE TYPE_NFIELDS (type) = 0;
-
-// OBSOLETE return 1;
-// OBSOLETE }
-#endif /* OBSOLETE CFront */
-
/* Create the vector of fields, and record how big it is.
We need this info to record proper virtual function table information
for this class's virtual functions. */
@@ -5194,7 +4208,7 @@ cleanup_undefined_types (void)
&& SYMBOL_DOMAIN (sym) == STRUCT_DOMAIN
&& (TYPE_CODE (SYMBOL_TYPE (sym)) ==
TYPE_CODE (*type))
- && STREQ (DEPRECATED_SYMBOL_NAME (sym), typename))
+ && strcmp (DEPRECATED_SYMBOL_NAME (sym), typename) == 0)
replace_type (*type, SYMBOL_TYPE (sym));
}
}
@@ -5224,7 +4238,7 @@ scan_file_globals (struct objfile *objfile)
{
int hash;
struct minimal_symbol *msymbol;
- struct symbol *sym, *prev, *rsym;
+ struct symbol *sym, *prev;
struct objfile *resolve_objfile;
/* SVR4 based linkers copy referenced global symbols from shared
@@ -5276,11 +4290,8 @@ scan_file_globals (struct objfile *objfile)
for (sym = global_sym_chain[hash]; sym;)
{
if (DEPRECATED_SYMBOL_NAME (msymbol)[0] == DEPRECATED_SYMBOL_NAME (sym)[0] &&
- STREQ (DEPRECATED_SYMBOL_NAME (msymbol) + 1, DEPRECATED_SYMBOL_NAME (sym) + 1))
+ strcmp (DEPRECATED_SYMBOL_NAME (msymbol) + 1, DEPRECATED_SYMBOL_NAME (sym) + 1) == 0)
{
-
- struct alias_list *aliases;
-
/* Splice this symbol out of the hash chain and
assign the value we have to it. */
if (prev)
@@ -5295,38 +4306,21 @@ scan_file_globals (struct objfile *objfile)
/* Check to see whether we need to fix up a common block. */
/* Note: this code might be executed several times for
the same symbol if there are multiple references. */
-
- /* If symbol has aliases, do minimal symbol fixups for each.
- These live aliases/references weren't added to
- global_sym_chain hash but may also need to be fixed up. */
- /* FIXME: Maybe should have added aliases to the global chain, resolved symbol name, then treated aliases as normal
- symbols? Still, we wouldn't want to add_to_list. */
- /* Now do the same for each alias of this symbol */
- rsym = sym;
- aliases = SYMBOL_ALIASES (sym);
- while (rsym)
+ if (sym)
{
- if (SYMBOL_CLASS (rsym) == LOC_BLOCK)
+ if (SYMBOL_CLASS (sym) == LOC_BLOCK)
{
- fix_common_block (rsym,
+ fix_common_block (sym,
SYMBOL_VALUE_ADDRESS (msymbol));
}
else
{
- SYMBOL_VALUE_ADDRESS (rsym)
+ SYMBOL_VALUE_ADDRESS (sym)
= SYMBOL_VALUE_ADDRESS (msymbol);
}
- SYMBOL_SECTION (rsym) = SYMBOL_SECTION (msymbol);
- if (aliases)
- {
- rsym = aliases->sym;
- aliases = aliases->next;
- }
- else
- rsym = NULL;
+ SYMBOL_SECTION (sym) = SYMBOL_SECTION (msymbol);
}
-
if (prev)
{
sym = SYMBOL_VALUE_CHAIN (prev);
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index 91db978..531f9a1 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -194,22 +194,12 @@ extern void stabsect_build_psymtabs
extern void elfstab_offset_sections (struct objfile *,
struct partial_symtab *);
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE extern void process_later
-// OBSOLETE (struct symbol *, char *,
-// OBSOLETE int (*f) (struct objfile *, struct symbol *, char *));
-#endif /* OBSOLETE CFront */
-
extern int symbol_reference_defined (char **);
extern void ref_add (int, struct symbol *, char *, CORE_ADDR);
extern struct symbol *ref_search (int);
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE extern int resolve_cfront_continuation
-// OBSOLETE (struct objfile *objfile, struct symbol *sym, char *p);
-#endif /* OBSOLETE CFront */
extern void free_header_files (void);
extern void init_header_files (void);
diff --git a/gdb/stack.c b/gdb/stack.c
index 9a5b4c2..82820aa 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -43,6 +43,8 @@
#include "stack.h"
#include "gdb_assert.h"
#include "dictionary.h"
+#include "reggroups.h"
+#include "regcache.h"
/* Prototypes for exported functions. */
@@ -54,8 +56,6 @@ void (*selected_frame_level_changed_hook) (int);
void _initialize_stack (void);
-void return_command (char *, int);
-
/* Prototypes for local functions. */
static void down_command (char *, int);
@@ -968,8 +968,8 @@ frame_info (char *addr_exp, int from_tty)
printf_filtered (" source language %s.\n",
language_str (s->language));
-#ifdef PRINT_EXTRA_FRAME_INFO
- PRINT_EXTRA_FRAME_INFO (fi);
+#ifdef DEPRECATED_PRINT_EXTRA_FRAME_INFO
+ DEPRECATED_PRINT_EXTRA_FRAME_INFO (fi);
#endif
{
@@ -1021,7 +1021,7 @@ frame_info (char *addr_exp, int from_tty)
}
if (DEPRECATED_FRAME_INIT_SAVED_REGS_P ()
- && get_frame_saved_regs (fi) == NULL)
+ && 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. */
@@ -1054,7 +1054,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, REGISTER_RAW_SIZE (SP_REGNUM));
+ sp = extract_unsigned_integer (value, DEPRECATED_REGISTER_RAW_SIZE (SP_REGNUM));
printf_filtered (" Previous frame's sp is ");
print_address_numeric (sp, 1, gdb_stdout);
printf_filtered ("\n");
@@ -1079,7 +1079,8 @@ frame_info (char *addr_exp, int from_tty)
count = 0;
numregs = NUM_REGS + NUM_PSEUDO_REGS;
for (i = 0; i < numregs; i++)
- if (i != SP_REGNUM)
+ if (i != SP_REGNUM
+ && gdbarch_register_reggroup_p (current_gdbarch, i, all_reggroup))
{
/* Find out the location of the saved register without
fetching the corresponding value. */
@@ -1488,7 +1489,6 @@ print_frame_label_vars (struct frame_info *fi, int this_level_only,
}
}
-/* ARGSUSED */
void
locals_info (char *args, int from_tty)
{
@@ -1736,7 +1736,6 @@ current_frame_command (char *level_exp, int from_tty)
/* Select the frame up one or COUNT stack levels
from the previously selected frame, and print it briefly. */
-/* ARGSUSED */
static void
up_silently_base (char *count_exp)
{
@@ -1773,7 +1772,6 @@ up_command (char *count_exp, int from_tty)
/* Select the frame down one or COUNT stack levels
from the previously selected frame, and print it briefly. */
-/* ARGSUSED */
static void
down_silently_base (char *count_exp)
{
@@ -1802,7 +1800,6 @@ down_silently_base (char *count_exp)
selected_frame_level_changed_event (frame_relative_level (deprecated_selected_frame));
}
-/* ARGSUSED */
static void
down_silently_command (char *count_exp, int from_tty)
{
@@ -1821,94 +1818,147 @@ void
return_command (char *retval_exp, int from_tty)
{
struct symbol *thisfun;
- CORE_ADDR selected_frame_addr;
- CORE_ADDR selected_frame_pc;
- struct frame_info *frame;
struct value *return_value = NULL;
+ const char *query_prefix = "";
- if (deprecated_selected_frame == NULL)
+ /* FIXME: cagney/2003-10-20: Perform a minimal existance test on the
+ target. If that fails, error out. For the moment don't rely on
+ get_selected_frame as it's error message is the the singularly
+ obscure "No registers". */
+ if (!target_has_registers)
error ("No selected frame.");
- thisfun = get_frame_function (deprecated_selected_frame);
- selected_frame_addr = get_frame_base (deprecated_selected_frame);
- selected_frame_pc = get_frame_pc (deprecated_selected_frame);
-
- /* Compute the return value (if any -- possibly getting errors here). */
+ thisfun = get_frame_function (get_selected_frame ());
+ /* Compute the return value. If the computation triggers an error,
+ let it bail. If the return type can't be handled, set
+ RETURN_VALUE to NULL, and QUERY_PREFIX to an informational
+ message. */
if (retval_exp)
{
struct type *return_type = NULL;
+ /* Compute the return value. Should the computation fail, this
+ call throws an error. */
return_value = parse_and_eval (retval_exp);
- /* Cast return value to the return type of the function. */
+ /* Cast return value to the return type of the function. Should
+ the cast fail, this call throws an error. */
if (thisfun != NULL)
return_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (thisfun));
if (return_type == NULL)
return_type = builtin_type_int;
return_value = value_cast (return_type, return_value);
- /* Make sure we have fully evaluated it, since
- it might live in the stack frame we're about to pop. */
+ /* Make sure the value is fully evaluated. It may live in the
+ stack frame we're about to pop. */
if (VALUE_LAZY (return_value))
value_fetch_lazy (return_value);
- }
-
- /* If interactive, require confirmation. */
- if (from_tty)
- {
- if (thisfun != 0)
+ /* Check that this architecture can handle the function's return
+ type. In the case of "struct convention", still do the
+ "return", just also warn the user. */
+ if (gdbarch_return_value_p (current_gdbarch))
{
- if (!query ("Make %s return now? ", SYMBOL_PRINT_NAME (thisfun)))
- {
- error ("Not confirmed.");
- /* NOTREACHED */
- }
+ if (gdbarch_return_value (current_gdbarch, return_type,
+ NULL, NULL, NULL)
+ == RETURN_VALUE_STRUCT_CONVENTION)
+ return_value = NULL;
}
- else if (!query ("Make selected stack frame return now? "))
- error ("Not confirmed.");
+ else
+ {
+ /* NOTE: cagney/2003-10-20: The double check is to ensure
+ that the STORE_RETURN_VALUE call, further down, is not
+ applied to a struct or union return-value. It wasn't
+ allowed previously, so don't start allowing it now. An
+ ABI that uses "register convention" to return small
+ structures and should implement the "return_value"
+ architecture method. */
+ if (using_struct_return (return_type, 0)
+ || TYPE_CODE (return_type) == TYPE_CODE_STRUCT
+ || TYPE_CODE (return_type) == TYPE_CODE_UNION)
+ return_value = NULL;
+ }
+ if (return_value == NULL)
+ query_prefix = "\
+The location at which to store the function's return value is unknown.\n";
}
- /* FIXME: cagney/2003-01-18: Rather than pop each frame in turn,
- this code should just go straight to the relevant frame and pop
- that. */
-
- /* Do the real work. Pop until the specified frame is current. We
- use this method because the deprecated_selected_frame is not
- valid after a frame_pop(). The pc comparison makes this work
- even if the selected frame shares its fp with another frame. */
-
- /* FIXME: cagney/32003-03-12: This code should use frame_id_eq().
- Unfortunatly, that function doesn't yet include the PC in any
- frame ID comparison. */
+ /* Does an interactive user really want to do this? Include
+ information, such as how well GDB can handle the return value, in
+ the query message. */
+ if (from_tty)
+ {
+ int confirmed;
+ if (thisfun == NULL)
+ confirmed = query ("%sMake selected stack frame return now? ",
+ query_prefix);
+ else
+ confirmed = query ("%sMake %s return now? ", query_prefix,
+ SYMBOL_PRINT_NAME (thisfun));
+ if (!confirmed)
+ error ("Not confirmed");
+ }
- while (selected_frame_addr != get_frame_base (frame = get_current_frame ())
- || selected_frame_pc != get_frame_pc (frame))
- frame_pop (get_current_frame ());
+ /* NOTE: cagney/2003-01-18: Is this silly? Rather than pop each
+ frame in turn, should this code just go straight to the relevant
+ frame and pop that? */
- /* Then pop that frame. */
+ /* First discard all frames inner-to the selected frame (making the
+ selected frame current). */
+ {
+ struct frame_id selected_id = get_frame_id (get_selected_frame ());
+ while (!frame_id_eq (selected_id, get_frame_id (get_current_frame ())))
+ {
+ if (frame_id_inner (selected_id, get_frame_id (get_current_frame ())))
+ /* Caught in the safety net, oops! We've gone way past the
+ selected frame. */
+ error ("Problem while popping stack frames (corrupt stack?)");
+ frame_pop (get_current_frame ());
+ }
+ }
+ /* Second discard the selected frame (which is now also the current
+ frame). */
frame_pop (get_current_frame ());
- /* Compute the return value (if any) and store in the place
- for return values. */
-
- if (retval_exp)
- set_return_value (return_value);
-
- /* If we are at the end of a call dummy now, pop the dummy frame too. */
+ /* Store RETURN_VAUE in the just-returned register set. */
+ 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));
+ }
+ 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*/);
+ }
+ }
- /* FIXME: cagney/2003-01-18: This is silly. Instead of popping all
- the frames except the dummy, and then, as an afterthought,
- popping the dummy frame, this code should just pop through to the
- dummy frame. */
-
- if (CALL_DUMMY_HAS_COMPLETED (read_pc(), read_sp (),
- get_frame_base (get_current_frame ())))
+ /* If we are at the end of a call dummy now, pop the dummy frame
+ too. */
+ /* NOTE: cagney/2003-01-18: Is this silly? Instead of popping all
+ the frames in sequence, should this code just pop the dummy frame
+ directly? */
+#ifdef DEPRECATED_CALL_DUMMY_HAS_COMPLETED
+ /* Since all up-to-date architectures return direct to the dummy
+ breakpoint address, a dummy frame has, by definition, always
+ completed. Hence this method is no longer needed. */
+ if (DEPRECATED_CALL_DUMMY_HAS_COMPLETED (read_pc(), read_sp (),
+ get_frame_base (get_current_frame ())))
frame_pop (get_current_frame ());
+#else
+ if (get_frame_type (get_current_frame ()) == DUMMY_FRAME)
+ frame_pop (get_current_frame ());
+#endif
/* If interactive, print the frame that is now current. */
-
if (from_tty)
frame_command ("0", 1);
else
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 586ecd1..f2656fb 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -872,7 +872,7 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
*/
if (from_tty || info_verbose)
{
- printf_filtered ("Mapped symbols for %s...", name);
+ printf_unfiltered ("Mapped symbols for %s...", name);
wrap_here ("");
gdb_flush (gdb_stdout);
}
@@ -890,7 +890,7 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
pre_add_symbol_hook (name);
else
{
- printf_filtered ("Reading symbols from %s...", name);
+ printf_unfiltered ("Reading symbols from %s...", name);
wrap_here ("");
gdb_flush (gdb_stdout);
}
@@ -908,7 +908,7 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
{
if (from_tty || info_verbose)
{
- printf_filtered ("expanding to full symbols...");
+ printf_unfiltered ("expanding to full symbols...");
wrap_here ("");
gdb_flush (gdb_stdout);
}
@@ -947,7 +947,7 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
if (!have_partial_symbols () && !have_full_symbols ())
{
wrap_here ("");
- printf_filtered ("(no debugging symbols found)...");
+ printf_unfiltered ("(no debugging symbols found)...");
wrap_here ("");
}
@@ -957,7 +957,7 @@ symbol_file_add_with_addrs_or_offsets (char *name, int from_tty,
post_add_symbol_hook ();
else
{
- printf_filtered ("done.\n");
+ printf_unfiltered ("done.\n");
}
}
@@ -1223,7 +1223,7 @@ symbol_file_command (char *args, int from_tty)
cleanups = make_cleanup_freeargv (argv);
while (*argv != NULL)
{
- if (STREQ (*argv, "-mapped"))
+ if (strcmp (*argv, "-mapped") == 0)
flags |= OBJF_MAPPED;
else
if (STREQ (*argv, "-readnow"))
@@ -1666,7 +1666,6 @@ print_transfer_performance (struct ui_file *stream,
instead a call to target_link() (in target.c) would supply the
value to use. We are now discontinuing this type of ad hoc syntax. */
-/* ARGSUSED */
static void
add_symbol_file_command (char *args, int from_tty)
{
@@ -1798,7 +1797,7 @@ add_symbol_file_command (char *args, int from_tty)
statements because local_hex_string returns a local static
string. */
- printf_filtered ("add symbol table from file \"%s\" at\n", filename);
+ printf_unfiltered ("add symbol table from file \"%s\" at\n", filename);
section_addrs = alloc_section_addr_info (section_index);
make_cleanup (xfree, section_addrs);
for (i = 0; i < section_index; i++)
@@ -1813,7 +1812,7 @@ add_symbol_file_command (char *args, int from_tty)
entered on the command line. */
section_addrs->other[sec_num].name = sec;
section_addrs->other[sec_num].addr = addr;
- printf_filtered ("\t%s_addr = %s\n",
+ printf_unfiltered ("\t%s_addr = %s\n",
sec,
local_hex_string ((unsigned long)addr));
sec_num++;
@@ -1878,7 +1877,7 @@ reread_symbols (void)
if (res != 0)
{
/* FIXME, should use print_sys_errmsg but it's not filtered. */
- printf_filtered ("`%s' has disappeared; keeping its symbols.\n",
+ printf_unfiltered ("`%s' has disappeared; keeping its symbols.\n",
objfile->name);
continue;
}
@@ -1890,7 +1889,7 @@ reread_symbols (void)
int num_offsets;
char *obfd_filename;
- printf_filtered ("`%s' has changed; re-reading symbols.\n",
+ printf_unfiltered ("`%s' has changed; re-reading symbols.\n",
objfile->name);
/* There are various functions like symbol_file_add,
@@ -1970,6 +1969,7 @@ reread_symbols (void)
memset (&objfile->msymbol_demangled_hash, 0,
sizeof (objfile->msymbol_demangled_hash));
objfile->fundamental_types = NULL;
+ clear_objfile_data (objfile);
if (objfile->sf != NULL)
{
(*objfile->sf->sym_finish) (objfile);
@@ -2023,7 +2023,7 @@ reread_symbols (void)
if (!have_partial_symbols () && !have_full_symbols ())
{
wrap_here ("");
- printf_filtered ("(no debugging symbols found)\n");
+ printf_unfiltered ("(no debugging symbols found)\n");
wrap_here ("");
}
objfile->flags |= OBJF_SYMS;
@@ -2539,7 +2539,7 @@ free_named_symtabs (char *name)
again2:
for (ps = partial_symtab_list; ps; ps = ps->next)
{
- if (STREQ (name, ps->filename))
+ if (strcmp (name, ps->filename) == 0)
{
cashier_psymtab (ps); /* Blow it away...and its little dog, too. */
goto again2; /* Must restart, chain has been munged */
@@ -2550,7 +2550,7 @@ again2:
for (s = symtab_list; s; s = s->next)
{
- if (STREQ (name, s->filename))
+ if (strcmp (name, s->filename) == 0)
break;
prev = s;
}
@@ -3193,7 +3193,7 @@ the 'overlay manual' command.");
sec2->the_bfd_section))
{
if (info_verbose)
- printf_filtered ("Note: section %s unmapped by overlap\n",
+ printf_unfiltered ("Note: section %s unmapped by overlap\n",
bfd_section_name (objfile->obfd,
sec2->the_bfd_section));
sec2->ovly_mapped = 0; /* sec2 overlaps sec: unmap sec2 */
@@ -3243,7 +3243,7 @@ overlay_auto_command (char *args, int from_tty)
overlay_debugging = ovly_auto;
enable_overlay_breakpoints ();
if (info_verbose)
- printf_filtered ("Automatic overlay debugging enabled.");
+ printf_unfiltered ("Automatic overlay debugging enabled.");
}
/* Function: overlay_manual_command
@@ -3256,7 +3256,7 @@ overlay_manual_command (char *args, int from_tty)
overlay_debugging = ovly_on;
disable_overlay_breakpoints ();
if (info_verbose)
- printf_filtered ("Overlay debugging enabled.");
+ printf_unfiltered ("Overlay debugging enabled.");
}
/* Function: overlay_off_command
@@ -3269,7 +3269,7 @@ overlay_off_command (char *args, int from_tty)
overlay_debugging = ovly_off;
disable_overlay_breakpoints ();
if (info_verbose)
- printf_filtered ("Overlay debugging disabled.");
+ printf_unfiltered ("Overlay debugging disabled.");
}
static void
diff --git a/gdb/symm-nat.c b/gdb/symm-nat.c
deleted file mode 100644
index c4b2c9a..0000000
--- a/gdb/symm-nat.c
+++ /dev/null
@@ -1,902 +0,0 @@
-// OBSOLETE /* Sequent Symmetry host interface, for GDB when running under Unix.
-// OBSOLETE
-// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1999,
-// OBSOLETE 2000, 2001, 2003 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 /* FIXME, some 387-specific items of use taken from i387-tdep.c -- ought to be
-// OBSOLETE merged back in. */
-// OBSOLETE
-// OBSOLETE #include "defs.h"
-// OBSOLETE #include "frame.h"
-// OBSOLETE #include "inferior.h"
-// OBSOLETE #include "symtab.h"
-// OBSOLETE #include "target.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE /* FIXME: What is the _INKERNEL define for? */
-// OBSOLETE #define _INKERNEL
-// OBSOLETE #include <signal.h>
-// OBSOLETE #undef _INKERNEL
-// OBSOLETE #include "gdb_wait.h"
-// OBSOLETE #include <sys/param.h>
-// OBSOLETE #include <sys/user.h>
-// OBSOLETE #include <sys/proc.h>
-// OBSOLETE #include <sys/dir.h>
-// OBSOLETE #include <sys/ioctl.h>
-// OBSOLETE #include "gdb_stat.h"
-// OBSOLETE #ifdef _SEQUENT_
-// OBSOLETE #include <sys/ptrace.h>
-// OBSOLETE #else
-// OBSOLETE /* Dynix has only machine/ptrace.h, which is already included by sys/user.h */
-// OBSOLETE /* Dynix has no mptrace call */
-// OBSOLETE #define mptrace ptrace
-// OBSOLETE #endif
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include <fcntl.h>
-// OBSOLETE #include <sgtty.h>
-// OBSOLETE #define TERMINAL struct sgttyb
-// OBSOLETE
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE store_inferior_registers (int regno)
-// OBSOLETE {
-// OBSOLETE struct pt_regset regs;
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE /* FIXME: Fetching the registers is a kludge to initialize all elements
-// OBSOLETE in the fpu and fpa status. This works for normal debugging, but
-// OBSOLETE might cause problems when calling functions in the inferior.
-// OBSOLETE At least fpu_control and fpa_pcr (probably more) should be added
-// OBSOLETE to the registers array to solve this properly. */
-// OBSOLETE mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
-// OBSOLETE
-// OBSOLETE regs.pr_eax = *(int *) &deprecated_registers[REGISTER_BYTE (0)];
-// OBSOLETE regs.pr_ebx = *(int *) &deprecated_registers[REGISTER_BYTE (5)];
-// OBSOLETE regs.pr_ecx = *(int *) &deprecated_registers[REGISTER_BYTE (2)];
-// OBSOLETE regs.pr_edx = *(int *) &deprecated_registers[REGISTER_BYTE (1)];
-// OBSOLETE regs.pr_esi = *(int *) &deprecated_registers[REGISTER_BYTE (6)];
-// OBSOLETE regs.pr_edi = *(int *) &deprecated_registers[REGISTER_BYTE (7)];
-// OBSOLETE regs.pr_esp = *(int *) &deprecated_registers[REGISTER_BYTE (14)];
-// OBSOLETE regs.pr_ebp = *(int *) &deprecated_registers[REGISTER_BYTE (15)];
-// OBSOLETE regs.pr_eip = *(int *) &deprecated_registers[REGISTER_BYTE (16)];
-// OBSOLETE regs.pr_flags = *(int *) &deprecated_registers[REGISTER_BYTE (17)];
-// OBSOLETE for (i = 0; i < 31; i++)
-// OBSOLETE {
-// OBSOLETE regs.pr_fpa.fpa_regs[i] =
-// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (FP1_REGNUM + i)];
-// OBSOLETE }
-// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[0], &deprecated_registers[REGISTER_BYTE (ST0_REGNUM)], 10);
-// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[1], &deprecated_registers[REGISTER_BYTE (ST1_REGNUM)], 10);
-// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[2], &deprecated_registers[REGISTER_BYTE (ST2_REGNUM)], 10);
-// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[3], &deprecated_registers[REGISTER_BYTE (ST3_REGNUM)], 10);
-// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[4], &deprecated_registers[REGISTER_BYTE (ST4_REGNUM)], 10);
-// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[5], &deprecated_registers[REGISTER_BYTE (ST5_REGNUM)], 10);
-// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[6], &deprecated_registers[REGISTER_BYTE (ST6_REGNUM)], 10);
-// OBSOLETE memcpy (regs.pr_fpu.fpu_stack[7], &deprecated_registers[REGISTER_BYTE (ST7_REGNUM)], 10);
-// OBSOLETE mptrace (XPT_WREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE fetch_inferior_registers (int regno)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE struct pt_regset regs;
-// OBSOLETE
-// OBSOLETE deprecated_registers_fetched ();
-// OBSOLETE
-// OBSOLETE mptrace (XPT_RREGS, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regs, 0);
-// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (EAX_REGNUM)] = regs.pr_eax;
-// OBSOLETE *(int *) &rdeprecated_egisters[REGISTER_BYTE (EBX_REGNUM)] = regs.pr_ebx;
-// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (ECX_REGNUM)] = regs.pr_ecx;
-// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (EDX_REGNUM)] = regs.pr_edx;
-// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (ESI_REGNUM)] = regs.pr_esi;
-// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (EDI_REGNUM)] = regs.pr_edi;
-// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (EBP_REGNUM)] = regs.pr_ebp;
-// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (ESP_REGNUM)] = regs.pr_esp;
-// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (EIP_REGNUM)] = regs.pr_eip;
-// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (EFLAGS_REGNUM)] = regs.pr_flags;
-// OBSOLETE for (i = 0; i < FPA_NREGS; i++)
-// OBSOLETE {
-// OBSOLETE *(int *) &deprecated_registers[REGISTER_BYTE (FP1_REGNUM + i)] =
-// OBSOLETE regs.pr_fpa.fpa_regs[i];
-// OBSOLETE }
-// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST0_REGNUM)], regs.pr_fpu.fpu_stack[0], 10);
-// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST1_REGNUM)], regs.pr_fpu.fpu_stack[1], 10);
-// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST2_REGNUM)], regs.pr_fpu.fpu_stack[2], 10);
-// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST3_REGNUM)], regs.pr_fpu.fpu_stack[3], 10);
-// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST4_REGNUM)], regs.pr_fpu.fpu_stack[4], 10);
-// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST5_REGNUM)], regs.pr_fpu.fpu_stack[5], 10);
-// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST6_REGNUM)], regs.pr_fpu.fpu_stack[6], 10);
-// OBSOLETE memcpy (&deprecated_registers[REGISTER_BYTE (ST7_REGNUM)], regs.pr_fpu.fpu_stack[7], 10);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* FIXME: This should be merged with i387-tdep.c as well. */
-// OBSOLETE static
-// OBSOLETE print_fpu_status (struct pt_regset ep)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE int bothstatus;
-// OBSOLETE int top;
-// OBSOLETE int fpreg;
-// OBSOLETE unsigned char *p;
-// OBSOLETE
-// OBSOLETE printf_unfiltered ("80387:");
-// OBSOLETE if (ep.pr_fpu.fpu_ip == 0)
-// OBSOLETE {
-// OBSOLETE printf_unfiltered (" not in use.\n");
-// OBSOLETE return;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("\n");
-// OBSOLETE }
-// OBSOLETE if (ep.pr_fpu.fpu_status != 0)
-// OBSOLETE {
-// OBSOLETE print_387_status_word (ep.pr_fpu.fpu_status);
-// OBSOLETE }
-// OBSOLETE print_387_control_word (ep.pr_fpu.fpu_control);
-// OBSOLETE printf_unfiltered ("last exception: ");
-// OBSOLETE printf_unfiltered ("opcode 0x%x; ", ep.pr_fpu.fpu_rsvd4);
-// OBSOLETE printf_unfiltered ("pc 0x%x:0x%x; ", ep.pr_fpu.fpu_cs, ep.pr_fpu.fpu_ip);
-// OBSOLETE printf_unfiltered ("operand 0x%x:0x%x\n", ep.pr_fpu.fpu_data_offset, ep.pr_fpu.fpu_op_sel);
-// OBSOLETE
-// OBSOLETE top = (ep.pr_fpu.fpu_status >> 11) & 7;
-// OBSOLETE
-// OBSOLETE printf_unfiltered ("regno tag msb lsb value\n");
-// OBSOLETE for (fpreg = 7; fpreg >= 0; fpreg--)
-// OBSOLETE {
-// OBSOLETE double val;
-// OBSOLETE
-// OBSOLETE printf_unfiltered ("%s %d: ", fpreg == top ? "=>" : " ", fpreg);
-// OBSOLETE
-// OBSOLETE switch ((ep.pr_fpu.fpu_tag >> (fpreg * 2)) & 3)
-// OBSOLETE {
-// OBSOLETE case 0:
-// OBSOLETE printf_unfiltered ("valid ");
-// OBSOLETE break;
-// OBSOLETE case 1:
-// OBSOLETE printf_unfiltered ("zero ");
-// OBSOLETE break;
-// OBSOLETE case 2:
-// OBSOLETE printf_unfiltered ("trap ");
-// OBSOLETE break;
-// OBSOLETE case 3:
-// OBSOLETE printf_unfiltered ("empty ");
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE for (i = 9; i >= 0; i--)
-// OBSOLETE printf_unfiltered ("%02x", ep.pr_fpu.fpu_stack[fpreg][i]);
-// OBSOLETE
-// OBSOLETE i387_to_double ((char *) ep.pr_fpu.fpu_stack[fpreg], (char *) &val);
-// OBSOLETE printf_unfiltered (" %g\n", val);
-// OBSOLETE }
-// OBSOLETE if (ep.pr_fpu.fpu_rsvd1)
-// OBSOLETE warning ("rsvd1 is 0x%x\n", ep.pr_fpu.fpu_rsvd1);
-// OBSOLETE if (ep.pr_fpu.fpu_rsvd2)
-// OBSOLETE warning ("rsvd2 is 0x%x\n", ep.pr_fpu.fpu_rsvd2);
-// OBSOLETE if (ep.pr_fpu.fpu_rsvd3)
-// OBSOLETE warning ("rsvd3 is 0x%x\n", ep.pr_fpu.fpu_rsvd3);
-// OBSOLETE if (ep.pr_fpu.fpu_rsvd5)
-// OBSOLETE warning ("rsvd5 is 0x%x\n", ep.pr_fpu.fpu_rsvd5);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE print_1167_control_word (unsigned int pcr)
-// OBSOLETE {
-// OBSOLETE int pcr_tmp;
-// OBSOLETE
-// OBSOLETE pcr_tmp = pcr & FPA_PCR_MODE;
-// OBSOLETE printf_unfiltered ("\tMODE= %#x; RND= %#x ", pcr_tmp, pcr_tmp & 12);
-// OBSOLETE switch (pcr_tmp & 12)
-// OBSOLETE {
-// OBSOLETE case 0:
-// OBSOLETE printf_unfiltered ("RN (Nearest Value)");
-// OBSOLETE break;
-// OBSOLETE case 1:
-// OBSOLETE printf_unfiltered ("RZ (Zero)");
-// OBSOLETE break;
-// OBSOLETE case 2:
-// OBSOLETE printf_unfiltered ("RP (Positive Infinity)");
-// OBSOLETE break;
-// OBSOLETE case 3:
-// OBSOLETE printf_unfiltered ("RM (Negative Infinity)");
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE printf_unfiltered ("; IRND= %d ", pcr_tmp & 2);
-// OBSOLETE if (0 == pcr_tmp & 2)
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("(same as RND)\n");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("(toward zero)\n");
-// OBSOLETE }
-// OBSOLETE pcr_tmp = pcr & FPA_PCR_EM;
-// OBSOLETE printf_unfiltered ("\tEM= %#x", pcr_tmp);
-// OBSOLETE if (pcr_tmp & FPA_PCR_EM_DM)
-// OBSOLETE printf_unfiltered (" DM");
-// OBSOLETE if (pcr_tmp & FPA_PCR_EM_UOM)
-// OBSOLETE printf_unfiltered (" UOM");
-// OBSOLETE if (pcr_tmp & FPA_PCR_EM_PM)
-// OBSOLETE printf_unfiltered (" PM");
-// OBSOLETE if (pcr_tmp & FPA_PCR_EM_UM)
-// OBSOLETE printf_unfiltered (" UM");
-// OBSOLETE if (pcr_tmp & FPA_PCR_EM_OM)
-// OBSOLETE printf_unfiltered (" OM");
-// OBSOLETE if (pcr_tmp & FPA_PCR_EM_ZM)
-// OBSOLETE printf_unfiltered (" ZM");
-// OBSOLETE if (pcr_tmp & FPA_PCR_EM_IM)
-// OBSOLETE printf_unfiltered (" IM");
-// OBSOLETE printf_unfiltered ("\n");
-// OBSOLETE pcr_tmp = FPA_PCR_CC;
-// OBSOLETE printf_unfiltered ("\tCC= %#x", pcr_tmp);
-// OBSOLETE if (pcr_tmp & FPA_PCR_20MHZ)
-// OBSOLETE printf_unfiltered (" 20MHZ");
-// OBSOLETE if (pcr_tmp & FPA_PCR_CC_Z)
-// OBSOLETE printf_unfiltered (" Z");
-// OBSOLETE if (pcr_tmp & FPA_PCR_CC_C2)
-// OBSOLETE printf_unfiltered (" C2");
-// OBSOLETE
-// OBSOLETE /* Dynix defines FPA_PCR_CC_C0 to 0x100 and ptx defines
-// OBSOLETE FPA_PCR_CC_C1 to 0x100. Use whichever is defined and assume
-// OBSOLETE the OS knows what it is doing. */
-// OBSOLETE #ifdef FPA_PCR_CC_C1
-// OBSOLETE if (pcr_tmp & FPA_PCR_CC_C1)
-// OBSOLETE printf_unfiltered (" C1");
-// OBSOLETE #else
-// OBSOLETE if (pcr_tmp & FPA_PCR_CC_C0)
-// OBSOLETE printf_unfiltered (" C0");
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE switch (pcr_tmp)
-// OBSOLETE {
-// OBSOLETE case FPA_PCR_CC_Z:
-// OBSOLETE printf_unfiltered (" (Equal)");
-// OBSOLETE break;
-// OBSOLETE #ifdef FPA_PCR_CC_C1
-// OBSOLETE case FPA_PCR_CC_C1:
-// OBSOLETE #else
-// OBSOLETE case FPA_PCR_CC_C0:
-// OBSOLETE #endif
-// OBSOLETE printf_unfiltered (" (Less than)");
-// OBSOLETE break;
-// OBSOLETE case 0:
-// OBSOLETE printf_unfiltered (" (Greater than)");
-// OBSOLETE break;
-// OBSOLETE case FPA_PCR_CC_Z |
-// OBSOLETE #ifdef FPA_PCR_CC_C1
-// OBSOLETE FPA_PCR_CC_C1
-// OBSOLETE #else
-// OBSOLETE FPA_PCR_CC_C0
-// OBSOLETE #endif
-// OBSOLETE | FPA_PCR_CC_C2:
-// OBSOLETE printf_unfiltered (" (Unordered)");
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE printf_unfiltered (" (Undefined)");
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE printf_unfiltered ("\n");
-// OBSOLETE pcr_tmp = pcr & FPA_PCR_AE;
-// OBSOLETE printf_unfiltered ("\tAE= %#x", pcr_tmp);
-// OBSOLETE if (pcr_tmp & FPA_PCR_AE_DE)
-// OBSOLETE printf_unfiltered (" DE");
-// OBSOLETE if (pcr_tmp & FPA_PCR_AE_UOE)
-// OBSOLETE printf_unfiltered (" UOE");
-// OBSOLETE if (pcr_tmp & FPA_PCR_AE_PE)
-// OBSOLETE printf_unfiltered (" PE");
-// OBSOLETE if (pcr_tmp & FPA_PCR_AE_UE)
-// OBSOLETE printf_unfiltered (" UE");
-// OBSOLETE if (pcr_tmp & FPA_PCR_AE_OE)
-// OBSOLETE printf_unfiltered (" OE");
-// OBSOLETE if (pcr_tmp & FPA_PCR_AE_ZE)
-// OBSOLETE printf_unfiltered (" ZE");
-// OBSOLETE if (pcr_tmp & FPA_PCR_AE_EE)
-// OBSOLETE printf_unfiltered (" EE");
-// OBSOLETE if (pcr_tmp & FPA_PCR_AE_IE)
-// OBSOLETE printf_unfiltered (" IE");
-// OBSOLETE printf_unfiltered ("\n");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE print_1167_regs (long regs[FPA_NREGS])
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE union
-// OBSOLETE {
-// OBSOLETE double d;
-// OBSOLETE long l[2];
-// OBSOLETE }
-// OBSOLETE xd;
-// OBSOLETE union
-// OBSOLETE {
-// OBSOLETE float f;
-// OBSOLETE long l;
-// OBSOLETE }
-// OBSOLETE xf;
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE for (i = 0; i < FPA_NREGS; i++)
-// OBSOLETE {
-// OBSOLETE xf.l = regs[i];
-// OBSOLETE printf_unfiltered ("%%fp%d: raw= %#x, single= %f", i + 1, regs[i], xf.f);
-// OBSOLETE if (!(i & 1))
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("\n");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE xd.l[1] = regs[i];
-// OBSOLETE xd.l[0] = regs[i + 1];
-// OBSOLETE printf_unfiltered (", double= %f\n", xd.d);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE print_fpa_status (struct pt_regset ep)
-// OBSOLETE {
-// OBSOLETE
-// OBSOLETE printf_unfiltered ("WTL 1167:");
-// OBSOLETE if (ep.pr_fpa.fpa_pcr != 0)
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("\n");
-// OBSOLETE print_1167_control_word (ep.pr_fpa.fpa_pcr);
-// OBSOLETE print_1167_regs (ep.pr_fpa.fpa_regs);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE printf_unfiltered (" not in use.\n");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #if 0 /* disabled because it doesn't go through the target vector. */
-// OBSOLETE i386_float_info (void)
-// OBSOLETE {
-// OBSOLETE char ubuf[UPAGES * NBPG];
-// OBSOLETE struct pt_regset regset;
-// OBSOLETE
-// OBSOLETE if (have_inferior_p ())
-// OBSOLETE {
-// OBSOLETE PTRACE_READ_REGS (PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) & regset);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE int corechan = bfd_cache_lookup (core_bfd);
-// OBSOLETE if (lseek (corechan, 0, 0) < 0)
-// OBSOLETE {
-// OBSOLETE perror ("seek on core file");
-// OBSOLETE }
-// OBSOLETE if (myread (corechan, ubuf, UPAGES * NBPG) < 0)
-// OBSOLETE {
-// OBSOLETE perror ("read on core file");
-// OBSOLETE }
-// OBSOLETE /* only interested in the floating point registers */
-// OBSOLETE regset.pr_fpu = ((struct user *) ubuf)->u_fpusave;
-// OBSOLETE regset.pr_fpa = ((struct user *) ubuf)->u_fpasave;
-// OBSOLETE }
-// OBSOLETE print_fpu_status (regset);
-// OBSOLETE print_fpa_status (regset);
-// OBSOLETE }
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE static volatile int got_sigchld;
-// OBSOLETE
-// OBSOLETE /*ARGSUSED */
-// OBSOLETE /* This will eventually be more interesting. */
-// OBSOLETE void
-// OBSOLETE sigchld_handler (int signo)
-// OBSOLETE {
-// OBSOLETE got_sigchld++;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Signals for which the default action does not cause the process
-// OBSOLETE * to die. See <sys/signal.h> for where this came from (alas, we
-// OBSOLETE * can't use those macros directly)
-// OBSOLETE */
-// OBSOLETE #ifndef sigmask
-// OBSOLETE #define sigmask(s) (1 << ((s) - 1))
-// OBSOLETE #endif
-// OBSOLETE #define SIGNALS_DFL_SAFE sigmask(SIGSTOP) | sigmask(SIGTSTP) | \
-// OBSOLETE sigmask(SIGTTIN) | sigmask(SIGTTOU) | sigmask(SIGCHLD) | \
-// OBSOLETE sigmask(SIGCONT) | sigmask(SIGWINCH) | sigmask(SIGPWR) | \
-// OBSOLETE sigmask(SIGURG) | sigmask(SIGPOLL)
-// OBSOLETE
-// OBSOLETE #ifdef ATTACH_DETACH
-// OBSOLETE /*
-// OBSOLETE * Thanks to XPT_MPDEBUGGER, we have to mange child_wait().
-// OBSOLETE */
-// OBSOLETE ptid_t
-// OBSOLETE child_wait (ptid_t ptid, struct target_waitstatus *status)
-// OBSOLETE {
-// OBSOLETE int save_errno, rv, xvaloff, saoff, sa_hand;
-// OBSOLETE struct pt_stop pt;
-// OBSOLETE struct user u;
-// OBSOLETE sigset_t set;
-// OBSOLETE /* Host signal number for a signal which the inferior terminates with, or
-// OBSOLETE 0 if it hasn't terminated due to a signal. */
-// OBSOLETE static int death_by_signal = 0;
-// OBSOLETE #ifdef SVR4_SHARED_LIBS /* use this to distinguish ptx 2 vs ptx 4 */
-// OBSOLETE prstatus_t pstatus;
-// OBSOLETE #endif
-// OBSOLETE int pid = PIDGET (ptid);
-// OBSOLETE
-// OBSOLETE do
-// OBSOLETE {
-// OBSOLETE set_sigint_trap (); /* Causes SIGINT to be passed on to the
-// OBSOLETE attached process. */
-// OBSOLETE save_errno = errno;
-// OBSOLETE
-// OBSOLETE got_sigchld = 0;
-// OBSOLETE
-// OBSOLETE sigemptyset (&set);
-// OBSOLETE
-// OBSOLETE while (got_sigchld == 0)
-// OBSOLETE {
-// OBSOLETE sigsuspend (&set);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE clear_sigint_trap ();
-// OBSOLETE
-// OBSOLETE rv = mptrace (XPT_STOPSTAT, 0, (char *) &pt, 0);
-// OBSOLETE if (-1 == rv)
-// OBSOLETE {
-// OBSOLETE printf ("XPT_STOPSTAT: errno %d\n", errno); /* DEBUG */
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE pid = pt.ps_pid;
-// OBSOLETE
-// OBSOLETE if (pid != PIDGET (inferior_ptid))
-// OBSOLETE {
-// OBSOLETE /* NOTE: the mystery fork in csh/tcsh needs to be ignored.
-// OBSOLETE * We should not return new children for the initial run
-// OBSOLETE * of a process until it has done the exec.
-// OBSOLETE */
-// OBSOLETE /* inferior probably forked; send it on its way */
-// OBSOLETE rv = mptrace (XPT_UNDEBUG, pid, 0, 0);
-// OBSOLETE if (-1 == rv)
-// OBSOLETE {
-// OBSOLETE printf ("child_wait: XPT_UNDEBUG: pid %d: %s\n", pid,
-// OBSOLETE safe_strerror (errno));
-// OBSOLETE }
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE /* FIXME: Do we deal with fork notification correctly? */
-// OBSOLETE switch (pt.ps_reason)
-// OBSOLETE {
-// OBSOLETE case PTS_FORK:
-// OBSOLETE /* multi proc: treat like PTS_EXEC */
-// OBSOLETE /*
-// OBSOLETE * Pretend this didn't happen, since gdb isn't set up
-// OBSOLETE * to deal with stops on fork.
-// OBSOLETE */
-// OBSOLETE rv = ptrace (PT_CONTSIG, pid, 1, 0);
-// OBSOLETE if (-1 == rv)
-// OBSOLETE {
-// OBSOLETE printf ("PTS_FORK: PT_CONTSIG: error %d\n", errno);
-// OBSOLETE }
-// OBSOLETE continue;
-// OBSOLETE case PTS_EXEC:
-// OBSOLETE /*
-// OBSOLETE * Pretend this is a SIGTRAP.
-// OBSOLETE */
-// OBSOLETE status->kind = TARGET_WAITKIND_STOPPED;
-// OBSOLETE status->value.sig = TARGET_SIGNAL_TRAP;
-// OBSOLETE break;
-// OBSOLETE case PTS_EXIT:
-// OBSOLETE /*
-// OBSOLETE * Note: we stop before the exit actually occurs. Extract
-// OBSOLETE * the exit code from the uarea. If we're stopped in the
-// OBSOLETE * exit() system call, the exit code will be in
-// OBSOLETE * u.u_ap[0]. An exit due to an uncaught signal will have
-// OBSOLETE * something else in here, see the comment in the default:
-// OBSOLETE * case, below. Finally,let the process exit.
-// OBSOLETE */
-// OBSOLETE if (death_by_signal)
-// OBSOLETE {
-// OBSOLETE status->kind = TARGET_WAITKIND_SIGNALED;
-// OBSOLETE status->value.sig = target_signal_from_host (death_by_signal);
-// OBSOLETE death_by_signal = 0;
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE xvaloff = (unsigned long) &u.u_ap[0] - (unsigned long) &u;
-// OBSOLETE errno = 0;
-// OBSOLETE rv = ptrace (PT_RUSER, pid, (char *) xvaloff, 0);
-// OBSOLETE status->kind = TARGET_WAITKIND_EXITED;
-// OBSOLETE status->value.integer = rv;
-// OBSOLETE /*
-// OBSOLETE * addr & data to mptrace() don't matter here, since
-// OBSOLETE * the process is already dead.
-// OBSOLETE */
-// OBSOLETE rv = mptrace (XPT_UNDEBUG, pid, 0, 0);
-// OBSOLETE if (-1 == rv)
-// OBSOLETE {
-// OBSOLETE printf ("child_wait: PTS_EXIT: XPT_UNDEBUG: pid %d error %d\n", pid,
-// OBSOLETE errno);
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE case PTS_WATCHPT_HIT:
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "PTS_WATCHPT_HIT\n");
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE /* stopped by signal */
-// OBSOLETE status->kind = TARGET_WAITKIND_STOPPED;
-// OBSOLETE status->value.sig = target_signal_from_host (pt.ps_reason);
-// OBSOLETE death_by_signal = 0;
-// OBSOLETE
-// OBSOLETE if (0 == (SIGNALS_DFL_SAFE & sigmask (pt.ps_reason)))
-// OBSOLETE {
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE /* else default action of signal is to die */
-// OBSOLETE #ifdef SVR4_SHARED_LIBS
-// OBSOLETE rv = ptrace (PT_GET_PRSTATUS, pid, (char *) &pstatus, 0);
-// OBSOLETE if (-1 == rv)
-// OBSOLETE error ("child_wait: signal %d PT_GET_PRSTATUS: %s\n",
-// OBSOLETE pt.ps_reason, safe_strerror (errno));
-// OBSOLETE if (pstatus.pr_cursig != pt.ps_reason)
-// OBSOLETE {
-// OBSOLETE printf ("pstatus signal %d, pt signal %d\n",
-// OBSOLETE pstatus.pr_cursig, pt.ps_reason);
-// OBSOLETE }
-// OBSOLETE sa_hand = (int) pstatus.pr_action.sa_handler;
-// OBSOLETE #else
-// OBSOLETE saoff = (unsigned long) &u.u_sa[0] - (unsigned long) &u;
-// OBSOLETE saoff += sizeof (struct sigaction) * (pt.ps_reason - 1);
-// OBSOLETE errno = 0;
-// OBSOLETE sa_hand = ptrace (PT_RUSER, pid, (char *) saoff, 0);
-// OBSOLETE if (errno)
-// OBSOLETE error ("child_wait: signal %d: RUSER: %s\n",
-// OBSOLETE pt.ps_reason, safe_strerror (errno));
-// OBSOLETE #endif
-// OBSOLETE if ((int) SIG_DFL == sa_hand)
-// OBSOLETE {
-// OBSOLETE /* we will be dying */
-// OBSOLETE death_by_signal = pt.ps_reason;
-// OBSOLETE }
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE while (pid != PIDGET (inferior_ptid)); /* Some other child died or stopped */
-// OBSOLETE
-// OBSOLETE return pid_to_ptid (pid);
-// OBSOLETE }
-// OBSOLETE #else /* !ATTACH_DETACH */
-// OBSOLETE /*
-// OBSOLETE * Simple child_wait() based on inftarg.c child_wait() for use until
-// OBSOLETE * the MPDEBUGGER child_wait() works properly. This will go away when
-// OBSOLETE * that is fixed.
-// OBSOLETE */
-// OBSOLETE ptid_t
-// OBSOLETE child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
-// OBSOLETE {
-// OBSOLETE int save_errno;
-// OBSOLETE int status;
-// OBSOLETE int pid = PIDGET (ptid);
-// OBSOLETE
-// OBSOLETE do
-// OBSOLETE {
-// OBSOLETE pid = wait (&status);
-// OBSOLETE save_errno = errno;
-// OBSOLETE
-// OBSOLETE if (pid == -1)
-// OBSOLETE {
-// OBSOLETE if (save_errno == EINTR)
-// OBSOLETE continue;
-// OBSOLETE fprintf (stderr, "Child process unexpectedly missing: %s.\n",
-// OBSOLETE safe_strerror (save_errno));
-// OBSOLETE ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
-// OBSOLETE ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
-// OBSOLETE return pid_to_ptid (-1);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE while (pid != PIDGET (inferior_ptid)); /* Some other child died or stopped */
-// OBSOLETE store_waitstatus (ourstatus, status);
-// OBSOLETE return pid_to_ptid (pid);
-// OBSOLETE }
-// OBSOLETE #endif /* ATTACH_DETACH */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* This function simply calls ptrace with the given arguments.
-// OBSOLETE It exists so that all calls to ptrace are isolated in this
-// OBSOLETE machine-dependent file. */
-// OBSOLETE int
-// OBSOLETE call_ptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data)
-// OBSOLETE {
-// OBSOLETE return ptrace (request, pid, addr, data);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE call_mptrace (int request, int pid, PTRACE_ARG3_TYPE addr, int data)
-// OBSOLETE {
-// OBSOLETE return mptrace (request, pid, addr, data);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #if defined (DEBUG_PTRACE)
-// OBSOLETE /* For the rest of the file, use an extra level of indirection */
-// OBSOLETE /* This lets us breakpoint usefully on call_ptrace. */
-// OBSOLETE #define ptrace call_ptrace
-// OBSOLETE #define mptrace call_mptrace
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE kill_inferior (void)
-// OBSOLETE {
-// OBSOLETE if (ptid_equal (inferior_ptid, null_ptid))
-// OBSOLETE return;
-// OBSOLETE
-// OBSOLETE /* For MPDEBUGGER, don't use PT_KILL, since the child will stop
-// OBSOLETE again with a PTS_EXIT. Just hit him with SIGKILL (so he stops)
-// OBSOLETE and detach. */
-// OBSOLETE
-// OBSOLETE kill (PIDGET (inferior_ptid), SIGKILL);
-// OBSOLETE #ifdef ATTACH_DETACH
-// OBSOLETE detach (SIGKILL);
-// OBSOLETE #else /* ATTACH_DETACH */
-// OBSOLETE ptrace (PT_KILL, PIDGET (inferior_ptid), 0, 0);
-// OBSOLETE wait ((int *) NULL);
-// OBSOLETE #endif /* ATTACH_DETACH */
-// OBSOLETE target_mourn_inferior ();
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Resume execution of the inferior process.
-// OBSOLETE If STEP is nonzero, single-step it.
-// OBSOLETE If SIGNAL is nonzero, give it that signal. */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE child_resume (ptid_t ptid, int step, enum target_signal signal)
-// OBSOLETE {
-// OBSOLETE int pid = PIDGET (ptid);
-// OBSOLETE
-// OBSOLETE errno = 0;
-// OBSOLETE
-// OBSOLETE if (pid == -1)
-// OBSOLETE pid = PIDGET (inferior_ptid);
-// OBSOLETE
-// OBSOLETE /* An address of (PTRACE_ARG3_TYPE)1 tells ptrace to continue from where
-// OBSOLETE it was. (If GDB wanted it to start some other way, we have already
-// OBSOLETE written a new PC value to the child.)
-// OBSOLETE
-// OBSOLETE If this system does not support PT_SSTEP, a higher level function will
-// OBSOLETE have called single_step() to transmute the step request into a
-// OBSOLETE continue request (by setting breakpoints on all possible successor
-// OBSOLETE instructions), so we don't have to worry about that here. */
-// OBSOLETE
-// OBSOLETE if (step)
-// OBSOLETE ptrace (PT_SSTEP, pid, (PTRACE_ARG3_TYPE) 1, signal);
-// OBSOLETE else
-// OBSOLETE ptrace (PT_CONTSIG, pid, (PTRACE_ARG3_TYPE) 1, signal);
-// OBSOLETE
-// OBSOLETE if (errno)
-// OBSOLETE perror_with_name ("ptrace");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #ifdef ATTACH_DETACH
-// OBSOLETE /* Start debugging the process whose number is PID. */
-// OBSOLETE int
-// OBSOLETE attach (int pid)
-// OBSOLETE {
-// OBSOLETE sigset_t set;
-// OBSOLETE int rv;
-// OBSOLETE
-// OBSOLETE rv = mptrace (XPT_DEBUG, pid, 0, 0);
-// OBSOLETE if (-1 == rv)
-// OBSOLETE {
-// OBSOLETE error ("mptrace(XPT_DEBUG): %s", safe_strerror (errno));
-// OBSOLETE }
-// OBSOLETE rv = mptrace (XPT_SIGNAL, pid, 0, SIGSTOP);
-// OBSOLETE if (-1 == rv)
-// OBSOLETE {
-// OBSOLETE error ("mptrace(XPT_SIGNAL): %s", safe_strerror (errno));
-// OBSOLETE }
-// OBSOLETE attach_flag = 1;
-// OBSOLETE return pid;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE detach (int signo)
-// OBSOLETE {
-// OBSOLETE int rv;
-// OBSOLETE
-// OBSOLETE rv = mptrace (XPT_UNDEBUG, PIDGET (inferior_ptid), 1, signo);
-// OBSOLETE if (-1 == rv)
-// OBSOLETE {
-// OBSOLETE error ("mptrace(XPT_UNDEBUG): %s", safe_strerror (errno));
-// OBSOLETE }
-// OBSOLETE attach_flag = 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #endif /* ATTACH_DETACH */
-// OBSOLETE
-// OBSOLETE /* Default the type of the ptrace transfer to int. */
-// OBSOLETE #ifndef PTRACE_XFER_TYPE
-// OBSOLETE #define PTRACE_XFER_TYPE int
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE /* NOTE! I tried using PTRACE_READDATA, etc., to read and write memory
-// OBSOLETE in the NEW_SUN_PTRACE case.
-// OBSOLETE It ought to be straightforward. But it appears that writing did
-// OBSOLETE not write the data that I specified. I cannot understand where
-// OBSOLETE it got the data that it actually did write. */
-// OBSOLETE
-// OBSOLETE /* Copy LEN bytes to or from inferior's memory starting at MEMADDR
-// OBSOLETE to debugger memory starting at MYADDR. Copy to inferior if
-// OBSOLETE WRITE is nonzero. TARGET is ignored.
-// OBSOLETE
-// OBSOLETE Returns the length copied, which is either the LEN argument or zero.
-// OBSOLETE This xfer function does not do partial moves, since child_ops
-// OBSOLETE doesn't allow memory operations to cross below us in the target stack
-// OBSOLETE anyway. */
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
-// OBSOLETE struct mem_attrib *attrib,
-// OBSOLETE struct target_ops *target)
-// OBSOLETE {
-// OBSOLETE register int i;
-// OBSOLETE /* Round starting address down to longword boundary. */
-// OBSOLETE register CORE_ADDR addr = memaddr & -(CORE_ADDR) sizeof (PTRACE_XFER_TYPE);
-// OBSOLETE /* Round ending address up; get number of longwords that makes. */
-// OBSOLETE register int count
-// OBSOLETE = (((memaddr + len) - addr) + sizeof (PTRACE_XFER_TYPE) - 1)
-// OBSOLETE / sizeof (PTRACE_XFER_TYPE);
-// OBSOLETE /* Allocate buffer of that many longwords. */
-// OBSOLETE /* FIXME (alloca): This code, cloned from infptrace.c, is unsafe
-// OBSOLETE because it uses alloca to allocate a buffer of arbitrary size.
-// OBSOLETE For very large xfers, this could crash GDB's stack. */
-// OBSOLETE register PTRACE_XFER_TYPE *buffer
-// OBSOLETE = (PTRACE_XFER_TYPE *) alloca (count * sizeof (PTRACE_XFER_TYPE));
-// OBSOLETE
-// OBSOLETE if (write)
-// OBSOLETE {
-// OBSOLETE /* Fill start and end extra bytes of buffer with existing memory data. */
-// OBSOLETE
-// OBSOLETE if (addr != memaddr || len < (int) sizeof (PTRACE_XFER_TYPE))
-// OBSOLETE {
-// OBSOLETE /* Need part of initial word -- fetch it. */
-// OBSOLETE buffer[0] = ptrace (PT_RTEXT, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr,
-// OBSOLETE 0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (count > 1) /* FIXME, avoid if even boundary */
-// OBSOLETE {
-// OBSOLETE buffer[count - 1]
-// OBSOLETE = ptrace (PT_RTEXT, PIDGET (inferior_ptid),
-// OBSOLETE ((PTRACE_ARG3_TYPE)
-// OBSOLETE (addr + (count - 1) * sizeof (PTRACE_XFER_TYPE))),
-// OBSOLETE 0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Copy data to be written over corresponding part of buffer */
-// OBSOLETE
-// OBSOLETE memcpy ((char *) buffer + (memaddr & (sizeof (PTRACE_XFER_TYPE) - 1)),
-// OBSOLETE myaddr,
-// OBSOLETE len);
-// OBSOLETE
-// OBSOLETE /* Write the entire buffer. */
-// OBSOLETE
-// OBSOLETE for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE))
-// OBSOLETE {
-// OBSOLETE errno = 0;
-// OBSOLETE ptrace (PT_WDATA, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr,
-// OBSOLETE buffer[i]);
-// OBSOLETE if (errno)
-// OBSOLETE {
-// OBSOLETE /* Using the appropriate one (I or D) is necessary for
-// OBSOLETE Gould NP1, at least. */
-// OBSOLETE errno = 0;
-// OBSOLETE ptrace (PT_WTEXT, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) addr,
-// OBSOLETE buffer[i]);
-// OBSOLETE }
-// OBSOLETE if (errno)
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* Read all the longwords */
-// OBSOLETE for (i = 0; i < count; i++, addr += sizeof (PTRACE_XFER_TYPE))
-// OBSOLETE {
-// OBSOLETE errno = 0;
-// OBSOLETE buffer[i] = ptrace (PT_RTEXT, PIDGET (inferior_ptid),
-// OBSOLETE (PTRACE_ARG3_TYPE) addr, 0);
-// OBSOLETE if (errno)
-// OBSOLETE return 0;
-// OBSOLETE QUIT;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Copy appropriate bytes out of the buffer. */
-// OBSOLETE memcpy (myaddr,
-// OBSOLETE (char *) buffer + (memaddr & (sizeof (PTRACE_XFER_TYPE) - 1)),
-// OBSOLETE len);
-// OBSOLETE }
-// OBSOLETE return len;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE _initialize_symm_nat (void)
-// OBSOLETE {
-// OBSOLETE #ifdef ATTACH_DETACH
-// OBSOLETE /*
-// OBSOLETE * the MPDEBUGGER is necessary for process tree debugging and attach
-// OBSOLETE * to work, but it alters the behavior of debugged processes, so other
-// OBSOLETE * things (at least child_wait()) will have to change to accomodate
-// OBSOLETE * that.
-// OBSOLETE *
-// OBSOLETE * Note that attach is not implemented in dynix 3, and not in ptx
-// OBSOLETE * until version 2.1 of the OS.
-// OBSOLETE */
-// OBSOLETE int rv;
-// OBSOLETE sigset_t set;
-// OBSOLETE struct sigaction sact;
-// OBSOLETE
-// OBSOLETE rv = mptrace (XPT_MPDEBUGGER, 0, 0, 0);
-// OBSOLETE if (-1 == rv)
-// OBSOLETE {
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "_initialize_symm_nat(): mptrace(XPT_MPDEBUGGER): %s",
-// OBSOLETE safe_strerror (errno));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Under MPDEBUGGER, we get SIGCLHD when a traced process does
-// OBSOLETE * anything of interest.
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE /*
-// OBSOLETE * Block SIGCHLD. We leave it blocked all the time, and then
-// OBSOLETE * call sigsuspend() in child_wait() to wait for the child
-// OBSOLETE * to do something. None of these ought to fail, but check anyway.
-// OBSOLETE */
-// OBSOLETE sigemptyset (&set);
-// OBSOLETE rv = sigaddset (&set, SIGCHLD);
-// OBSOLETE if (-1 == rv)
-// OBSOLETE {
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "_initialize_symm_nat(): sigaddset(SIGCHLD): %s",
-// OBSOLETE safe_strerror (errno));
-// OBSOLETE }
-// OBSOLETE rv = sigprocmask (SIG_BLOCK, &set, (sigset_t *) NULL);
-// OBSOLETE if (-1 == rv)
-// OBSOLETE {
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "_initialize_symm_nat(): sigprocmask(SIG_BLOCK): %s",
-// OBSOLETE safe_strerror (errno));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE sact.sa_handler = sigchld_handler;
-// OBSOLETE sigemptyset (&sact.sa_mask);
-// OBSOLETE sact.sa_flags = SA_NOCLDWAIT; /* keep the zombies away */
-// OBSOLETE rv = sigaction (SIGCHLD, &sact, (struct sigaction *) NULL);
-// OBSOLETE if (-1 == rv)
-// OBSOLETE {
-// OBSOLETE internal_error (__FILE__, __LINE__,
-// OBSOLETE "_initialize_symm_nat(): sigaction(SIGCHLD): %s",
-// OBSOLETE safe_strerror (errno));
-// OBSOLETE }
-// OBSOLETE #endif
-// OBSOLETE }
diff --git a/gdb/symm-tdep.c b/gdb/symm-tdep.c
deleted file mode 100644
index 21c8436..0000000
--- a/gdb/symm-tdep.c
+++ /dev/null
@@ -1,102 +0,0 @@
-// OBSOLETE /* Sequent Symmetry target interface, for GDB.
-// OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 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 /* many 387-specific items of use taken from i386-dep.c */
-// OBSOLETE
-// OBSOLETE #include "defs.h"
-// OBSOLETE #include "frame.h"
-// OBSOLETE #include "inferior.h"
-// OBSOLETE #include "symtab.h"
-// OBSOLETE
-// OBSOLETE #include <signal.h>
-// OBSOLETE #include <sys/param.h>
-// OBSOLETE #include <sys/user.h>
-// OBSOLETE #include <sys/dir.h>
-// OBSOLETE #include <sys/ioctl.h>
-// OBSOLETE #include "gdb_stat.h"
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include <fcntl.h>
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE symmetry_extract_return_value (struct type *type, char *regbuf, char *valbuf)
-// OBSOLETE {
-// OBSOLETE union
-// OBSOLETE {
-// OBSOLETE double d;
-// OBSOLETE int l[2];
-// OBSOLETE }
-// OBSOLETE xd;
-// OBSOLETE struct minimal_symbol *msymbol;
-// OBSOLETE float f;
-// OBSOLETE
-// OBSOLETE if (TYPE_CODE_FLT == TYPE_CODE (type))
-// OBSOLETE {
-// OBSOLETE msymbol = lookup_minimal_symbol ("1167_flt", NULL, NULL);
-// OBSOLETE if (msymbol != NULL)
-// OBSOLETE {
-// OBSOLETE /* found "1167_flt" means 1167, %fp2-%fp3 */
-// OBSOLETE /* float & double; 19= %fp2, 20= %fp3 */
-// OBSOLETE /* no single precision on 1167 */
-// OBSOLETE xd.l[1] = *((int *) &regbuf[REGISTER_BYTE (19)]);
-// OBSOLETE xd.l[0] = *((int *) &regbuf[REGISTER_BYTE (20)]);
-// OBSOLETE switch (TYPE_LENGTH (type))
-// OBSOLETE {
-// OBSOLETE case 4:
-// OBSOLETE /* FIXME: broken for cross-debugging. */
-// OBSOLETE f = (float) xd.d;
-// OBSOLETE memcpy (valbuf, &f, TYPE_LENGTH (type));
-// OBSOLETE break;
-// OBSOLETE case 8:
-// OBSOLETE /* FIXME: broken for cross-debugging. */
-// OBSOLETE memcpy (valbuf, &xd.d, TYPE_LENGTH (type));
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE error ("Unknown floating point size");
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* 387 %st(0), gcc uses this */
-// OBSOLETE i387_to_double (((int *) &regbuf[REGISTER_BYTE (3)]),
-// OBSOLETE &xd.d);
-// OBSOLETE switch (TYPE_LENGTH (type))
-// OBSOLETE {
-// OBSOLETE case 4: /* float */
-// OBSOLETE f = (float) xd.d;
-// OBSOLETE /* FIXME: broken for cross-debugging. */
-// OBSOLETE memcpy (valbuf, &f, 4);
-// OBSOLETE break;
-// OBSOLETE case 8: /* double */
-// OBSOLETE /* FIXME: broken for cross-debugging. */
-// OBSOLETE memcpy (valbuf, &xd.d, 8);
-// OBSOLETE break;
-// OBSOLETE default:
-// OBSOLETE error ("Unknown floating point size");
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE memcpy (valbuf, regbuf, TYPE_LENGTH (type));
-// OBSOLETE }
-// OBSOLETE }
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 794947f..f326853 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -579,7 +579,7 @@ Arguments missing: an output file name and an optional symbol file name");
immediate_quit++;
ALL_SYMTABS (objfile, s)
- if (symname == NULL || (STREQ (symname, s->filename)))
+ if (symname == NULL || strcmp (symname, s->filename) == 0)
dump_symtab (objfile, s, outfile);
immediate_quit--;
do_cleanups (cleanups);
@@ -818,7 +818,7 @@ maintenance_print_psymbols (char *args, int from_tty)
immediate_quit++;
ALL_PSYMTABS (objfile, ps)
- if (symname == NULL || (STREQ (symname, ps->filename)))
+ if (symname == NULL || strcmp (symname, ps->filename) == 0)
dump_psymtab (objfile, ps, outfile);
immediate_quit--;
do_cleanups (cleanups);
@@ -965,7 +965,7 @@ maintenance_print_msymbols (char *args, int from_tty)
immediate_quit++;
ALL_OBJFILES (objfile)
- if (symname == NULL || (STREQ (symname, objfile->name)))
+ if (symname == NULL || strcmp (symname, objfile->name) == 0)
dump_msymbols (objfile, outfile);
immediate_quit--;
fprintf_filtered (outfile, "\n\n");
diff --git a/gdb/symtab.c b/gdb/symtab.c
index f739457..ed024d6 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -117,8 +117,6 @@ struct symbol *lookup_symbol_aux_minsyms (const char *name,
struct symtab **symtab);
#endif
-static struct symbol *find_active_alias (struct symbol *sym, CORE_ADDR addr);
-
/* 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;
@@ -348,7 +346,7 @@ gdb_mangle_name (struct type *type, int method_id, int signature_id)
is_full_physname_constructor = is_constructor_name (physname);
is_constructor =
- is_full_physname_constructor || (newname && STREQ (field_name, newname));
+ is_full_physname_constructor || (newname && strcmp (field_name, newname) == 0);
if (!is_destructor)
is_destructor = (strncmp (physname, "__dt", 4) == 0);
@@ -1743,29 +1741,6 @@ lookup_block_symbol (const struct block *block, const char *name,
&& (linkage_name != NULL
? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1))
{
- /* If SYM has aliases, then use any alias that is active
- at the current PC. If no alias is active at the current
- PC, then use the main symbol.
-
- ?!? Is checking the current pc correct? Is this routine
- ever called to look up a symbol from another context?
-
- FIXME: No, it's not correct. If someone sets a
- conditional breakpoint at an address, then the
- breakpoint's `struct expression' should refer to the
- `struct symbol' appropriate for the breakpoint's
- address, which may not be the PC.
-
- Even if it were never called from another context,
- it's totally bizarre for lookup_symbol's behavior to
- depend on the value of the inferior's current PC. We
- should pass in the appropriate PC as well as the
- block. The interface to lookup_symbol should change
- to require the caller to provide a PC. */
-
- if (SYMBOL_ALIASES (sym))
- sym = find_active_alias (sym, read_pc ());
-
sym_found = sym;
if (SYMBOL_CLASS (sym) != LOC_ARG &&
SYMBOL_CLASS (sym) != LOC_LOCAL_ARG &&
@@ -1783,38 +1758,6 @@ lookup_block_symbol (const struct block *block, const char *name,
}
}
-/* Given a main symbol SYM and ADDR, search through the alias
- list to determine if an alias is active at ADDR and return
- the active alias.
-
- If no alias is active, then return SYM. */
-
-static struct symbol *
-find_active_alias (struct symbol *sym, CORE_ADDR addr)
-{
- struct range_list *r;
- struct alias_list *aliases;
-
- /* If we have aliases, check them first. */
- aliases = SYMBOL_ALIASES (sym);
-
- while (aliases)
- {
- if (!SYMBOL_RANGES (aliases->sym))
- return aliases->sym;
- for (r = SYMBOL_RANGES (aliases->sym); r; r = r->next)
- {
- if (r->start <= addr && r->end > addr)
- return aliases->sym;
- }
- aliases = aliases->next;
- }
-
- /* Nothing found, return the main symbol. */
- return sym;
-}
-
-
/* Find the symtab associated with PC and SECTION. Look through the
psymtabs and read in another symtab if necessary. */
@@ -1947,7 +1890,7 @@ find_pc_symtab (CORE_ADDR pc)
/* If it's worth the effort, we could be using a binary search. */
struct symtab_and_line
-find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
+find_pc_sect_line (CORE_ADDR pc, struct bfd_section *section, int notcurrent)
{
struct symtab *s;
struct linetable *l;
@@ -2044,7 +1987,7 @@ find_pc_sect_line (CORE_ADDR pc, struct sec *section, int notcurrent)
if (MSYMBOL_TYPE (msymbol) == mst_solib_trampoline)
{
mfunsym = lookup_minimal_symbol_text (SYMBOL_LINKAGE_NAME (msymbol),
- NULL, NULL);
+ NULL);
if (mfunsym == NULL)
/* I eliminated this warning since it is coming out
* in the following situation:
@@ -2257,7 +2200,7 @@ find_line_symtab (struct symtab *symtab, int line, int *index, int *exact_match)
struct linetable *l;
int ind;
- if (!STREQ (symtab->filename, s->filename))
+ if (strcmp (symtab->filename, s->filename) != 0)
continue;
l = LINETABLE (s);
ind = find_line_common (l, line, &exact);
diff --git a/gdb/symtab.h b/gdb/symtab.h
index f288e94..40ce11e 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -586,22 +586,6 @@ struct location_funcs
struct axs_value * value);
};
-/* Linked list of symbol's live ranges. */
-
-struct range_list
-{
- CORE_ADDR start;
- CORE_ADDR end;
- struct range_list *next;
-};
-
-/* Linked list of aliases for a particular main/primary symbol. */
-struct alias_list
-{
- struct symbol *sym;
- struct alias_list *next;
-};
-
/* This structure is space critical. See space comments at the top. */
struct symbol
@@ -654,15 +638,6 @@ struct symbol
}
aux_value;
-
- /* Link to a list of aliases for this symbol.
- Only a "primary/main symbol may have aliases. */
- struct alias_list *aliases;
-
- /* List of ranges where this symbol is active. This is only
- used by alias symbols at the current time. */
- struct range_list *ranges;
-
struct symbol *hash_next;
};
@@ -673,8 +648,6 @@ struct symbol
#define SYMBOL_LINE(symbol) (symbol)->line
#define SYMBOL_BASEREG(symbol) (symbol)->aux_value.basereg
#define SYMBOL_OBJFILE(symbol) (symbol)->aux_value.objfile
-#define SYMBOL_ALIASES(symbol) (symbol)->aliases
-#define SYMBOL_RANGES(symbol) (symbol)->ranges
#define SYMBOL_LOCATION_BATON(symbol) (symbol)->aux_value.loc.baton
#define SYMBOL_LOCATION_FUNCS(symbol) (symbol)->aux_value.loc.funcs
@@ -1184,11 +1157,9 @@ extern struct
minimal_symbol *lookup_minimal_symbol_linkage_or_natural (const char *);
extern struct minimal_symbol *lookup_minimal_symbol_text (const char *,
- const char *,
struct objfile *);
struct minimal_symbol *lookup_minimal_symbol_solib_trampoline (const char *,
- const char *,
struct objfile
*);
diff --git a/gdb/target.c b/gdb/target.c
index e738208..7e088b9 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1,7 +1,8 @@
/* Select target systems and architectures at runtime for GDB.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002
- Free Software Foundation, Inc.
+
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
Contributed by Cygnus Support.
This file is part of GDB.
@@ -35,13 +36,11 @@
#include "dcache.h"
#include <signal.h>
#include "regcache.h"
-
-extern int errno;
+#include "gdb_assert.h"
+#include "gdbcore.h"
static void target_info (char *, int);
-static void cleanup_target (struct target_ops *);
-
static void maybe_kill_then_create_inferior (char *, char *, char **);
static void maybe_kill_then_attach (char *, int);
@@ -70,12 +69,16 @@ static void target_command (char *, int);
static struct target_ops *find_default_run_target (char *);
-static void update_current_target (void);
-
static void nosupport_runtime (void);
static void normal_target_post_startup_inferior (ptid_t ptid);
+static LONGEST default_xfer_partial (struct target_ops *ops,
+ enum target_object object,
+ const char *annex, void *readbuf,
+ const void *writebuf,
+ ULONGEST offset, LONGEST len);
+
/* Transfer LEN bytes between target address MEMADDR and GDB address
MYADDR. Returns 0 for success, errno code for failure (which
includes partial transfers -- if you want a more useful response to
@@ -162,8 +165,6 @@ static int debug_to_thread_alive (ptid_t);
static void debug_to_stop (void);
-static int debug_to_query (int /*char */ , char *, char *, int *);
-
/* Pointer to array of target architecture structures; the size of the
array; the current index into the array; the allocated size of the
array. */
@@ -180,7 +181,7 @@ static struct target_ops dummy_target;
/* Top of target stack. */
-struct target_stack_item *target_stack;
+static struct target_ops *target_stack;
/* The target structure we are currently using to talk to a process
or file or whatever "inferior" we have. */
@@ -206,7 +207,6 @@ DCACHE *target_dcache;
/* The user just typed 'target' without the name of a target. */
-/* ARGSUSED */
static void
target_command (char *arg, int from_tty)
{
@@ -219,6 +219,10 @@ target_command (char *arg, int from_tty)
void
add_target (struct target_ops *t)
{
+ /* Provide default values for all "must have" methods. */
+ if (t->to_xfer_partial == NULL)
+ t->to_xfer_partial = default_xfer_partial;
+
if (!target_structs)
{
target_struct_allocsize = DEFAULT_ALLOCSIZE;
@@ -233,7 +237,6 @@ add_target (struct target_ops *t)
target_struct_allocsize * sizeof (*target_structs));
}
target_structs[target_struct_size++] = t;
-/* cleanup_target (t); */
if (targetlist == NULL)
add_prefix_cmd ("target", class_run, target_command,
@@ -260,7 +263,6 @@ target_load (char *arg, int from_tty)
(*current_target.to_load) (arg, from_tty);
}
-/* ARGSUSED */
static int
nomemory (CORE_ADDR memaddr, char *myaddr, int len, int write,
struct target_ops *t)
@@ -282,14 +284,12 @@ noprocess (void)
error ("You can't do that without a process to debug.");
}
-/* ARGSUSED */
static int
nosymbol (char *name, CORE_ADDR *addrp)
{
return 1; /* Symbol does not exist in target env */
}
-/* ARGSUSED */
static void
nosupport_runtime (void)
{
@@ -300,7 +300,6 @@ nosupport_runtime (void)
}
-/* ARGSUSED */
static void
default_terminal_info (char *args, int from_tty)
{
@@ -348,16 +347,121 @@ maybe_kill_then_create_inferior (char *exec, char *args, char **env)
target_create_inferior (exec, args, env);
}
-/* Clean up a target struct so it no longer has any zero pointers in it.
- We default entries, at least to stubs that print error messages. */
+/* Go through the target stack from top to bottom, copying over zero
+ entries in current_target, then filling in still empty entries. In
+ effect, we are doing class inheritance through the pushed target
+ vectors.
+
+ NOTE: cagney/2003-10-17: The problem with this inheritance, as it
+ is currently implemented, is that it discards any knowledge of
+ which target an inherited method originally belonged to.
+ Consequently, new new target methods should instead explicitly and
+ locally search the target stack for the target that can handle the
+ request. */
static void
-cleanup_target (struct target_ops *t)
+update_current_target (void)
{
+ struct target_ops *t;
+
+ /* First, reset curren'ts contents. */
+ memset (&current_target, 0, sizeof (current_target));
+
+#define INHERIT(FIELD, TARGET) \
+ if (!current_target.FIELD) \
+ current_target.FIELD = (TARGET)->FIELD
+
+ for (t = target_stack; t; t = t->beneath)
+ {
+ INHERIT (to_shortname, t);
+ INHERIT (to_longname, t);
+ INHERIT (to_doc, t);
+ INHERIT (to_open, t);
+ INHERIT (to_close, t);
+ INHERIT (to_attach, t);
+ INHERIT (to_post_attach, t);
+ INHERIT (to_detach, t);
+ INHERIT (to_disconnect, t);
+ INHERIT (to_resume, t);
+ INHERIT (to_wait, t);
+ INHERIT (to_post_wait, t);
+ INHERIT (to_fetch_registers, t);
+ INHERIT (to_store_registers, t);
+ INHERIT (to_prepare_to_store, t);
+ INHERIT (to_xfer_memory, t);
+ INHERIT (to_files_info, t);
+ INHERIT (to_insert_breakpoint, t);
+ INHERIT (to_remove_breakpoint, t);
+ INHERIT (to_can_use_hw_breakpoint, t);
+ INHERIT (to_insert_hw_breakpoint, t);
+ INHERIT (to_remove_hw_breakpoint, t);
+ INHERIT (to_insert_watchpoint, t);
+ INHERIT (to_remove_watchpoint, t);
+ INHERIT (to_stopped_data_address, t);
+ INHERIT (to_stopped_by_watchpoint, t);
+ INHERIT (to_have_continuable_watchpoint, t);
+ INHERIT (to_region_size_ok_for_hw_watchpoint, t);
+ INHERIT (to_terminal_init, t);
+ INHERIT (to_terminal_inferior, t);
+ INHERIT (to_terminal_ours_for_output, t);
+ INHERIT (to_terminal_ours, t);
+ INHERIT (to_terminal_save_ours, t);
+ INHERIT (to_terminal_info, t);
+ INHERIT (to_kill, t);
+ INHERIT (to_load, t);
+ INHERIT (to_lookup_symbol, t);
+ INHERIT (to_create_inferior, t);
+ INHERIT (to_post_startup_inferior, t);
+ INHERIT (to_acknowledge_created_inferior, t);
+ INHERIT (to_insert_fork_catchpoint, t);
+ INHERIT (to_remove_fork_catchpoint, t);
+ INHERIT (to_insert_vfork_catchpoint, t);
+ INHERIT (to_remove_vfork_catchpoint, t);
+ INHERIT (to_follow_fork, t);
+ INHERIT (to_insert_exec_catchpoint, t);
+ INHERIT (to_remove_exec_catchpoint, t);
+ INHERIT (to_reported_exec_events_per_exec_call, t);
+ INHERIT (to_has_exited, t);
+ INHERIT (to_mourn_inferior, t);
+ INHERIT (to_can_run, t);
+ INHERIT (to_notice_signals, t);
+ INHERIT (to_thread_alive, t);
+ INHERIT (to_find_new_threads, t);
+ INHERIT (to_pid_to_str, t);
+ INHERIT (to_extra_thread_info, t);
+ INHERIT (to_stop, t);
+ /* Do not inherit to_xfer_partial. */
+ INHERIT (to_rcmd, t);
+ INHERIT (to_enable_exception_callback, t);
+ INHERIT (to_get_current_exception_event, t);
+ INHERIT (to_pid_to_exec_file, t);
+ INHERIT (to_stratum, t);
+ INHERIT (to_has_all_memory, t);
+ INHERIT (to_has_memory, t);
+ INHERIT (to_has_stack, t);
+ INHERIT (to_has_registers, t);
+ INHERIT (to_has_execution, t);
+ INHERIT (to_has_thread_control, t);
+ INHERIT (to_sections, t);
+ INHERIT (to_sections_end, t);
+ INHERIT (to_can_async_p, t);
+ INHERIT (to_is_async_p, t);
+ INHERIT (to_async, t);
+ INHERIT (to_async_mask_value, t);
+ INHERIT (to_find_memory_regions, t);
+ INHERIT (to_make_corefile_notes, t);
+ INHERIT (to_get_thread_local_address, t);
+ INHERIT (to_magic, t);
+ }
+#undef INHERIT
+
+ /* Clean up a target struct so it no longer has any zero pointers in
+ it. Some entries are defaulted to a method that print an error,
+ others are hard-wired to a standard recursive default. */
#define de_fault(field, value) \
- if (!t->field) \
- t->field = value
+ if (!current_target.field) \
+ current_target.field = value
de_fault (to_open,
(void (*) (char *, int))
@@ -508,6 +612,7 @@ cleanup_target (struct target_ops *t)
de_fault (to_stop,
(void (*) (void))
target_ignore);
+ current_target.to_xfer_partial = default_xfer_partial;
de_fault (to_rcmd,
(void (*) (char *, struct ui_file *))
tcomplain);
@@ -530,111 +635,11 @@ cleanup_target (struct target_ops *t)
(void (*) (void (*) (enum inferior_event_type, void*), void*))
tcomplain);
#undef de_fault
-}
-
-/* Go through the target stack from top to bottom, copying over zero entries in
- current_target. In effect, we are doing class inheritance through the
- pushed target vectors. */
-
-static void
-update_current_target (void)
-{
- struct target_stack_item *item;
- struct target_ops *t;
-
- /* First, reset current_target */
- memset (&current_target, 0, sizeof current_target);
-
- for (item = target_stack; item; item = item->next)
- {
- t = item->target_ops;
-
-#define INHERIT(FIELD, TARGET) \
- if (!current_target.FIELD) \
- current_target.FIELD = TARGET->FIELD
- INHERIT (to_shortname, t);
- INHERIT (to_longname, t);
- INHERIT (to_doc, t);
- INHERIT (to_open, t);
- INHERIT (to_close, t);
- INHERIT (to_attach, t);
- INHERIT (to_post_attach, t);
- INHERIT (to_detach, t);
- INHERIT (to_disconnect, t);
- INHERIT (to_resume, t);
- INHERIT (to_wait, t);
- INHERIT (to_post_wait, t);
- INHERIT (to_fetch_registers, t);
- INHERIT (to_store_registers, t);
- INHERIT (to_prepare_to_store, t);
- INHERIT (to_xfer_memory, t);
- INHERIT (to_files_info, t);
- INHERIT (to_insert_breakpoint, t);
- INHERIT (to_remove_breakpoint, t);
- INHERIT (to_can_use_hw_breakpoint, t);
- INHERIT (to_insert_hw_breakpoint, t);
- INHERIT (to_remove_hw_breakpoint, t);
- INHERIT (to_insert_watchpoint, t);
- INHERIT (to_remove_watchpoint, t);
- INHERIT (to_stopped_data_address, t);
- INHERIT (to_stopped_by_watchpoint, t);
- INHERIT (to_have_continuable_watchpoint, t);
- INHERIT (to_region_size_ok_for_hw_watchpoint, t);
- INHERIT (to_terminal_init, t);
- INHERIT (to_terminal_inferior, t);
- INHERIT (to_terminal_ours_for_output, t);
- INHERIT (to_terminal_ours, t);
- INHERIT (to_terminal_save_ours, t);
- INHERIT (to_terminal_info, t);
- INHERIT (to_kill, t);
- INHERIT (to_load, t);
- INHERIT (to_lookup_symbol, t);
- INHERIT (to_create_inferior, t);
- INHERIT (to_post_startup_inferior, t);
- INHERIT (to_acknowledge_created_inferior, t);
- INHERIT (to_insert_fork_catchpoint, t);
- INHERIT (to_remove_fork_catchpoint, t);
- INHERIT (to_insert_vfork_catchpoint, t);
- INHERIT (to_remove_vfork_catchpoint, t);
- INHERIT (to_follow_fork, t);
- INHERIT (to_insert_exec_catchpoint, t);
- INHERIT (to_remove_exec_catchpoint, t);
- INHERIT (to_reported_exec_events_per_exec_call, t);
- INHERIT (to_has_exited, t);
- INHERIT (to_mourn_inferior, t);
- INHERIT (to_can_run, t);
- INHERIT (to_notice_signals, t);
- INHERIT (to_thread_alive, t);
- INHERIT (to_find_new_threads, t);
- INHERIT (to_pid_to_str, t);
- INHERIT (to_extra_thread_info, t);
- INHERIT (to_stop, t);
- INHERIT (to_query, t);
- INHERIT (to_rcmd, t);
- INHERIT (to_enable_exception_callback, t);
- INHERIT (to_get_current_exception_event, t);
- INHERIT (to_pid_to_exec_file, t);
- INHERIT (to_stratum, t);
- INHERIT (to_has_all_memory, t);
- INHERIT (to_has_memory, t);
- INHERIT (to_has_stack, t);
- INHERIT (to_has_registers, t);
- INHERIT (to_has_execution, t);
- INHERIT (to_has_thread_control, t);
- INHERIT (to_sections, t);
- INHERIT (to_sections_end, t);
- INHERIT (to_can_async_p, t);
- INHERIT (to_is_async_p, t);
- INHERIT (to_async, t);
- INHERIT (to_async_mask_value, t);
- INHERIT (to_find_memory_regions, t);
- INHERIT (to_make_corefile_notes, t);
- INHERIT (to_get_thread_local_address, t);
- INHERIT (to_magic, t);
-
-#undef INHERIT
- }
+ /* Finally, position the target-stack beneath the squashed
+ "current_target". That way code looking for a non-inherited
+ target method can quickly and simply find it. */
+ current_target.beneath = target_stack;
}
/* Push a new target type into the stack of the existing target accessors,
@@ -650,7 +655,7 @@ update_current_target (void)
int
push_target (struct target_ops *t)
{
- struct target_stack_item *cur, *prev, *tmp;
+ struct target_ops **cur;
/* Check magic number. If wrong, it probably means someone changed
the struct definition, but not all the places that initialize one. */
@@ -662,51 +667,37 @@ push_target (struct target_ops *t)
internal_error (__FILE__, __LINE__, "failed internal consistency check");
}
- /* Find the proper stratum to install this target in. */
-
- for (prev = NULL, cur = target_stack; cur; prev = cur, cur = cur->next)
+ /* Find the proper stratum to install this target in. */
+ for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath)
{
- if ((int) (t->to_stratum) >= (int) (cur->target_ops->to_stratum))
+ if ((int) (t->to_stratum) >= (int) (*cur)->to_stratum)
break;
}
- /* If there's already targets at this stratum, remove them. */
-
- if (cur)
- while (t->to_stratum == cur->target_ops->to_stratum)
- {
- /* There's already something on this stratum. Close it off. */
- if (cur->target_ops->to_close)
- (cur->target_ops->to_close) (0);
- if (prev)
- prev->next = cur->next; /* Unchain old target_ops */
- else
- target_stack = cur->next; /* Unchain first on list */
- tmp = cur->next;
- xfree (cur);
- cur = tmp;
- }
+ /* If there's already targets at this stratum, remove them. */
+ /* FIXME: cagney/2003-10-15: I think this should be poping all
+ targets to CUR, and not just those at this stratum level. */
+ while ((*cur) != NULL && t->to_stratum == (*cur)->to_stratum)
+ {
+ /* There's already something at this stratum level. Close it,
+ and un-hook it from the stack. */
+ struct target_ops *tmp = (*cur);
+ (*cur) = (*cur)->beneath;
+ tmp->beneath = NULL;
+ target_close (tmp, 0);
+ }
/* We have removed all targets in our stratum, now add the new one. */
-
- tmp = (struct target_stack_item *)
- xmalloc (sizeof (struct target_stack_item));
- tmp->next = cur;
- tmp->target_ops = t;
-
- if (prev)
- prev->next = tmp;
- else
- target_stack = tmp;
+ t->beneath = (*cur);
+ (*cur) = t;
update_current_target ();
- cleanup_target (&current_target); /* Fill in the gaps */
-
if (targetdebug)
setup_target_debug ();
- return prev != 0;
+ /* Not on top? */
+ return (t != target_stack);
}
/* Remove a target_ops vector from the stack, wherever it may be.
@@ -715,32 +706,29 @@ push_target (struct target_ops *t)
int
unpush_target (struct target_ops *t)
{
- struct target_stack_item *cur, *prev;
+ struct target_ops **cur;
+ struct target_ops *tmp;
- if (t->to_close)
- t->to_close (0); /* Let it clean up */
+ target_close (t, 0);
/* Look for the specified target. Note that we assume that a target
can only occur once in the target stack. */
- for (cur = target_stack, prev = NULL; cur; prev = cur, cur = cur->next)
- if (cur->target_ops == t)
- break;
+ for (cur = &target_stack; (*cur) != NULL; cur = &(*cur)->beneath)
+ {
+ if ((*cur) == t)
+ break;
+ }
- if (!cur)
+ if ((*cur) == NULL)
return 0; /* Didn't find target_ops, quit now */
/* Unchain the target */
-
- if (!prev)
- target_stack = cur->next;
- else
- prev->next = cur->next;
-
- xfree (cur); /* Release the target_stack_item */
+ tmp = (*cur);
+ (*cur) = (*cur)->beneath;
+ tmp->beneath = NULL;
update_current_target ();
- cleanup_target (&current_target);
return 1;
}
@@ -748,8 +736,8 @@ unpush_target (struct target_ops *t)
void
pop_target (void)
{
- (current_target.to_close) (0); /* Let it clean up */
- if (unpush_target (target_stack->target_ops) == 1)
+ target_close (&current_target, 0); /* Let it clean up */
+ if (unpush_target (target_stack) == 1)
return;
fprintf_unfiltered (gdb_stderr,
@@ -834,6 +822,21 @@ done:
return nbytes_read;
}
+/* Find a section containing ADDR. */
+struct section_table *
+target_section_by_addr (struct target_ops *target, CORE_ADDR addr)
+{
+ struct section_table *secp;
+ for (secp = target->to_sections;
+ secp < target->to_sections_end;
+ secp++)
+ {
+ if (addr >= secp->addr && addr < secp->endaddr)
+ return secp;
+ }
+ return NULL;
+}
+
/* Read LEN bytes of target memory at address MEMADDR, placing the results in
GDB's memory at MYADDR. Returns either 0 for success or an errno value
if any error occurs.
@@ -870,7 +873,6 @@ do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
int res;
int done = 0;
struct target_ops *t;
- struct target_stack_item *item;
/* Zero length requests are ok and require no work. */
if (len == 0)
@@ -882,22 +884,15 @@ do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
if (!write && trust_readonly)
{
+ struct section_table *secp;
/* User-settable option, "trust-readonly-sections". If true,
then memory from any SEC_READONLY bfd section may be read
- directly from the bfd file. */
-
- struct section_table *secp;
-
- for (secp = current_target.to_sections;
- secp < current_target.to_sections_end;
- secp++)
- {
- if (bfd_get_section_flags (secp->bfd, secp->the_bfd_section)
- & SEC_READONLY)
- if (memaddr >= secp->addr && memaddr < secp->endaddr)
- return xfer_memory (memaddr, myaddr, len, 0,
- attrib, &current_target);
- }
+ directly from the bfd file. */
+ secp = target_section_by_addr (&current_target, memaddr);
+ if (secp != NULL
+ && (bfd_get_section_flags (secp->bfd, secp->the_bfd_section)
+ & SEC_READONLY))
+ return xfer_memory (memaddr, myaddr, len, 0, attrib, &current_target);
}
/* The quick case is that the top target can handle the transfer. */
@@ -907,9 +902,8 @@ do_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
/* If res <= 0 then we call it again in the loop. Ah well. */
if (res <= 0)
{
- for (item = target_stack; item; item = item->next)
+ for (t = target_stack; t != NULL; t = t->beneath)
{
- t = item->target_ops;
if (!t->to_has_memory)
continue;
@@ -1077,12 +1071,145 @@ target_write_memory_partial (CORE_ADDR memaddr, char *buf, int len, int *err)
return target_xfer_memory_partial (memaddr, buf, len, 1, err);
}
-/* ARGSUSED */
+/* More generic transfers. */
+
+static LONGEST
+default_xfer_partial (struct target_ops *ops, enum target_object object,
+ const char *annex, void *readbuf,
+ const void *writebuf, ULONGEST offset, LONGEST len)
+{
+ if (object == TARGET_OBJECT_MEMORY
+ && ops->to_xfer_memory != NULL)
+ /* If available, fall back to the target's "to_xfer_memory"
+ method. */
+ {
+ int xfered = -1;
+ errno = 0;
+ if (writebuf != NULL)
+ {
+ void *buffer = xmalloc (len);
+ struct cleanup *cleanup = make_cleanup (xfree, buffer);
+ memcpy (buffer, writebuf, len);
+ xfered = ops->to_xfer_memory (offset, buffer, len, 1/*write*/, NULL,
+ ops);
+ do_cleanups (cleanup);
+ }
+ if (readbuf != NULL)
+ xfered = ops->to_xfer_memory (offset, readbuf, len, 0/*read*/, NULL,
+ ops);
+ if (xfered > 0)
+ return xfered;
+ else if (xfered == 0 && errno == 0)
+ /* "to_xfer_memory" uses 0, cross checked against ERRNO as one
+ indication of an error. */
+ return 0;
+ else
+ return -1;
+ }
+ else if (ops->beneath != NULL)
+ return ops->beneath->to_xfer_partial (ops->beneath, object, annex,
+ readbuf, writebuf, offset, len);
+ else
+ return -1;
+}
+
+/* Target vector read/write partial wrapper functions.
+
+ NOTE: cagney/2003-10-21: I wonder if having "to_xfer_partial
+ (inbuf, outbuf)", instead of separate read/write methods, make life
+ easier. */
+
+LONGEST
+target_read_partial (struct target_ops *ops,
+ enum target_object object,
+ const char *annex, void *buf,
+ ULONGEST offset, LONGEST len)
+{
+ gdb_assert (ops->to_xfer_partial != NULL);
+ return ops->to_xfer_partial (ops, object, annex, buf, NULL, offset, len);
+}
+
+LONGEST
+target_write_partial (struct target_ops *ops,
+ enum target_object object,
+ const char *annex, const void *buf,
+ ULONGEST offset, LONGEST len)
+{
+ gdb_assert (ops->to_xfer_partial != NULL);
+ return ops->to_xfer_partial (ops, object, annex, NULL, buf, offset, len);
+}
+
+/* Wrappers to perform the full transfer. */
+LONGEST
+target_read (struct target_ops *ops,
+ enum target_object object,
+ const char *annex, void *buf,
+ ULONGEST offset, LONGEST len)
+{
+ LONGEST xfered = 0;
+ while (xfered < len)
+ {
+ LONGEST xfer = target_read_partial (ops, object, annex,
+ (bfd_byte *) buf + xfered,
+ offset + xfered, len - xfered);
+ /* Call an observer, notifying them of the xfer progress? */
+ if (xfer <= 0)
+ /* Call memory_error? */
+ return -1;
+ xfered += xfer;
+ QUIT;
+ }
+ return len;
+}
+
+LONGEST
+target_write (struct target_ops *ops,
+ enum target_object object,
+ const char *annex, const void *buf,
+ ULONGEST offset, LONGEST len)
+{
+ LONGEST xfered = 0;
+ while (xfered < len)
+ {
+ LONGEST xfer = target_write_partial (ops, object, annex,
+ (bfd_byte *) buf + xfered,
+ offset + xfered, len - xfered);
+ /* Call an observer, notifying them of the xfer progress? */
+ if (xfer <= 0)
+ /* Call memory_error? */
+ return -1;
+ xfered += xfer;
+ QUIT;
+ }
+ return len;
+}
+
+/* Memory transfer methods. */
+
+void
+get_target_memory (struct target_ops *ops, CORE_ADDR addr, void *buf,
+ LONGEST len)
+{
+ if (target_read (ops, TARGET_OBJECT_MEMORY, NULL, buf, addr, len)
+ != len)
+ memory_error (EIO, addr);
+}
+
+ULONGEST
+get_target_memory_unsigned (struct target_ops *ops,
+ CORE_ADDR addr, int len)
+{
+ char buf[sizeof (ULONGEST)];
+
+ gdb_assert (len <= sizeof (buf));
+ get_target_memory (ops, addr, buf, len);
+ return extract_unsigned_integer (buf, len);
+}
+
static void
target_info (char *args, int from_tty)
{
struct target_ops *t;
- struct target_stack_item *item;
int has_all_mem = 0;
if (symfile_objfile != NULL)
@@ -1093,10 +1220,8 @@ target_info (char *args, int from_tty)
return;
#endif
- for (item = target_stack; item; item = item->next)
+ for (t = target_stack; t != NULL; t = t->beneath)
{
- t = item->target_ops;
-
if (!t->to_has_memory)
continue;
@@ -1391,16 +1516,7 @@ find_core_target (void)
struct target_ops *
find_target_beneath (struct target_ops *t)
{
- struct target_stack_item *cur;
-
- for (cur = target_stack; cur; cur = cur->next)
- if (cur->target_ops == t)
- break;
-
- if (cur == NULL || cur->next == NULL)
- return NULL;
- else
- return cur->next->target_ops;
+ return t->beneath;
}
@@ -1500,7 +1616,6 @@ normal_target_post_startup_inferior (ptid_t ptid)
}
/* Error-catcher for target_find_memory_regions */
-/* ARGSUSED */
static int dummy_find_memory_regions (int (*ignore1) (), void *ignore2)
{
error ("No target.");
@@ -1508,7 +1623,6 @@ static int dummy_find_memory_regions (int (*ignore1) (), void *ignore2)
}
/* Error-catcher for target_make_corefile_notes */
-/* ARGSUSED */
static char * dummy_make_corefile_notes (bfd *ignore1, int *ignore2)
{
error ("No target.");
@@ -1530,6 +1644,7 @@ init_dummy_target (void)
dummy_target.to_stratum = dummy_stratum;
dummy_target.to_find_memory_regions = dummy_find_memory_regions;
dummy_target.to_make_corefile_notes = dummy_make_corefile_notes;
+ dummy_target.to_xfer_partial = default_xfer_partial;
dummy_target.to_magic = OPS_MAGIC;
}
@@ -1547,11 +1662,19 @@ debug_to_open (char *args, int from_tty)
static void
debug_to_close (int quitting)
{
- debug_target.to_close (quitting);
-
+ target_close (&debug_target, quitting);
fprintf_unfiltered (gdb_stdlog, "target_close (%d)\n", quitting);
}
+void
+target_close (struct target_ops *targ, int quitting)
+{
+ if (targ->to_xclose != NULL)
+ targ->to_xclose (targ, quitting);
+ else if (targ->to_close != NULL)
+ targ->to_close (quitting);
+}
+
static void
debug_to_attach (char *args, int from_tty)
{
@@ -1668,11 +1791,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 < REGISTER_RAW_SIZE (regno); i++)
+ for (i = 0; i < DEPRECATED_REGISTER_RAW_SIZE (regno); i++)
{
fprintf_unfiltered (gdb_stdlog, "%02x", buf[i]);
}
- if (REGISTER_RAW_SIZE (regno) <= sizeof (LONGEST))
+ if (DEPRECATED_REGISTER_RAW_SIZE (regno) <= sizeof (LONGEST))
{
fprintf_unfiltered (gdb_stdlog, " 0x%s %s",
paddr_nz (read_register (regno)),
@@ -2164,14 +2287,21 @@ debug_to_stop (void)
fprintf_unfiltered (gdb_stdlog, "target_stop ()\n");
}
-static int
-debug_to_query (int type, char *req, char *resp, int *siz)
+static LONGEST
+debug_to_xfer_partial (struct target_ops *ops, enum target_object object,
+ const char *annex, void *readbuf, const void *writebuf,
+ ULONGEST offset, LONGEST len)
{
- int retval;
+ LONGEST retval;
- retval = debug_target.to_query (type, req, resp, siz);
+ retval = debug_target.to_xfer_partial (&debug_target, object, annex,
+ readbuf, writebuf, offset, len);
- fprintf_unfiltered (gdb_stdlog, "target_query (%c, %s, %s, %d) = %d\n", type, req, resp, *siz, retval);
+ fprintf_unfiltered (gdb_stdlog,
+ "target_xfer_partial (%d, %s, 0x%lx, 0x%lx, 0x%s, %s) = %s\n",
+ (int) object, (annex ? annex : "(null)"),
+ (long) readbuf, (long) writebuf, paddr_nz (offset),
+ paddr_d (len), paddr_d (retval));
return retval;
}
@@ -2273,7 +2403,7 @@ setup_target_debug (void)
current_target.to_thread_alive = debug_to_thread_alive;
current_target.to_find_new_threads = debug_to_find_new_threads;
current_target.to_stop = debug_to_stop;
- current_target.to_query = debug_to_query;
+ current_target.to_xfer_partial = debug_to_xfer_partial;
current_target.to_rcmd = debug_to_rcmd;
current_target.to_enable_exception_callback = debug_to_enable_exception_callback;
current_target.to_get_current_exception_event = debug_to_get_current_exception_event;
diff --git a/gdb/target.h b/gdb/target.h
index a3e10e8..42b9596 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -1,6 +1,8 @@
/* Interface between GDB and target environments, including files and processes
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
Contributed by Cygnus Support. Written by John Gilmore.
This file is part of GDB.
@@ -26,6 +28,7 @@
struct objfile;
struct ui_file;
struct mem_attrib;
+struct target_ops;
/* This include file defines the interface between the main part
of the debugger, and the part which is target-specific, or
@@ -175,6 +178,89 @@ extern char *target_signal_to_name (enum target_signal);
/* Given a name (SIGHUP, etc.), return its signal. */
enum target_signal target_signal_from_name (char *);
+/* Request the transfer of up to LEN 8-bit bytes of the target's
+ OBJECT. The OFFSET, for a seekable object, specifies the starting
+ point. The ANNEX can be used to provide additional data-specific
+ information to the target.
+
+ Return the number of bytes actually transfered, zero when no
+ further transfer is possible, and -1 when the transfer is not
+ supported.
+
+ NOTE: cagney/2003-10-17: The current interface does not support a
+ "retry" mechanism. Instead it assumes that at least one byte will
+ be transfered on each call.
+
+ NOTE: cagney/2003-10-17: The current interface can lead to
+ fragmented transfers. Lower target levels should not implement
+ hacks, such as enlarging the transfer, in an attempt to compensate
+ for this. Instead, the target stack should be extended so that it
+ implements supply/collect methods and a look-aside object cache.
+ With that available, the lowest target can safely and freely "push"
+ data up the stack.
+
+ NOTE: cagney/2003-10-17: Unlike the old query and the memory
+ transfer mechanisms, these methods are explicitly parameterized by
+ the target that it should be applied to.
+
+ NOTE: cagney/2003-10-17: Just like the old query and memory xfer
+ methods, these new methods perform partial transfers. The only
+ difference is that these new methods thought to include "partial"
+ in the name. The old code's failure to do this lead to much
+ confusion and duplication of effort as each target object attempted
+ to locally take responsibility for something it didn't have to
+ worry about.
+
+ NOTE: cagney/2003-10-17: With a TARGET_OBJECT_KOD object, for
+ backward compatibility with the "target_query" method that this
+ replaced, when OFFSET and LEN are both zero, return the "minimum"
+ buffer size. See "remote.c" for further information. */
+
+enum target_object
+{
+ /* Kernel Object Display transfer. See "kod.c" and "remote.c". */
+ TARGET_OBJECT_KOD,
+ /* AVR target specific transfer. See "avr-tdep.c" and "remote.c". */
+ TARGET_OBJECT_AVR,
+ /* Transfer up-to LEN bytes of memory starting at OFFSET. */
+ TARGET_OBJECT_MEMORY
+ /* Possible future ojbects: TARGET_OJBECT_FILE, TARGET_OBJECT_PROC,
+ TARGET_OBJECT_AUXV, ... */
+};
+
+extern LONGEST target_read_partial (struct target_ops *ops,
+ enum target_object object,
+ const char *annex, void *buf,
+ ULONGEST offset, LONGEST len);
+
+extern LONGEST target_write_partial (struct target_ops *ops,
+ enum target_object object,
+ const char *annex, const void *buf,
+ ULONGEST offset, LONGEST len);
+
+/* Wrappers to perform the full transfer. */
+extern LONGEST target_read (struct target_ops *ops,
+ enum target_object object,
+ const char *annex, void *buf,
+ ULONGEST offset, LONGEST len);
+
+extern LONGEST target_write (struct target_ops *ops,
+ enum target_object object,
+ const char *annex, const void *buf,
+ ULONGEST offset, LONGEST len);
+
+/* Wrappers to target read/write that perform memory transfers. They
+ throw an error if the memory transfer fails.
+
+ NOTE: cagney/2003-10-23: The naming schema is lifted from
+ "frame.h". The parameter order is lifted from get_frame_memory,
+ which in turn lifted it from read_memory. */
+
+extern void get_target_memory (struct target_ops *ops, CORE_ADDR addr,
+ void *buf, LONGEST len);
+extern ULONGEST get_target_memory_unsigned (struct target_ops *ops,
+ CORE_ADDR addr, int len);
+
/* If certain kinds of activity happen, target_wait should perform
callbacks. */
@@ -188,12 +274,23 @@ struct thread_info; /* fwd decl for parameter list below: */
struct target_ops
{
+ struct target_ops *beneath; /* To the target under this one. */
char *to_shortname; /* Name this target type */
char *to_longname; /* Name for printing */
char *to_doc; /* Documentation. Does not include trailing
newline, and starts with a one-line descrip-
tion (probably similar to to_longname). */
+ /* Per-target scratch pad. */
+ void *to_data;
+ /* The open routine takes the rest of the parameters from the
+ command, and (if successful) pushes a new target onto the
+ stack. Targets should supply this routine, if only to provide
+ an error message. */
void (*to_open) (char *, int);
+ /* Old targets with a static target vector provide "to_close".
+ New re-entrant targets provide "to_xclose" and that is expected
+ to xfree everything (including the "struct target_ops"). */
+ void (*to_xclose) (struct target_ops *targ, int quitting);
void (*to_close) (int);
void (*to_attach) (char *, int);
void (*to_post_attach) (int);
@@ -229,29 +326,6 @@ struct target_ops
struct mem_attrib *attrib,
struct target_ops *target);
-#if 0
- /* Enable this after 4.12. */
-
- /* Search target memory. Start at STARTADDR and take LEN bytes of
- target memory, and them with MASK, and compare to DATA. If they
- match, set *ADDR_FOUND to the address we found it at, store the data
- we found at LEN bytes starting at DATA_FOUND, and return. If
- not, add INCREMENT to the search address and keep trying until
- the search address is outside of the range [LORANGE,HIRANGE).
-
- If we don't find anything, set *ADDR_FOUND to (CORE_ADDR)0 and
- return. */
-
- void (*to_search) (int len, char *data, char *mask,
- CORE_ADDR startaddr, int increment,
- CORE_ADDR lorange, CORE_ADDR hirange,
- CORE_ADDR * addr_found, char *data_found);
-
-#define target_search(len, data, mask, startaddr, increment, lorange, hirange, addr_found, data_found) \
- (*current_target.to_search) (len, data, mask, startaddr, increment, \
- lorange, hirange, addr_found, data_found)
-#endif /* 0 */
-
void (*to_files_info) (struct target_ops *);
int (*to_insert_breakpoint) (CORE_ADDR, char *);
int (*to_remove_breakpoint) (CORE_ADDR, char *);
@@ -293,7 +367,6 @@ struct target_ops
char *(*to_pid_to_str) (ptid_t);
char *(*to_extra_thread_info) (struct thread_info *);
void (*to_stop) (void);
- int (*to_query) (int /*char */ , char *, char *, int *);
void (*to_rcmd) (char *command, struct ui_file *output);
struct symtab_and_line *(*to_enable_exception_callback) (enum
exception_event_kind,
@@ -333,6 +406,14 @@ struct target_ops
struct objfile *objfile,
CORE_ADDR offset);
+ /* 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. */
+ LONGEST (*to_xfer_partial) (struct target_ops *ops,
+ enum target_object object, const char *annex,
+ void *readbuf, const void *writebuf,
+ ULONGEST offset, LONGEST len);
+
int to_magic;
/* Need sub-structure for target machine related rather than comm related?
*/
@@ -349,43 +430,21 @@ struct target_ops
extern struct target_ops current_target;
-/* An item on the target stack. */
-
-struct target_stack_item
- {
- struct target_stack_item *next;
- struct target_ops *target_ops;
- };
-
-/* The target stack. */
-
-extern struct target_stack_item *target_stack;
-
/* Define easy words for doing these operations on our current target. */
#define target_shortname (current_target.to_shortname)
#define target_longname (current_target.to_longname)
-/* The open routine takes the rest of the parameters from the command,
- and (if successful) pushes a new target onto the stack.
- Targets should supply this routine, if only to provide an error message. */
-
-#define target_open(name, from_tty) \
- do { \
- dcache_invalidate (target_dcache); \
- (*current_target.to_open) (name, from_tty); \
- } while (0)
-
-/* Does whatever cleanup is required for a target that we are no longer
- going to be calling. Argument says whether we are quitting gdb and
- should not get hung in case of errors, or whether we want a clean
- termination even if it takes a while. This routine is automatically
- always called just before a routine is popped off the target stack.
- Closing file descriptors and freeing memory are typical things it should
- do. */
+/* Does whatever cleanup is required for a target that we are no
+ longer going to be calling. QUITTING indicates that GDB is exiting
+ and should not get hung on an error (otherwise it is important to
+ perform clean termination, even if it takes a while). This routine
+ is automatically always called when popping the target off the
+ target stack (to_beneath is undefined). Closing file descriptors
+ and freeing all memory allocated memory are typical things it
+ should do. */
-#define target_close(quitting) \
- (*current_target.to_close) (quitting)
+void target_close (struct target_ops *targ, int quitting);
/* Attaches to a process on the target side. Arguments are as passed
to the `attach' command by the user. This routine can be called
@@ -756,16 +815,6 @@ extern void target_load (char *arg, int from_tty);
#define target_stop current_target.to_stop
-/* Queries the target side for some information. The first argument is a
- letter specifying the type of the query, which is used to determine who
- should process it. The second argument is a string that specifies which
- information is desired and the third is a buffer that carries back the
- response from the target side. The fourth parameter is the size of the
- output buffer supplied. */
-
-#define target_query(query_type, query, resp_buffer, bufffer_size) \
- (*current_target.to_query) (query_type, query, resp_buffer, bufffer_size)
-
/* Send the specified COMMAND to the target's monitor
(shell,interpreter) for execution. The result of the query is
placed in OUTBUF. */
@@ -1105,16 +1154,15 @@ struct section_table
CORE_ADDR addr; /* Lowest address in section */
CORE_ADDR endaddr; /* 1+highest address in section */
- sec_ptr the_bfd_section;
+ struct bfd_section *the_bfd_section;
bfd *bfd; /* BFD file pointer */
};
-/* Builds a section table, given args BFD, SECTABLE_PTR, SECEND_PTR.
- Returns 0 if OK, 1 on error. */
+/* Return the "section" containing the specified address. */
+struct section_table *target_section_by_addr (struct target_ops *target,
+ CORE_ADDR addr);
-extern int build_section_table (bfd *, struct section_table **,
- struct section_table **);
/* From mem-break.c */
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 94971aa..94354a5 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,127 @@
+2003-11-11 Nick Clifton <nickc@redhat.com>
+
+ * gdb.base/shreloc.exp: Do not run for targets which do not
+ support shared objects.
+
+2003-11-10 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/fileio.exp: Drop tests for nointerrupts and noinferiorio.
+ Don't run tests if nofileio flag is given.
+
+2003-11-07 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.cp/annota3.exp: Make sure we can match 'Hardware watchpoint'
+ as well as 'Watchpoint'.
+
+2003-11-06 Elena Zannoni <ezannoni@redhat.com>
+
+ Reported by Jim Ingham <jingham@apple.com>:
+ * gdb.base/annota1.exp: Match at least one occurrence of the
+ signal handler annotation.
+
+2003-11-06 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.cp/annota2.exp: Make sure we can match 'Hardware watchpoint'
+ as well as 'Watchpoint'.
+
+2003-11-05 Michael Chastain <mec@shout.net>
+
+ * gdb.mi/pthreads.c (routine): Handle early return from sleep.
+
+2003-11-03 Kris Warkentin <kewarken@qnx.com>
+
+ * gdb.arch/gdb1291.c: New test file.
+ * gdb.arch/gdb1291.exp: New test script.
+ * gdb.arch/gdb1431.c: New test file.
+ * gdb.arch/gdb1431.exp: New test script.
+
+2003-10-22 Michael Chastain <mec@shout.net>
+
+ * gdb.mi/pthreads.c: Add copyright notice.
+
+2003-10-22 Michael Chastain <mec@shout.net>
+
+ * gdb.threads/pthreads.c: Add copyright notice.
+
+2003-10-20 Michael Chastain <mec@shout.net>
+
+ * gdb.base/gdb1056.exp: New test script.
+
+2003-10-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.threads/killed.exp: Use gdb_run_cmd.
+
+2003-10-13 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.base/gcore.exp: Issue an UNSUPPORTED and exit if we can't
+ create a core file.
+ * gdb.threads/gcore-thread.exp: Likewise.
+
+2003-10-13 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/call-rt-st.c (struct bit_flags_char_t): New bitfield
+ type, based on char type.
+ (struct bit_flags_short_t): New bitfield type, based on short type.
+ (init_bit_flags_char): New fuction.
+ (init_bit_flags_short): Ditto.
+ (print_bit_flags_char): Ditto.
+ (print_bit_flags_short): Ditto.
+ (main): Add handling for bit_flags_char_t and bit_flags_short_t.
+
+2003-10-11 Michael Chastain <mec@shout.net>
+
+ * gdb.base/call-rt-st.exp: Update copyright year.
+
+2003-10-10 Kei Sakamoto <sakamoto.kei@renesas.com>
+
+ * config/hmsirom.exp: Replace "Hitachi" with "Renesas".
+ * gdb.disasm/sh3.s: Ditto.
+
+2003-10-07 Daniel Jacobowitz <drow@mvista.com>
+
+ * gdb.threads/switch-threads.exp: New test.
+ * gdb.threads/switch-threads.c: New source file.
+
+2003-10-07 Corinna Vinschen <vinschen@redhat.com>
+
+ * gdb.base/ending-run.exp: Add sh specific case.
+
+2003-10-06 Andrew Cagney <cagney@redhat.com>
+
+ * gdb.base/watchpoint.exp: Delete obsolete clear_xfail.
+ * gdb.disasm/mn10200.exp: Delete obsolete file.
+
+2003-09-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * ChangeLog: Correct an entry command.exp -> commands.exp.
+ * gdb.base/commands.exp (bp_deleted_in_command_test)
+ (temporary_breakpoint_commands): Check noargs.
+
+2003-09-25 David Carlton <carlton@kealia.com>
+
+ * gdb.cp/namespace.exp: Tweak comments. Add non-quoted versions
+ of some print tests, where appropriate. Add tests for C::D::cd,
+ E::ce, F::cXfX, G::XgX.
+ * gdb.cp/namespace.cc: Add XgX, cXfX, ce.
+
+2003-09-25 Richard Earnshaw <rearnsha@arm.com>
+
+ * lib/java.exp (java_init): Import target_alias before using it.
+
+2003-09-25 David Carlton <carlton@kealia.com>
+
+ * gdb.base/corefile.exp: Delete obsolete setup_xfail.
+
+2003-09-23 Elena Zannoni <ezannoni@redhat.com>
+
+ * gdb.base/selftest.exp: Accomodate more instruction reordering
+ weirdness.
+
+2003-09-17 Michael Chastain <mec@shout.net>
+
+ * gdb.cp/gdb1355.exp: New file.
+ * gdb.cp/gdb1355.c: New file.
+
2003-09-15 Corinna Vinschen <vinschen@redhat.com>
* gdb.asm/asm-source.exp: Add sh*-*-* as supported target.
@@ -5,8 +129,8 @@
2003-09-11 David Carlton <carlton@kealia.com>
- * gdb.c++/namespace.exp: Add tests for namespace types.
- * gdb.c++/maint.exp (test_help): Test 'help maint cp namespace'.
+ * gdb.cp/namespace.exp: Add tests for namespace types.
+ * gdb.cp/maint.exp (test_help): Test 'help maint cp namespace'.
(test_namespace): New.
2003-09-11 Elena Zannoni <ezannoni@redhat.com>
@@ -1556,7 +1680,7 @@
2002-09-14 Corinna Vinschen <vinschen@redhat.com>
- * gdb.base/command.exp: Don't expect a "Program exited normally"
+ * gdb.base/commands.exp: Don't expect a "Program exited normally"
string after running the commands execution on breakpoint tests.
2002-09-13 Corinna Vinschen <vinschen@redhat.com>
diff --git a/gdb/testsuite/config/hmsirom.exp b/gdb/testsuite/config/hmsirom.exp
index 8c6e7da..0c53109 100644
--- a/gdb/testsuite/config/hmsirom.exp
+++ b/gdb/testsuite/config/hmsirom.exp
@@ -17,6 +17,6 @@
# Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu
-# Support for testing against a Hitachi SH3 target rom
+# Support for testing against a Renesas SH3 target rom
load_lib ../config/monitor.exp
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index c3ceac3..dc8ba29 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -296,7 +296,7 @@ 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$" {
+ -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" }
diff --git a/gdb/testsuite/gdb.base/call-rt-st.c b/gdb/testsuite/gdb.base/call-rt-st.c
index 712f70e..09dd5bb 100644
--- a/gdb/testsuite/gdb.base/call-rt-st.c
+++ b/gdb/testsuite/gdb.base/call-rt-st.c
@@ -31,6 +31,28 @@ struct small_rep_info_t {
int head;
};
+/* 6 bits : really fits in 8 bits and is promoted to 8 bits
+ */
+struct bit_flags_char_t {
+ unsigned char alpha :1;
+ unsigned char beta :1;
+ unsigned char gamma :1;
+ unsigned char delta :1;
+ unsigned char epsilon :1;
+ unsigned char omega :1;
+};
+
+/* 6 bits : really fits in 8 bits and is promoted to 16 bits
+ */
+struct bit_flags_short_t {
+ unsigned short alpha :1;
+ unsigned short beta :1;
+ unsigned short gamma :1;
+ unsigned short delta :1;
+ unsigned short epsilon :1;
+ unsigned short omega :1;
+};
+
/* 6 bits : really fits in 8 bits and is promoted to 32 bits
*/
struct bit_flags_t {
@@ -107,6 +129,90 @@ void loop_count () {
}
/*****************************************************************
+ * INIT_BIT_FLAGS_CHAR :
+ * Initializes a bit_flags_char_t structure. Can call this function see
+ * the call command behavior when integer arguments do not fit into
+ * registers and must be placed on the stack.
+ * OUT struct bit_flags_char_t *bit_flags -- structure to be filled
+ * IN unsigned a -- 0 or 1
+ * IN unsigned b -- 0 or 1
+ * IN unsigned g -- 0 or 1
+ * IN unsigned d -- 0 or 1
+ * IN unsigned e -- 0 or 1
+ * IN unsigned o -- 0 or 1
+ *****************************************************************/
+#ifdef PROTOTYPES
+void init_bit_flags_char (
+struct bit_flags_char_t *bit_flags,
+unsigned a,
+unsigned b,
+unsigned g,
+unsigned d,
+unsigned e,
+unsigned o)
+#else
+void init_bit_flags_char (bit_flags,a,b,g,d,e,o)
+struct bit_flags_char_t *bit_flags;
+unsigned a;
+unsigned b;
+unsigned g;
+unsigned d;
+unsigned e;
+unsigned o;
+#endif
+{
+
+ bit_flags->alpha = a;
+ bit_flags->beta = b;
+ bit_flags->gamma = g;
+ bit_flags->delta = d;
+ bit_flags->epsilon = e;
+ bit_flags->omega = o;
+}
+
+/*****************************************************************
+ * INIT_BIT_FLAGS_SHORT :
+ * Initializes a bit_flags_short_t structure. Can call this function see
+ * the call command behavior when integer arguments do not fit into
+ * registers and must be placed on the stack.
+ * OUT struct bit_flags_short_t *bit_flags -- structure to be filled
+ * IN unsigned a -- 0 or 1
+ * IN unsigned b -- 0 or 1
+ * IN unsigned g -- 0 or 1
+ * IN unsigned d -- 0 or 1
+ * IN unsigned e -- 0 or 1
+ * IN unsigned o -- 0 or 1
+ *****************************************************************/
+#ifdef PROTOTYPES
+void init_bit_flags_short (
+struct bit_flags_short_t *bit_flags,
+unsigned a,
+unsigned b,
+unsigned g,
+unsigned d,
+unsigned e,
+unsigned o)
+#else
+void init_bit_flags_short (bit_flags,a,b,g,d,e,o)
+struct bit_flags_short_t *bit_flags;
+unsigned a;
+unsigned b;
+unsigned g;
+unsigned d;
+unsigned e;
+unsigned o;
+#endif
+{
+
+ bit_flags->alpha = a;
+ bit_flags->beta = b;
+ bit_flags->gamma = g;
+ bit_flags->delta = d;
+ bit_flags->epsilon = e;
+ bit_flags->omega = o;
+}
+
+/*****************************************************************
* INIT_BIT_FLAGS :
* Initializes a bit_flags_t structure. Can call this function see
* the call command behavior when integer arguments do not fit into
@@ -345,6 +451,50 @@ int seed;
}
/*****************************************************************
+ * PRINT_BIT_FLAGS_CHAR :
+ * IN struct bit_flags_char_t bit_flags
+ ****************************************************************/
+#ifdef PROTOTYPES
+struct bit_flags_char_t print_bit_flags_char (struct bit_flags_char_t bit_flags)
+#else
+struct bit_flags_char_t print_bit_flags_char ( bit_flags)
+struct bit_flags_char_t bit_flags;
+#endif
+{
+
+ if (bit_flags.alpha) printf("alpha\n");
+ if (bit_flags.beta) printf("beta\n");
+ if (bit_flags.gamma) printf("gamma\n");
+ if (bit_flags.delta) printf("delta\n");
+ if (bit_flags.epsilon) printf("epsilon\n");
+ if (bit_flags.omega) printf("omega\n");
+ return bit_flags;
+
+}
+
+/*****************************************************************
+ * PRINT_BIT_FLAGS_SHORT :
+ * IN struct bit_flags_short_t bit_flags
+ ****************************************************************/
+#ifdef PROTOTYPES
+struct bit_flags_short_t print_bit_flags_short (struct bit_flags_short_t bit_flags)
+#else
+struct bit_flags_short_t print_bit_flags_short ( bit_flags)
+struct bit_flags_short_t bit_flags;
+#endif
+{
+
+ if (bit_flags.alpha) printf("alpha\n");
+ if (bit_flags.beta) printf("beta\n");
+ if (bit_flags.gamma) printf("gamma\n");
+ if (bit_flags.delta) printf("delta\n");
+ if (bit_flags.epsilon) printf("epsilon\n");
+ if (bit_flags.omega) printf("omega\n");
+ return bit_flags;
+
+}
+
+/*****************************************************************
* PRINT_BIT_FLAGS :
* IN struct bit_flags_t bit_flags
****************************************************************/
@@ -553,6 +703,8 @@ int main () {
/* variables for testing a small structures and a very long argument list
*/
struct small_rep_info_t *struct1;
+ struct bit_flags_char_t *cflags;
+ struct bit_flags_short_t *sflags;
struct bit_flags_t *flags;
struct bit_flags_combo_t *flags_combo;
struct three_char_t *three_char;
@@ -577,6 +729,8 @@ int main () {
/* Allocate space for small structures
*/
struct1 = (struct small_rep_info_t *)malloc(sizeof(struct small_rep_info_t));
+ cflags = (struct bit_flags_char_t *)malloc(sizeof(struct bit_flags_char_t));
+ sflags = (struct bit_flags_short_t *)malloc(sizeof(struct bit_flags_short_t));
flags = (struct bit_flags_t *)malloc(sizeof(struct bit_flags_t));
flags_combo = (struct bit_flags_combo_t *)malloc(sizeof(struct bit_flags_combo_t));
three_char = (struct three_char_t *)malloc(sizeof(struct three_char_t));
@@ -590,6 +744,10 @@ int main () {
*/
init_one_double ( d1, 1.11111);
init_two_floats ( f3, -2.345, 1.0);
+ init_bit_flags_char(cflags, (unsigned)1, (unsigned)0, (unsigned)1,
+ (unsigned)0, (unsigned)1, (unsigned)0 );
+ init_bit_flags_short(sflags, (unsigned)1, (unsigned)0, (unsigned)1,
+ (unsigned)0, (unsigned)1, (unsigned)0 );
init_bit_flags(flags, (unsigned)1, (unsigned)0, (unsigned)1,
(unsigned)0, (unsigned)1, (unsigned)0 );
init_bit_flags_combo(flags_combo, (unsigned)1, (unsigned)0, 'y',
@@ -605,6 +763,8 @@ int main () {
*/
print_one_double(*d1);
print_two_floats(*f3);
+ print_bit_flags_char(*cflags);
+ print_bit_flags_short(*sflags);
print_bit_flags(*flags);
print_bit_flags_combo(*flags_combo);
print_three_chars(*three_char);
diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp
index 0acd139..39242fd 100644
--- a/gdb/testsuite/gdb.base/call-rt-st.exp
+++ b/gdb/testsuite/gdb.base/call-rt-st.exp
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright 1998, 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
@@ -114,13 +114,13 @@ if ![runto_main] then {
gdb_test "break loop_count" \
- "Breakpoint.* file .*call-rt-st.c, line 106\\." \
+ "Breakpoint.* file .*call-rt-st.c, line 128\\." \
"breakpoint loop_count"
send_gdb "continue\n"
gdb_expect {
- -re "Continuing\\..*Breakpoint.*loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+106\[\t \]+for \\(index=0; index.4; index..\\);\[\r\n \]+$gdb_prompt $" {
+ -re "Continuing\\..*Breakpoint.*loop_count \\(\\) at.*call-rt-st.c:128\[ \t\r\n\]+128\[\t \]+for \\(index=0; index.4; index..\\);\[\r\n \]+$gdb_prompt $" {
pass "continue to loop_count"}
-re ".*$gdb_prompt $" { fail "continue to loop_count"}
timeout { fail "(timeout) continue to loop_count"}
@@ -128,11 +128,11 @@ gdb_expect {
send_gdb "finish\n"
gdb_expect {
- -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:617\[ \t\r\n\]+617\[\t \]+return 0;.*$gdb_prompt $" {
- pass "finish out from loop_count (line 617)"
+ -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:128\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:777\[ \t\r\n\]+777\[\t \]+return 0;.*$gdb_prompt $" {
+ pass "finish out from loop_count (line 777)"
}
- -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:615\[ \t\r\n\]+615\[\t \]+loop_count.*$gdb_prompt $" {
- pass "finish out from loop_count (line 615)"
+ -re "Run till exit from .0 loop_count \\(\\) at.*call-rt-st.c:128\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:775\[ \t\r\n\]+775\[\t \]+loop_count.*$gdb_prompt $" {
+ pass "finish out from loop_count (line 775)"
}
-re ".*$gdb_prompt $" {
fail "finish out from loop_count"
@@ -191,6 +191,16 @@ 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)" \
+ ".*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)" \
+ ".*alpha\[ \r\n\]+gamma\[ \r\n\]+epsilon\[ \r\n\]+.\[0-9\]+ = \\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\\}"
+}
+
if ![gdb_skip_stdio_test "print print_bit_flags(*flags)"] {
print_struct_call "print_bit_flags(*flags)" \
".*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/commands.exp b/gdb/testsuite/gdb.base/commands.exp
index d35353d..93ddd7e 100644
--- a/gdb/testsuite/gdb.base/commands.exp
+++ b/gdb/testsuite/gdb.base/commands.exp
@@ -1,5 +1,5 @@
# Copyright 1988, 1990, 1991, 1992, 1994, 1995, 1997, 1998, 1999, 2000,
-# 2001 Free Software Foundation, Inc.
+# 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
@@ -443,6 +443,11 @@ proc deprecated_command_test {} {
proc bp_deleted_in_command_test {} {
global gdb_prompt
+ if [target_info exists noargs] {
+ verbose "Skipping bp_deleted_in_command_test because of noargs."
+ return
+ }
+
gdb_test "set args 1" "" "set args in bp_deleted_in_command_test"
delete_breakpoints
@@ -504,6 +509,11 @@ proc bp_deleted_in_command_test {} {
proc temporary_breakpoint_commands {} {
global gdb_prompt
+ if [target_info exists noargs] {
+ verbose "Skipping temporary_breakpoint_commands because of noargs."
+ return
+ }
+
gdb_test "set args 1" "" "set args in temporary_breakpoint_commands"
delete_breakpoints
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
index d059ef5..d41ea7e 100644
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -244,7 +244,6 @@ gdb_expect {
# test reinit_frame_cache
gdb_load ${binfile}
-setup_xfail "*-*-*" CLLbs17002
gdb_test "up" "#\[0-9\]* *\[0-9xa-fH'\]* in .* \\(\\).*" "up in corefile.exp (reinit)"
gdb_test "core" "No core file now."
diff --git a/gdb/testsuite/gdb.base/ending-run.exp b/gdb/testsuite/gdb.base/ending-run.exp
index 3960f06..af32acd 100644
--- a/gdb/testsuite/gdb.base/ending-run.exp
+++ b/gdb/testsuite/gdb.base/ending-run.exp
@@ -202,6 +202,11 @@ gdb_expect {
-re ".*in __wrap__?main ().*$gdb_prompt $" {
pass "step out of main (status wrapper)"
}
+ -re "__setup_argv_for_main (.*).*$gdb_prompt $" {
+ # On sh, another wrapper function (start_l) exists, so
+ # another `next' is necessary.
+ gdb_test "next" ".*in start_l ().*" "step out of main (on sh)"
+ }
-re ".*$gdb_prompt $" { fail "step out of main (at end 2)" }
timeout {
fail "step out of main (hang or timeout on step at end 2)"
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
index 98c64db8..128cbb6 100644
--- a/gdb/testsuite/gdb.base/fileio.exp
+++ b/gdb/testsuite/gdb.base/fileio.exp
@@ -1,4 +1,4 @@
-# Copyright 2002
+# Copyright 2002, 2003
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -20,16 +20,11 @@
# This file was written by Corinna Vinschen <vinschen@redhat.com>
-if [target_info exists gdb,nointerrupts] {
- verbose "Skipping interrupt.exp because of nointerrupts."
+if [target_info exists gdb,nofileio] {
+ verbose "Skipping fileio.exp because of no fileio capabilities."
continue
}
-if [target_info exists gdb,noinferiorio] {
- verbose "Skipping interrupt.exp because of noinferiorio."
- return
-}
-
if $tracelevel then {
strace $tracelevel
}
diff --git a/gdb/testsuite/gdb.base/gcore.exp b/gdb/testsuite/gdb.base/gcore.exp
index 8c0ae8e..0576638 100644
--- a/gdb/testsuite/gdb.base/gcore.exp
+++ b/gdb/testsuite/gdb.base/gcore.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
@@ -106,9 +106,25 @@ set pre_corefile_extern_array \
set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
-gdb_test "gcore ${objdir}/${subdir}/gcore.test" \
- "Saved corefile ${escapedfilename}" \
- "save a corefile"
+gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
+ "save a corefile" \
+{
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
+ pass "save a corefile"
+ global core_supported
+ set core_supported 1
+ }
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
+ unsupported "save a corefile"
+ global core_supported
+ set core_supported 0
+ }
+}
+
+global core_supported
+if {!$core_supported} {
+ return -1
+}
# Now restart gdb and load the corefile.
gdb_exit
diff --git a/gdb/testsuite/gdb.base/selftest.exp b/gdb/testsuite/gdb.base/selftest.exp
index 9e1d4dd..442adb9 100644
--- a/gdb/testsuite/gdb.base/selftest.exp
+++ b/gdb/testsuite/gdb.base/selftest.exp
@@ -342,6 +342,11 @@ proc test_with_self { executable } {
send_gdb "step\n"
exp_continue
}
+ -re ".*cmdarg = .* xmalloc.*$gdb_prompt $" {
+ set stepped_back 1
+ send_gdb "step\n"
+ exp_continue
+ }
-re "dirsize = 1;.*$gdb_prompt $" {
set stepped_back 1
send_gdb "step\n"
diff --git a/gdb/testsuite/gdb.base/shreloc.exp b/gdb/testsuite/gdb.base/shreloc.exp
index ac48774..55ec1e7 100644
--- a/gdb/testsuite/gdb.base/shreloc.exp
+++ b/gdb/testsuite/gdb.base/shreloc.exp
@@ -23,6 +23,11 @@
# them gets relocated at load-time. Check that gdb gets the right
# values for the debugging and minimal symbols.
+if {[istarget *-elf*] || [istarget *-coff] || [istarget *-aout]} then {
+ verbose "test skipped - shared object files not supported by this target."
+ return 0
+}
+
if $tracelevel then {
strace $tracelevel
}
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index fd5d8f2..58b3527 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -394,7 +394,6 @@ proc test_stepping {} {
clear_xfail "sparc-*-*"
clear_xfail "hppa*-*-*bsd*"
# It works with the generic inferior function calling code too.
- # OBSOLETE clear_xfail "mn10200*-*-*"
clear_xfail "mn10300*-*-*"
# The following architectures define CALL_DUMMY_HAS_COMPLETED.
clear_xfail "hppa*-*-*hpux*"
diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp
index 0446eb3..f4f2433 100644
--- a/gdb/testsuite/gdb.cp/annota2.exp
+++ b/gdb/testsuite/gdb.cp/annota2.exp
@@ -193,7 +193,7 @@ gdb_expect {
#
send_gdb "next\n"
gdb_expect {
- -re "\r\n\032\032post-prompt\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\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\nWatchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\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$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
+ -re "\r\n\032\032post-prompt\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\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\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$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n$gdb_prompt$" \
{ pass "watch triggered on a.x" }
-re "\r\n\032\032post-prompt\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\032frames-invalid\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032watchpoint 3\r\n\.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\n\r\n\032\032frame-begin 0 $hex\r\n\r\n\032\032frame-function-name\r\nmain\r\n\032\032frame-args\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$decimal\r\n\032\032frame-source-end\r\n\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032frame-end\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" \
{ pass "watch triggered on a.x" }
diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp
index 431ed4f..c75a289 100644
--- a/gdb/testsuite/gdb.cp/annota3.exp
+++ b/gdb/testsuite/gdb.cp/annota3.exp
@@ -196,7 +196,7 @@ gdb_expect_list "set watch on a.x" "$gdb_prompt$" {
#
send_gdb "next\n"
gdb_expect {
- -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\(\r\n\032\032frames-invalid\r\n\)+\r\n\032\032watchpoint 3\r\nWatchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\nmain \\(\\) at .*$srcfile:$decimal\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" {
+ -re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\(\r\n\032\032frames-invalid\r\n\)+\r\n\032\032watchpoint 3\r\n.*atchpoint 3: a.x\r\n\r\nOld value = 0\r\nNew value = 1\r\nmain \\(\\) at .*$srcfile:$decimal\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032stopped\r\n.*$gdb_prompt$" {
pass "watch triggered on a.x"
}
-re "\r\n\032\032post-prompt\r\n\r\n\032\032starting\r\n\r\n\032\032frames-invalid\r\n\r\n\032\032source .*$srcfile.*beg:$hex\r\n\r\n\032\032stopped\r\n$gdb_prompt$" {
diff --git a/gdb/testsuite/gdb.cp/namespace.exp b/gdb/testsuite/gdb.cp/namespace.exp
index 5bf976b..1eb24c1 100644
--- a/gdb/testsuite/gdb.cp/namespace.exp
+++ b/gdb/testsuite/gdb.cp/namespace.exp
@@ -89,6 +89,11 @@ gdb_test "up" ".*main.*" "up from marker1"
# I'm including versions both with and without quotes; for tests that
# shouldn't work with quotes, I'm only including one version.
+# NOTE: carlton/2003-09-24: the quotes are becoming less necessary (or
+# even desirable.) For tests where it should still work with quotes,
+# I'm including versions both with and without quotes; for tests that
+# shouldn't work with quotes, I'm only including one version.
+
send_gdb "print 'AAA::c'\n"
gdb_expect {
-re "\\$\[0-9\]* = 0 '\\\\(0|000)'\r\n$gdb_prompt $" { pass "print 'AAA::c'" }
diff --git a/gdb/testsuite/gdb.disasm/mn10200.exp b/gdb/testsuite/gdb.disasm/mn10200.exp
deleted file mode 100644
index a47b341..0000000
--- a/gdb/testsuite/gdb.disasm/mn10200.exp
+++ /dev/null
@@ -1,478 +0,0 @@
-# OBSOLETE
-# OBSOLETE # Copyright 1997 Free Software Foundation, Inc.
-# OBSOLETE
-# OBSOLETE # This program is free software; you can redistribute it and/or modify
-# OBSOLETE # it under the terms of the GNU General Public License as published by
-# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
-# OBSOLETE # (at your option) any later version.
-# OBSOLETE #
-# OBSOLETE # This program is distributed in the hope that it will be useful,
-# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
-# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# OBSOLETE # GNU General Public License for more details.
-# OBSOLETE #
-# OBSOLETE # You should have received a copy of the GNU General Public License
-# OBSOLETE # along with this program; if not, write to the Free Software
-# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# OBSOLETE
-# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
-# OBSOLETE # bug-gdb@prep.ai.mit.edu
-# OBSOLETE
-# OBSOLETE # This file was written by Jeff Law. (law@cygnus.com)
-# OBSOLETE
-# OBSOLETE if $tracelevel then {
-# OBSOLETE strace $tracelevel
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE if ![istarget "mn10200*-*-*"] {
-# OBSOLETE verbose "Tests ignored for all but mn10200 based targets."
-# OBSOLETE return
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE global exec_output
-# OBSOLETE set prms_id 0
-# OBSOLETE set bug_id 0
-# OBSOLETE
-# OBSOLETE set testfile "mn10200"
-# OBSOLETE set srcfile ${srcdir}/${subdir}/${testfile}.s
-# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}
-# OBSOLETE if { [gdb_compile "${srcfile}" "${binfile}" executable ""] != "" } {
-# OBSOLETE gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc add_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/12i add_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*add d1,d2.*
-# OBSOLETE .*add d2,a3.*
-# OBSOLETE .*add a2,d1.*
-# OBSOLETE .*add a3,a2.*
-# OBSOLETE .*add 16,d1.*
-# OBSOLETE .*add 256,d2.*
-# OBSOLETE .*add 131071,d3.*
-# OBSOLETE .*add 16,a1.*
-# OBSOLETE .*add 256,a2.*
-# OBSOLETE .*add 131071,a3.*
-# OBSOLETE .*addc d1,d2.*
-# OBSOLETE .*addnf 16,a2.*
-# OBSOLETE .*$gdb_prompt $" { pass "add tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "add tests" }
-# OBSOLETE timeout { fail "(timeout) add tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc bcc_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/15i bCC_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*beq 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bne 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bgt 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bge 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*ble 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*blt 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bhi 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bcc 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bls 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bcs 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bvc 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bvs 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bnc 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bns 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*bra 0x\[0-9a-f]+ <bCC_tests>.*
-# OBSOLETE .*$gdb_prompt $" { pass "bCC tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "bCC tests" }
-# OBSOLETE timeout { fail "(timeout) bCC tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc bccx_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/14i bCCx_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*beqx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bnex 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bgtx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bgex 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*blex 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bltx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bhix 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bccx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*blsx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bcsx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bvcx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bvsx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bncx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*bnsx 0x\[0-9a-f]+ <bCCx_tests>.*
-# OBSOLETE .*$gdb_prompt $" { pass "bCCx tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "bCCx tests" }
-# OBSOLETE timeout { fail "(timeout) bCCx tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc bit_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/4 bit_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*btst 64,d1.*
-# OBSOLETE .*btst 8192,d2.*
-# OBSOLETE .*bset d1,\\(a2\\).*
-# OBSOLETE .*bclr d1,\\(a2\\).*
-# OBSOLETE .*$gdb_prompt $" { pass "bit tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "bit tests" }
-# OBSOLETE timeout { fail "(timeout) bit tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc cmp_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/9i cmp_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*cmp d1,d2.*
-# OBSOLETE .*cmp d2,a3.*
-# OBSOLETE .*cmp a3,d3.*
-# OBSOLETE .*cmp a3,a2.*
-# OBSOLETE .*cmp 16,d3.*
-# OBSOLETE .*cmp 256,d2.*
-# OBSOLETE .*cmp 131071,d1.*
-# OBSOLETE .*cmp 256,a2.*
-# OBSOLETE .*cmp 131071,a1.*
-# OBSOLETE .*$gdb_prompt $" { pass "cmp tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "cmp tests" }
-# OBSOLETE timeout { fail "(timeout) cmp tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc extend_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/5i extend_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*ext d1.*
-# OBSOLETE .*extx d2.*
-# OBSOLETE .*extxu d3.*
-# OBSOLETE .*extxb d2.*
-# OBSOLETE .*extxbu d1.*
-# OBSOLETE .*$gdb_prompt $" { pass "extend tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "extend tests" }
-# OBSOLETE timeout { fail "(timeout) extend tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc logical_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/11i logical_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*and d1,d2.*
-# OBSOLETE .*and 127,d2.*
-# OBSOLETE .*and 32767,d3.*
-# OBSOLETE .*and 32767,psw.*
-# OBSOLETE .*or d1,d2.*
-# OBSOLETE .*or 127,d2.*
-# OBSOLETE .*or 32767,d3.*
-# OBSOLETE .*or 32767,psw.*
-# OBSOLETE .*xor d1,d2.*
-# OBSOLETE .*xor 32767,d3.*
-# OBSOLETE .*not d3.*
-# OBSOLETE .*$gdb_prompt $" { pass "logical tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "logical tests" }
-# OBSOLETE timeout { fail "(timeout) logical tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc mov_tests_1 { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/12i mov_tests_1\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*mov d1,a2.*
-# OBSOLETE .*mov a2,d1.*
-# OBSOLETE .*mov d1,d2.*
-# OBSOLETE .*mov a2,a1.*
-# OBSOLETE .*mov psw,d3.*
-# OBSOLETE .*mov d2,psw.*
-# OBSOLETE .*mov mdr,d1.*
-# OBSOLETE .*mov d2,mdr.*
-# OBSOLETE .*mov \\(a2\\),d1.*
-# OBSOLETE .*mov \\(8,a2\\),d1.*
-# OBSOLETE .*mov \\(256,a2\\),d1.*
-# OBSOLETE .*mov \\(131071,a2\\),d1.*
-# OBSOLETE .*$gdb_prompt $" { pass "mov1 tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "mov1 tests" }
-# OBSOLETE timeout { fail "(timeout) mov1 tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc mov_tests_2 { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/9 mov_tests_2\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*mov \\(d1,a1\\),d2.*
-# OBSOLETE .*mov \\(0x8000.*\\),d1.*
-# OBSOLETE .*mov \\(0x1ffff.*\\),d1.*
-# OBSOLETE .*mov \\(8,a2\\),a1.*
-# OBSOLETE .*mov \\(256,a2\\),a1.*
-# OBSOLETE .*mov \\(131071,a2\\),a1.*
-# OBSOLETE .*mov \\(d1,a1\\),a2.*
-# OBSOLETE .*mov \\(0x8000.*\\),a1.*
-# OBSOLETE .*mov \\(0x1ffff.*\\),a1.*
-# OBSOLETE .*$gdb_prompt $" { pass "mov2 tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "mov2 tests" }
-# OBSOLETE timeout { fail "(timeout) mov2 tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc mov_tests_3 { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/10 mov_tests_3\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*mov d1,\\(a2\\).*
-# OBSOLETE .*mov d1,\\(32,a2\\).*
-# OBSOLETE .*mov d1,\\(256,a2\\).*
-# OBSOLETE .*mov d1,\\(131071,a2\\).*
-# OBSOLETE .*mov d1,\\(d2,a2\\).*
-# OBSOLETE .*mov d1,\\(0x80.*\\).*
-# OBSOLETE .*mov d1,\\(0x1ffff.*\\).*
-# OBSOLETE .*mov a1,\\(32,a2\\).*
-# OBSOLETE .*mov a1,\\(256,a2\\).*
-# OBSOLETE .*mov a1,\\(131071,a2\\).*
-# OBSOLETE .*$gdb_prompt $" { pass "mov3 tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "mov3 tests" }
-# OBSOLETE timeout { fail "(timeout) mov3 tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc mov_tests_4 { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/8 mov_tests_4\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*mov a1,\\(d2,a2\\).*
-# OBSOLETE .*mov a1,\\(0x80.*\\).*
-# OBSOLETE .*mov a1,\\(0x1ffff.*\\).*
-# OBSOLETE .*mov 8,d1.*
-# OBSOLETE .*mov 256,d1.*
-# OBSOLETE .*mov 131071,d1.*
-# OBSOLETE .*mov 256,a1.*
-# OBSOLETE .*mov 131071,a1.*
-# OBSOLETE .*$gdb_prompt $" { pass "mov4 tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "mov4 tests" }
-# OBSOLETE timeout { fail "(timeout) mov4 tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc movb_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/12 movb_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*movb \\(8,a2\\),d1.*
-# OBSOLETE .*movb \\(256,a2\\),d1.*
-# OBSOLETE .*movb \\(131071,a2\\),d1.*
-# OBSOLETE .*movb \\(d2,a2\\),d3.*
-# OBSOLETE .*movb \\(0x1ffff.*\\),d2.*
-# OBSOLETE .*movb d1,\\(a2\\).*
-# OBSOLETE .*movb d1,\\(8,a2\\).*
-# OBSOLETE .*movb d1,\\(256,a2\\).*
-# OBSOLETE .*movb d1,\\(131071,a2\\).*
-# OBSOLETE .*movb d1,\\(d2,a2\\).*
-# OBSOLETE .*movb d1,\\(0x100.*\\).*
-# OBSOLETE .*movb d1,\\(0x1ffff.*\\).*
-# OBSOLETE .*$gdb_prompt $" { pass "movb tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "movb tests" }
-# OBSOLETE timeout { fail "(timeout) movb tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc movbu_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/7 movbu_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*movbu \\(a2\\),d1.*
-# OBSOLETE .*movbu \\(8,a2\\),d1.*
-# OBSOLETE .*movbu \\(256,a2\\),d1.*
-# OBSOLETE .*movbu \\(131071,a2\\),d1.*
-# OBSOLETE .*movbu \\(d1,a1\\),d2.*
-# OBSOLETE .*movbu \\(0x8000.*\\),d1.*
-# OBSOLETE .*movbu \\(0x1ffff.*\\),d1.*
-# OBSOLETE .*$gdb_prompt $" { pass "movbu tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "movbu tests" }
-# OBSOLETE timeout { fail "(timeout) movbu tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc movx_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/6 movx_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*movx \\(8,a2\\),d1.*
-# OBSOLETE .*movx \\(256,a2\\),d1.*
-# OBSOLETE .*movx \\(131071,a2\\),d1.*
-# OBSOLETE .*movx d1,\\(8,a2\\).*
-# OBSOLETE .*movx d1,\\(256,a2\\).*
-# OBSOLETE .*movx d1,\\(131071,a2\\).*
-# OBSOLETE .*$gdb_prompt $" { pass "movx tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "movx tests" }
-# OBSOLETE timeout { fail "(timeout) movx tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc muldiv_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/3 muldiv_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*mul d1,d2.*
-# OBSOLETE .*mulu d2,d3.*
-# OBSOLETE .*divu d3,d2.*
-# OBSOLETE .*$gdb_prompt $" { pass "muldiv tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "muldiv tests" }
-# OBSOLETE timeout { fail "(timeout) muldiv tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc misc_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/9 misc_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*jmp 0x\[0-9a-f]+ <main>.*
-# OBSOLETE .*jmp 0x\[0-9a-f]+ <start>.*
-# OBSOLETE .*jmp \\(a2\\).*
-# OBSOLETE .*jsr 0x\[0-9a-f]+ <main>.*
-# OBSOLETE .*jsr 0x\[0-9a-f]+ <start>.*
-# OBSOLETE .*jsr \\(a2\\).*
-# OBSOLETE .*rts.*
-# OBSOLETE .*rti.*
-# OBSOLETE .*nop.*
-# OBSOLETE .*$gdb_prompt $" { pass "misc tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "misc tests" }
-# OBSOLETE timeout { fail "(timeout) misc tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc shift_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/4i shift_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*asr d2.*
-# OBSOLETE .*lsr d3.*
-# OBSOLETE .*ror d1.*
-# OBSOLETE .*rol d2.*
-# OBSOLETE .*$gdb_prompt $" { pass "shift tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "shift tests" }
-# OBSOLETE timeout { fail "(timeout) shift tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE proc sub_tests { } {
-# OBSOLETE global gdb_prompt
-# OBSOLETE global hex
-# OBSOLETE global decimal
-# OBSOLETE
-# OBSOLETE send_gdb "x/9i sub_tests\n"
-# OBSOLETE gdb_expect {
-# OBSOLETE -re "
-# OBSOLETE .*sub d1,d2.*
-# OBSOLETE .*sub d2,a3.*
-# OBSOLETE .*sub a3,d3.*
-# OBSOLETE .*sub a3,a2.*
-# OBSOLETE .*sub 32767,d2.*
-# OBSOLETE .*sub 131071,d2.*
-# OBSOLETE .*sub 32767,a2.*
-# OBSOLETE .*sub 131071,a2.*
-# OBSOLETE .*subc d1,d2.*
-# OBSOLETE .*$gdb_prompt $" { pass "sub tests" }
-# OBSOLETE -re "$gdb_prompt $" { fail "sub tests" }
-# OBSOLETE timeout { fail "(timeout) sub tests" }
-# OBSOLETE }
-# OBSOLETE }
-# OBSOLETE
-# OBSOLETE # Start with a fresh gdb.
-# OBSOLETE
-# OBSOLETE gdb_exit
-# OBSOLETE gdb_start
-# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
-# OBSOLETE gdb_load $binfile
-# OBSOLETE
-# OBSOLETE add_tests
-# OBSOLETE bcc_tests
-# OBSOLETE bccx_tests
-# OBSOLETE bit_tests
-# OBSOLETE cmp_tests
-# OBSOLETE extend_tests
-# OBSOLETE logical_tests
-# OBSOLETE mov_tests_1
-# OBSOLETE mov_tests_2
-# OBSOLETE mov_tests_3
-# OBSOLETE mov_tests_4
-# OBSOLETE movb_tests
-# OBSOLETE movbu_tests
-# OBSOLETE movx_tests
-# OBSOLETE muldiv_tests
-# OBSOLETE misc_tests
-# OBSOLETE shift_tests
-# OBSOLETE sub_tests
diff --git a/gdb/testsuite/gdb.disasm/sh3.s b/gdb/testsuite/gdb.disasm/sh3.s
index 8bab256..e5969f5 100644
--- a/gdb/testsuite/gdb.disasm/sh3.s
+++ b/gdb/testsuite/gdb.disasm/sh3.s
@@ -1,7 +1,7 @@
.file "test.c"
.data
-! Hitachi SH cc1 (cygnus-2.7.1-950728) arguments: -O -fpeephole
+! Renesas SH cc1 (cygnus-2.7.1-950728) arguments: -O -fpeephole
! -ffunction-cse -freg-struct-return -fdelayed-branch -fcommon -fgnu-linker
gcc2_compiled.:
diff --git a/gdb/testsuite/gdb.mi/pthreads.c b/gdb/testsuite/gdb.mi/pthreads.c
index 1ba5a15..b73b023 100644
--- a/gdb/testsuite/gdb.mi/pthreads.c
+++ b/gdb/testsuite/gdb.mi/pthreads.c
@@ -1,3 +1,28 @@
+/* Pthreads test program.
+ Copyright 1996, 2002, 2003
+ Free Software Foundation, Inc.
+
+ Written by Keith Seitz of Red Hat.
+ Copied from gdb.threads/pthreads.c.
+ 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 <stdio.h>
#include <pthread.h>
@@ -17,7 +42,14 @@ static pthread_attr_t null_attr;
void *
routine (void *arg)
{
- sleep (9);
+ /* When gdb is running, it sets hidden breakpoints in the thread
+ library. The signals caused by these hidden breakpoints can
+ cause system calls such as 'sleep' to return early. Pay attention
+ to the return value from 'sleep' to get the full sleep. */
+ int unslept = 9;
+ while (unslept > 0)
+ unslept = sleep (unslept);
+
printf ("hello thread\n");
}
diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb.threads/gcore-thread.exp
index 5cb80bd..40c9ada 100644
--- a/gdb/testsuite/gdb.threads/gcore-thread.exp
+++ b/gdb/testsuite/gdb.threads/gcore-thread.exp
@@ -105,9 +105,25 @@ gdb_test "continue" "Continuing.*Breakpoint.* thread2 .*" "thread 2 is running"
set escapedfilename [string_to_regexp ${objdir}/${subdir}/gcore.test]
# Drop corefile
-gdb_test "gcore ${objdir}/${subdir}/gcore.test" \
- "Saved corefile ${escapedfilename}" \
- "save a corefile"
+gdb_test_multiple "gcore ${objdir}/${subdir}/gcore.test" \
+ "save a corefile" \
+{
+ -re "Saved corefile ${escapedfilename}\[\r\n\]+$gdb_prompt $" {
+ pass "save a corefile"
+ global core_supported
+ set core_supported 1
+ }
+ -re "Can't create a corefile\[\r\n\]+$gdb_prompt $" {
+ unsupported "save a corefile"
+ global core_supported
+ set core_supported 0
+ }
+}
+
+global core_supported
+if {!$core_supported} {
+ return -1
+}
# Now restart gdb and load the corefile.
gdb_exit
diff --git a/gdb/testsuite/gdb.threads/killed.exp b/gdb/testsuite/gdb.threads/killed.exp
index 2e61e7c..1948375 100644
--- a/gdb/testsuite/gdb.threads/killed.exp
+++ b/gdb/testsuite/gdb.threads/killed.exp
@@ -75,7 +75,15 @@ gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-gdb_test "run" "" "run program to completion"
+gdb_run_cmd
+gdb_expect {
+ -re "$gdb_prompt $" {
+ pass "run program to completion"
+ }
+ timeout "$gdb_prompt $" {
+ fail "run program to completion (timeout)"
+ }
+}
# Try to quit.
send_gdb "quit\n"
diff --git a/gdb/testsuite/gdb.threads/pthreads.c b/gdb/testsuite/gdb.threads/pthreads.c
index fdc0324..d82d550 100644
--- a/gdb/testsuite/gdb.threads/pthreads.c
+++ b/gdb/testsuite/gdb.threads/pthreads.c
@@ -1,3 +1,27 @@
+/* Pthreads test program.
+ Copyright 1996, 2002, 2003
+ Free Software Foundation, Inc.
+
+ Written by Fred Fish of Cygnus Support
+ 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. */
+
#include <stdio.h>
#include <pthread.h>
diff --git a/gdb/testsuite/lib/java.exp b/gdb/testsuite/lib/java.exp
index bcfd27c..5c1432f 100644
--- a/gdb/testsuite/lib/java.exp
+++ b/gdb/testsuite/lib/java.exp
@@ -33,6 +33,7 @@ proc java_init { args } {
set GCJ_UNDER_TEST $env(GCJ)
} else {
global tool_root_dir
+ global target_alias
if ![is_remote host] {
set file [lookfor_file $tool_root_dir gcj];
diff --git a/gdb/top.c b/gdb/top.c
index 6f0f9a1..c52c176 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -147,7 +147,7 @@ int baud_rate = -1;
In mid-1996, remote_timeout was moved from remote.c to top.c and
it began being used in other remote-* targets. It appears that the
default was changed to 20 seconds at that time, perhaps because the
- Hitachi E7000 ICE didn't always respond in a timely manner.
+ Renesas E7000 ICE didn't always respond in a timely manner.
But if 5 seconds is a long time to sit and wait for retransmissions,
20 seconds is far worse. This demonstrates the difficulty of using
@@ -669,10 +669,10 @@ 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 (!strcmp (c->name, "help")
- && !strcmp (c->name, "pwd")
- && !strcmp (c->name, "show")
- && !strcmp (c->name, "stop"))
+ if (strcmp (c->name, "help") != 0
+ && strcmp (c->name, "pwd") != 0
+ && strcmp (c->name, "show") != 0
+ && strcmp (c->name, "stop") != 0)
error ("Cannot execute this command while the target is running.");
/* Pass null arg rather than an empty one. */
@@ -1266,7 +1266,7 @@ command_line_input (char *prompt_arg, int repeat, char *annotation_suffix)
#define SERVER_COMMAND_LENGTH 7
server_command =
(p - linebuffer > SERVER_COMMAND_LENGTH)
- && STREQN (linebuffer, "server ", SERVER_COMMAND_LENGTH);
+ && strncmp (linebuffer, "server ", SERVER_COMMAND_LENGTH) == 0;
if (server_command)
{
/* Note that we don't set `line'. Between this and the check in
@@ -1375,7 +1375,7 @@ There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n"
/* After the required info we print the configuration information. */
fprintf_filtered (stream, "This GDB was configured as \"");
- if (!STREQ (host_name, target_name))
+ if (strcmp (host_name, target_name) != 0)
{
fprintf_filtered (stream, "--host=%s --target=%s", host_name, target_name);
}
@@ -1461,7 +1461,7 @@ quit_target (void *arg)
}
/* UDI wants this, to kill the TIP. */
- target_close (1);
+ target_close (&current_target, 1);
/* Save the history information if it is appropriate to do so. */
if (write_history_p && history_filename)
@@ -1478,6 +1478,7 @@ void
quit_force (char *args, int from_tty)
{
int exit_code = 0;
+ struct qt_args qt;
/* An optional expression may be used to cause gdb to terminate with the
value of that expression. */
@@ -1488,8 +1489,11 @@ quit_force (char *args, int from_tty)
exit_code = (int) value_as_long (val);
}
+ qt.args = args;
+ qt.from_tty = from_tty;
+
/* We want to handle any quit errors and exit regardless. */
- catch_errors (quit_target, args,
+ catch_errors (quit_target, &qt,
"Quitting: ", RETURN_MASK_ALL);
exit (exit_code);
@@ -1504,7 +1508,6 @@ input_from_terminal_p (void)
return gdb_has_a_terminal () && (instream == stdin) & caution;
}
-/* ARGSUSED */
static void
dont_repeat_command (char *ignored, int from_tty)
{
@@ -1590,7 +1593,6 @@ show_commands (char *args, int from_tty)
}
/* Called by do_setshow_command. */
-/* ARGSUSED */
static void
set_history_size_command (char *args, int from_tty, struct cmd_list_element *c)
{
@@ -1605,7 +1607,6 @@ set_history_size_command (char *args, int from_tty, struct cmd_list_element *c)
}
}
-/* ARGSUSED */
void
set_history (char *args, int from_tty)
{
@@ -1613,7 +1614,6 @@ set_history (char *args, int from_tty)
help_list (sethistlist, "set history ", -1, gdb_stdout);
}
-/* ARGSUSED */
void
show_history (char *args, int from_tty)
{
@@ -1623,7 +1623,6 @@ show_history (char *args, int from_tty)
int info_verbose = 0; /* Default verbose msgs off */
/* Called by do_setshow_command. An elaborate joke. */
-/* ARGSUSED */
void
set_verbose (char *args, int from_tty, struct cmd_list_element *c)
{
@@ -1720,8 +1719,7 @@ init_main (void)
/* Setup important stuff for command line editing. */
rl_completion_entry_function = readline_line_completion_function;
- rl_completer_word_break_characters =
- get_gdb_completer_word_break_characters ();
+ rl_completer_word_break_characters = default_word_break_characters ();
rl_completer_quote_characters = get_gdb_completer_quote_characters ();
rl_readline_name = "gdb";
rl_terminal_name = getenv ("TERM");
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index 8ac7581..272e944 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -1215,7 +1215,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 > REGISTER_RAW_SIZE (reg))
+ len > DEPRECATED_REGISTER_RAW_SIZE (reg))
add_register (collect, reg + 1);
break;
case LOC_REF_ARG:
diff --git a/gdb/tui/ChangeLog b/gdb/tui/ChangeLog
index 68386a4..fc5886c 100644
--- a/gdb/tui/ChangeLog
+++ b/gdb/tui/ChangeLog
@@ -1,3 +1,8 @@
+2003-09-27 Andrew Cagney <cagney@redhat.com>
+
+ * tuiRegs.c: Rename REGISTER_RAW_SIZE to
+ DEPRECATED_REGISTER_RAW_SIZE.
+
2003-09-13 Andrew Cagney <cagney@redhat.com>
* tui.h (struct ui_file): Add opaque declaration.
diff --git a/gdb/tui/tui-out.c b/gdb/tui/tui-out.c
index e1be56a..1c2af68 100644
--- a/gdb/tui/tui-out.c
+++ b/gdb/tui/tui-out.c
@@ -119,7 +119,7 @@ tui_table_begin (struct ui_out *uiout, int nbrofcols,
if (nr_rows == 0)
data->suppress_output = 1;
else
- /* Only the table suppresses the output and, fortunatly, a table
+ /* Only the table suppresses the output and, fortunately, a table
is not a recursive data structure. */
gdb_assert (data->suppress_output == 0);
}
diff --git a/gdb/tui/tuiRegs.c b/gdb/tui/tuiRegs.c
index 9f0b1a4..3a0c459 100644
--- a/gdb/tui/tuiRegs.c
+++ b/gdb/tui/tuiRegs.c
@@ -500,7 +500,7 @@ tuiCheckRegisterValues (struct frame_info *frame)
{
int size;
- size = REGISTER_RAW_SIZE (dataElementPtr->itemNo);
+ size = DEPRECATED_REGISTER_RAW_SIZE (dataElementPtr->itemNo);
for (j = 0; j < size; j++)
((char *) dataElementPtr->value)[j] = rawBuf[j];
_tuiDisplayRegister (
@@ -763,7 +763,7 @@ _tuiRegValueHasChanged (TuiDataElementPtr dataElement,
if (_tuiGetRegisterRawValue (
dataElement->itemNo, rawBuf, frame) == TUI_SUCCESS)
{
- int size = REGISTER_RAW_SIZE (dataElement->itemNo);
+ int size = DEPRECATED_REGISTER_RAW_SIZE (dataElement->itemNo);
for (i = 0; (i < size && !hasChanged); i++)
hasChanged = (((char *) dataElement->value)[i] != rawBuf[i]);
@@ -790,7 +790,7 @@ _tuiGetRegisterRawValue (int regNum, char *regValue, struct frame_info *frame)
if (target_has_registers)
{
- frame_read_register (frame, regNum, regValue);
+ get_frame_register (frame, regNum, regValue);
/* NOTE: cagney/2003-03-13: This is bogus. It is refering to
the register cache and not the frame which could have pulled
the register value off the stack. */
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 9b514bf..799aa4c 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -173,7 +173,6 @@ whatis_exp (char *exp, int show)
do_cleanups (old_chain);
}
-/* ARGSUSED */
static void
whatis_command (char *exp, int from_tty)
{
@@ -200,7 +199,6 @@ ptype_eval (struct expression *exp)
/* TYPENAME is either the name of a type, or an expression. */
-/* ARGSUSED */
static void
ptype_command (char *typename, int from_tty)
{
diff --git a/gdb/utils.c b/gdb/utils.c
index 9ba67a7..701277e 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -427,7 +427,6 @@ free_current_contents (void *ptr)
In such cases, we may not be certain where the first cleanup is, unless
we have a do-nothing one to always use as the base. */
-/* ARGSUSED */
void
null_cleanup (void *arg)
{
@@ -1684,7 +1683,6 @@ set_width (void)
wrap_pointer = wrap_buffer; /* Start it at the beginning. */
}
-/* ARGSUSED */
static void
set_width_command (char *args, int from_tty, struct cmd_list_element *c)
{
@@ -1692,7 +1690,6 @@ set_width_command (char *args, int from_tty, struct cmd_list_element *c)
set_width ();
}
-/* ARGSUSED */
static void
set_height_command (char *args, int from_tty, struct cmd_list_element *c)
{
@@ -2930,3 +2927,19 @@ gnu_debuglink_crc32 (unsigned long crc, unsigned char *buf, size_t len)
crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
return ~crc & 0xffffffff;;
}
+
+ULONGEST
+align_up (ULONGEST v, int n)
+{
+ /* Check that N is really a power of two. */
+ gdb_assert (n && (n & (n-1)) == 0);
+ return (v + n - 1) & -n;
+}
+
+ULONGEST
+align_down (ULONGEST v, int n)
+{
+ /* Check that N is really a power of two. */
+ gdb_assert (n && (n & (n-1)) == 0);
+ return (v & -n);
+}
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 2b239b6..a9ca9dd 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -810,8 +810,8 @@ v850_find_callers_reg (struct frame_info *fi, int regnum)
get_frame_base (fi)))
return deprecated_read_register_dummy (get_frame_pc (fi),
get_frame_base (fi), regnum);
- else if (get_frame_saved_regs (fi)[regnum] != 0)
- return read_memory_unsigned_integer (get_frame_saved_regs (fi)[regnum],
+ else if (deprecated_get_frame_saved_regs (fi)[regnum] != 0)
+ return read_memory_unsigned_integer (deprecated_get_frame_saved_regs (fi)[regnum],
v850_register_raw_size (regnum));
return read_register (regnum);
@@ -900,9 +900,9 @@ v850_pop_frame (void)
write_register (E_PC_REGNUM, DEPRECATED_FRAME_SAVED_PC (frame));
for (regnum = 0; regnum < E_NUM_REGS; regnum++)
- if (get_frame_saved_regs (frame)[regnum] != 0)
+ if (deprecated_get_frame_saved_regs (frame)[regnum] != 0)
write_register (regnum,
- read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum],
+ read_memory_unsigned_integer (deprecated_get_frame_saved_regs (frame)[regnum],
v850_register_raw_size (regnum)));
write_register (E_SP_REGNUM, get_frame_base (frame));
@@ -1074,7 +1074,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),
- REGISTER_RAW_SIZE (E_V0_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (E_V0_REGNUM));
read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
}
@@ -1117,7 +1117,7 @@ v850_frame_init_saved_regs (struct frame_info *fi)
struct pifsr pifsrs[E_NUM_REGS + 1], *pifsr;
CORE_ADDR func_addr, func_end;
- if (!get_frame_saved_regs (fi))
+ if (!deprecated_get_frame_saved_regs (fi))
{
frame_saved_regs_zalloc (fi);
@@ -1140,10 +1140,10 @@ v850_frame_init_saved_regs (struct frame_info *fi)
for (pifsr = pifsrs; pifsr->framereg; pifsr++)
{
- get_frame_saved_regs (fi)[pifsr->reg] = pifsr->offset + get_frame_base (fi);
+ deprecated_get_frame_saved_regs (fi)[pifsr->reg] = pifsr->offset + get_frame_base (fi);
if (pifsr->framereg == E_SP_REGNUM)
- get_frame_saved_regs (fi)[pifsr->reg] += pi.frameoffset;
+ deprecated_get_frame_saved_regs (fi)[pifsr->reg] += pi.frameoffset;
}
}
/* Else we're out of luck (can't debug completely stripped code).
@@ -1213,7 +1213,7 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* NOTE: cagney/2002-12-06: This can be deleted when this arch is
ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
+ set_gdbarch_deprecated_init_frame_pc (gdbarch, deprecated_init_frame_pc_default);
for (i = 0; v850_processor_type_table[i].regnames != NULL; i++)
{
diff --git a/gdb/v850ice.c b/gdb/v850ice.c
index bb1385a..9f516a3 100644
--- a/gdb/v850ice.c
+++ b/gdb/v850ice.c
@@ -371,7 +371,6 @@ v850ice_open (char *name, int from_tty)
/* Clean up connection to a remote debugger. */
-/* ARGSUSED */
static void
v850ice_close (int quitting)
{
@@ -535,7 +534,7 @@ v850ice_fetch_registers (int regno)
error ("v850ice_fetch_registers (%d): bad value from ICE: %s.",
regno, val);
- store_unsigned_integer (val, REGISTER_RAW_SIZE (regno), regval);
+ store_unsigned_integer (val, DEPRECATED_REGISTER_RAW_SIZE (regno), regval);
supply_register (regno, val);
}
@@ -561,7 +560,7 @@ v850ice_store_registers (int regno)
}
regval = extract_unsigned_integer (&deprecated_registers[DEPRECATED_REGISTER_BYTE (regno)],
- REGISTER_RAW_SIZE (regno));
+ DEPRECATED_REGISTER_RAW_SIZE (regno));
strcpy (cmd, "reg ");
if (!convert_register (regno, &cmd[4]))
return;
@@ -587,7 +586,6 @@ v850ice_prepare_to_store (void)
We can only read/write MAX_BLOCK_SIZE bytes at a time, though, or the DLL
dies. */
-/* ARGSUSED */
static int
v850ice_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
int should_write, struct target_ops *target)
diff --git a/gdb/valops.c b/gdb/valops.c
index e4f871a..4d53dc0 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -664,7 +664,7 @@ value_assign (struct value *toval, struct value *fromval)
{
int offset;
for (reg_offset = value_reg, offset = 0;
- offset + REGISTER_RAW_SIZE (reg_offset) <= VALUE_OFFSET (toval);
+ offset + DEPRECATED_REGISTER_RAW_SIZE (reg_offset) <= VALUE_OFFSET (toval);
reg_offset++);
byte_offset = VALUE_OFFSET (toval) - offset;
}
@@ -682,7 +682,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 += REGISTER_RAW_SIZE (regno), regno++)
+ amount_copied += DEPRECATED_REGISTER_RAW_SIZE (regno), regno++)
frame_register_read (frame, regno, buffer + amount_copied);
/* Modify what needs to be modified. */
@@ -699,7 +699,7 @@ 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 += REGISTER_RAW_SIZE (regno), regno++)
+ amount_copied += DEPRECATED_REGISTER_RAW_SIZE (regno), regno++)
put_frame_register (frame, regno, buffer + amount_copied);
}
@@ -2371,7 +2371,7 @@ destructor_name_p (const char *name, const struct type *type)
len = strlen (dname);
else
len = cp - dname;
- if (strlen (name + 1) != len || !STREQN (dname, name + 1, len))
+ if (strlen (name + 1) != len || strncmp (dname, name + 1, len) != 0)
error ("name of destructor must equal name of class");
else
return 1;
@@ -2498,7 +2498,7 @@ value_struct_elt_for_reference (struct type *domain, int offset,
{
char *t_field_name = TYPE_FIELD_NAME (t, i);
- if (t_field_name && STREQ (t_field_name, name))
+ if (t_field_name && strcmp (t_field_name, name) == 0)
{
if (TYPE_FIELD_STATIC (t, i))
{
@@ -2545,7 +2545,7 @@ value_struct_elt_for_reference (struct type *domain, int offset,
else if (cplus_demangle_opname (t_field_name, dem_opname, 0))
t_field_name = dem_opname;
}
- if (t_field_name && STREQ (t_field_name, name))
+ if (t_field_name && strcmp (t_field_name, name) == 0)
{
int j = TYPE_FN_FIELDLIST_LENGTH (t, i);
struct fn_field *f = TYPE_FN_FIELDLIST1 (t, i);
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 71e391a..0aaf8f5 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -1183,14 +1183,12 @@ val_print_string (CORE_ADDR addr, int len, int width, struct ui_file *stream)
knows what they really did here. Radix setting is confusing, e.g.
setting the input radix to "10" never changes it! */
-/* ARGSUSED */
static void
set_input_radix (char *args, int from_tty, struct cmd_list_element *c)
{
set_input_radix_1 (from_tty, input_radix);
}
-/* ARGSUSED */
static void
set_input_radix_1 (int from_tty, unsigned radix)
{
@@ -1216,7 +1214,6 @@ set_input_radix_1 (int from_tty, unsigned radix)
}
}
-/* ARGSUSED */
static void
set_output_radix (char *args, int from_tty, struct cmd_list_element *c)
{
@@ -1278,7 +1275,6 @@ set_radix (char *arg, int from_tty)
/* Show both the input and output radices. */
-/*ARGSUSED */
static void
show_radix (char *arg, int from_tty)
{
@@ -1300,7 +1296,6 @@ show_radix (char *arg, int from_tty)
}
-/*ARGSUSED */
static void
set_print (char *arg, int from_tty)
{
@@ -1309,7 +1304,6 @@ set_print (char *arg, int from_tty)
help_list (setprintlist, "set print ", -1, gdb_stdout);
}
-/*ARGSUSED */
static void
show_print (char *args, int from_tty)
{
diff --git a/gdb/value.h b/gdb/value.h
index 92b44a5..95d231a 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -417,9 +417,8 @@ extern struct value *value_repeat (struct value *arg1, int count);
extern struct value *value_subscript (struct value *array, struct value *idx);
-extern struct value *value_being_returned (struct type *valtype,
- struct regcache *retbuf,
- int struct_return);
+extern struct value *register_value_being_returned (struct type *valtype,
+ struct regcache *retbuf);
extern struct value *value_in (struct value *element, struct value *set);
@@ -427,8 +426,6 @@ extern int value_bit_index (struct type *type, char *addr, int index);
extern int using_struct_return (struct type *value_type, int gcc_p);
-extern void set_return_value (struct value *val);
-
extern struct value *evaluate_expression (struct expression *exp);
extern struct value *evaluate_type (struct expression *exp);
diff --git a/gdb/values.c b/gdb/values.c
index 3bde2aa..27524eb 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -1202,55 +1202,48 @@ value_from_double (struct type *type, DOUBLEST num)
return val;
}
-/* Deal with the value that is "about to be returned". */
-
-/* Return the value that a function returning now
- would be returning to its caller, assuming its type is VALTYPE.
- RETBUF is where we look for what ought to be the contents
- of the registers (in raw form). This is because it is often
- desirable to restore old values to those registers
- after saving the contents of interest, and then call
- this function using the saved values.
- struct_return is non-zero when the function in question is
- using the structure return conventions on the machine in question;
- 0 when it is using the value returning conventions (this often
- means returning pointer to where structure is vs. returning value). */
-
-/* ARGSUSED */
+/* 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 *
-value_being_returned (struct type *valtype, struct regcache *retbuf,
- int struct_return)
+register_value_being_returned (struct type *valtype, struct regcache *retbuf)
{
- struct value *val;
- CORE_ADDR addr;
-
- /* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */
- if (EXTRACT_STRUCT_VALUE_ADDRESS_P ())
- if (struct_return)
- {
- addr = EXTRACT_STRUCT_VALUE_ADDRESS (retbuf);
- if (!addr)
- error ("Function return value unknown.");
- return value_at (valtype, addr, NULL);
- }
+ struct value *val = allocate_value (valtype);
- /* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */
- if (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ())
- if (struct_return)
- {
- char *buf = deprecated_grub_regcache_for_registers (retbuf);
- addr = DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (buf);
- if (!addr)
- error ("Function return value unknown.");
- return value_at (valtype, addr, NULL);
- }
+ /* If the function returns void, don't bother fetching the return
+ value. */
+ if (TYPE_CODE (valtype) == TYPE_CODE_VOID)
+ return val;
- val = allocate_value (valtype);
- CHECK_TYPEDEF (valtype);
- /* If the function returns void, don't bother fetching the return value. */
- if (TYPE_CODE (valtype) != TYPE_CODE_VOID)
- EXTRACT_RETURN_VALUE (valtype, retbuf, VALUE_CONTENTS_RAW (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;
}
@@ -1292,35 +1285,27 @@ using_struct_return (struct type *value_type, int gcc_p)
if (code == TYPE_CODE_ERROR)
error ("Function return type unknown.");
- 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);
+ 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;
+ }
- 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);
}
-/* Store VAL so it will be returned if a function returns now.
- Does not verify that VAL's type matches what the current
- function wants to return. */
-
-void
-set_return_value (struct value *val)
-{
- struct type *type = check_typedef (VALUE_TYPE (val));
- enum type_code code = TYPE_CODE (type);
-
- if (code == TYPE_CODE_ERROR)
- error ("Function return type unknown.");
-
- if (code == TYPE_CODE_STRUCT
- || code == TYPE_CODE_UNION) /* FIXME, implement struct return. */
- error ("GDB does not support specifying a struct or union return value.");
-
- STORE_RETURN_VALUE (type, current_regcache, VALUE_CONTENTS (val));
-}
-
void
_initialize_values (void)
{
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 2bbe421..5c99aa8 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -93,7 +93,7 @@ vax_frame_init_saved_regs (struct frame_info *frame)
int regnum, regmask;
CORE_ADDR next_addr;
- if (get_frame_saved_regs (frame))
+ if (deprecated_get_frame_saved_regs (frame))
return;
frame_saved_regs_zalloc (frame);
@@ -107,18 +107,18 @@ vax_frame_init_saved_regs (struct frame_info *frame)
for (regnum = 0; regnum < VAX_AP_REGNUM; regnum++)
{
if (regmask & (1 << regnum))
- get_frame_saved_regs (frame)[regnum] = next_addr += 4;
+ deprecated_get_frame_saved_regs (frame)[regnum] = next_addr += 4;
}
- get_frame_saved_regs (frame)[SP_REGNUM] = next_addr + 4;
+ deprecated_get_frame_saved_regs (frame)[SP_REGNUM] = next_addr + 4;
if (regmask & (1 << DEPRECATED_FP_REGNUM))
- get_frame_saved_regs (frame)[SP_REGNUM] +=
+ deprecated_get_frame_saved_regs (frame)[SP_REGNUM] +=
4 + (4 * read_memory_integer (next_addr + 4, 4));
- get_frame_saved_regs (frame)[PC_REGNUM] = get_frame_base (frame) + 16;
- get_frame_saved_regs (frame)[DEPRECATED_FP_REGNUM] = get_frame_base (frame) + 12;
- get_frame_saved_regs (frame)[VAX_AP_REGNUM] = get_frame_base (frame) + 8;
- get_frame_saved_regs (frame)[PS_REGNUM] = get_frame_base (frame) + 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;
}
/* Get saved user PC for sigtramp from sigcontext for BSD style sigtramp. */
@@ -280,7 +280,7 @@ static CORE_ADDR
vax_extract_struct_value_address (char *regbuf)
{
return (extract_unsigned_integer (regbuf + DEPRECATED_REGISTER_BYTE (0),
- REGISTER_RAW_SIZE (0)));
+ DEPRECATED_REGISTER_RAW_SIZE (0)));
}
static const unsigned char *
@@ -348,7 +348,7 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* NOTE: cagney/2002-12-06: This can be deleted when this arch is
ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
+ set_gdbarch_deprecated_init_frame_pc (gdbarch, deprecated_init_frame_pc_default);
/* Register info */
set_gdbarch_num_regs (gdbarch, VAX_NUM_REGS);
diff --git a/gdb/vax-tdep.h b/gdb/vax-tdep.h
index 7529e57..1a19917 100644
--- a/gdb/vax-tdep.h
+++ b/gdb/vax-tdep.h
@@ -22,7 +22,7 @@
#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; REGISTER_RAW_SIZE is the
+ 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
@@ -33,10 +33,10 @@
register state. */
#define VAX_REGISTER_BYTES (VAX_NUM_REGS * 4)
-/* Largest value REGISTER_RAW_SIZE can have. */
+/* Largest value DEPRECATED_REGISTER_RAW_SIZE can have. */
#define VAX_MAX_REGISTER_RAW_SIZE 4
-/* Largest value REGISTER_VIRTUAL_SIZE can have. */
+/* Largest value DEPRECATED_REGISTER_VIRTUAL_SIZE can have. */
#define VAX_MAX_REGISTER_VIRTUAL_SIZE 4
/* Register numbers of various important registers.
diff --git a/gdb/version.in b/gdb/version.in
index a514448..71700c2 100644
--- a/gdb/version.in
+++ b/gdb/version.in
@@ -1 +1 @@
-2003-09-17-cvs
+2003-11-11-cvs
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c
index f0d87ef..358bdf7 100644
--- a/gdb/win32-nat.c
+++ b/gdb/win32-nat.c
@@ -35,7 +35,6 @@
#include "completer.h"
#include "regcache.h"
#include "top.h"
-#include "i386-tdep.h"
#include <signal.h>
#include <sys/types.h>
#include <fcntl.h>
@@ -52,6 +51,10 @@
#include "gdbcmd.h"
#include <sys/param.h>
#include <unistd.h>
+#include "exec.h"
+
+#include "i386-tdep.h"
+#include "i387-tdep.h"
/* The ui's event loop. */
extern int (*ui_loop_hook) (int signo);
@@ -182,7 +185,6 @@ static const int mappings[] =
context_offset (FloatSave.DataSelector),
context_offset (FloatSave.DataOffset),
context_offset (FloatSave.ErrorSelector)
-#ifdef HAVE_SSE_REGS
/* XMM0-7 */ ,
context_offset (ExtendedRegisters[10*16]),
context_offset (ExtendedRegisters[11*16]),
@@ -194,7 +196,6 @@ static const int mappings[] =
context_offset (ExtendedRegisters[17*16]),
/* MXCSR */
context_offset (ExtendedRegisters[24])
-#endif
};
#undef context_offset
@@ -347,12 +348,15 @@ do_child_fetch_inferior_registers (int r)
{
char *context_offset = ((char *) &current_thread->context) + mappings[r];
long l;
- if (r == FCS_REGNUM)
+
+#define I387_ST0_REGNUM I386_ST0_REGNUM
+
+ if (r == I387_FISEG_REGNUM)
{
l = *((long *) context_offset) & 0xffff;
supply_register (r, (char *) &l);
}
- else if (r == FOP_REGNUM)
+ else if (r == I387_FOP_REGNUM)
{
l = (*((long *) context_offset) >> 16) & ((1 << 11) - 1);
supply_register (r, (char *) &l);
@@ -364,6 +368,8 @@ do_child_fetch_inferior_registers (int r)
for (r = 0; r < NUM_REGS; r++)
do_child_fetch_inferior_registers (r);
}
+
+#undef I387_ST0_REGNUM
}
static void
@@ -1625,7 +1631,6 @@ child_files_info (struct target_ops *ignore)
attach_flag ? "attached" : "child", target_pid_to_str (inferior_ptid));
}
-/* ARGSUSED */
static void
child_open (char *arg, int from_tty)
{
diff --git a/gdb/wince.c b/gdb/wince.c
index 41541dc..f15bbd4 100644
--- a/gdb/wince.c
+++ b/gdb/wince.c
@@ -833,7 +833,7 @@ wince_software_single_step (enum target_signal ignore,
return;
}
#elif SHx
-/* Hitachi SH architecture instruction encoding masks */
+/* Renesas SH architecture instruction encoding masks */
#define COND_BR_MASK 0xff00
#define UCOND_DBR_MASK 0xe000
@@ -844,7 +844,7 @@ wince_software_single_step (enum target_signal ignore,
#define UCOND_DISP 0x0fff
#define UCOND_REG 0x0f00
-/* Hitachi SH instruction opcodes */
+/* Renesas SH instruction opcodes */
#define BF_INSTR 0x8b00
#define BT_INSTR 0x8900
@@ -1527,7 +1527,6 @@ child_files_info (struct target_ops *ignore)
target_pid_to_str (inferior_ptid));
}
-/* ARGSUSED */
static void
child_open (char *arg, int from_tty)
{
@@ -1998,7 +1997,8 @@ _initialize_wince (void)
add_show_from_set
(add_set_cmd ((char *) "remoteaddhost", class_support, var_boolean,
(char *) &remote_add_host,
- (char *) "Set whether to add this host to remote stub arguments for\n
+ (char *) "\
+Set whether to add this host to remote stub arguments for\n\
debugging over a network.", &setlist),
&showlist);
diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c
index a21ac13..4ed859b 100644
--- a/gdb/x86-64-linux-nat.c
+++ b/gdb/x86-64-linux-nat.c
@@ -166,7 +166,7 @@ store_regs (int tid, int regnum)
void
supply_fpregset (elf_fpregset_t *fpregsetp)
{
- x86_64_supply_fxsave ((const char *) fpregsetp, -1);
+ x86_64_supply_fxsave (current_regcache, -1, fpregsetp);
}
/* Fill register REGNUM (if it is a floating-point or SSE register) in
diff --git a/gdb/x86-64-linux-tdep.c b/gdb/x86-64-linux-tdep.c
index 2c49953..71a5364 100644
--- a/gdb/x86-64-linux-tdep.c
+++ b/gdb/x86-64-linux-tdep.c
@@ -123,7 +123,7 @@ fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
if (core_reg_size != 512)
warning ("Wrong size XMM register set in core file.");
else
- x86_64_supply_fxsave (core_reg_sect, -1);
+ x86_64_supply_fxsave (current_regcache, -1, core_reg_sect);
break;
default:
@@ -234,7 +234,7 @@ x86_64_linux_sigcontext_addr (struct frame_info *next_frame)
/* From <asm/sigcontext.h>. */
-static int x86_64_linux_sc_reg_offset[X86_64_NUM_GREGS] =
+static int x86_64_linux_sc_reg_offset[] =
{
13 * 8, /* %rax */
11 * 8, /* %rbx */
@@ -275,7 +275,7 @@ x86_64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
tdep->sigcontext_addr = x86_64_linux_sigcontext_addr;
tdep->sc_reg_offset = x86_64_linux_sc_reg_offset;
- tdep->sc_num_regs = X86_64_NUM_GREGS;
+ tdep->sc_num_regs = ARRAY_SIZE (x86_64_linux_sc_reg_offset);
}
diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c
index e855503..5e6a7e1 100644
--- a/gdb/x86-64-tdep.c
+++ b/gdb/x86-64-tdep.c
@@ -32,6 +32,7 @@
#include "gdbcore.h"
#include "objfiles.h"
#include "regcache.h"
+#include "regset.h"
#include "symfile.h"
#include "gdb_assert.h"
@@ -757,10 +758,10 @@ x86_64_store_return_value (struct type *type, struct regcache *regcache,
int len = TYPE_LENGTH (type);
/* First handle long doubles. */
- if (TYPE_CODE_FLT == TYPE_CODE (type) && len == 16)
+ if (TYPE_CODE_FLT == TYPE_CODE (type) && len == 16)
{
ULONGEST fstat;
- char buf[FPU_REG_RAW_SIZE];
+ char buf[I386_MAX_REGISTER_SIZE];
/* Returning floating-point values is a bit tricky. Apart from
storing the return value in %st(0), we have to simulate the
@@ -795,8 +796,8 @@ x86_64_store_return_value (struct type *type, struct regcache *regcache,
/* XXX: What about complex floating point types? */
else
{
- int low_size = REGISTER_RAW_SIZE (0);
- int high_size = REGISTER_RAW_SIZE (1);
+ int low_size = register_size (current_gdbarch, X86_64_RAX_REGNUM);
+ int high_size = register_size (current_gdbarch, X86_64_RDX_REGNUM);
if (len <= low_size)
regcache_cooked_write_part (regcache, 0, 0, len, valbuf);
@@ -1203,13 +1204,58 @@ x86_64_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
{
return sp & -(CORE_ADDR)16;
}
+
+
+/* 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. */
+
+static void
+x86_64_supply_fpregset (const struct regset *regset, struct regcache *regcache,
+ int regnum, const void *fpregs, size_t len)
+{
+ const struct gdbarch_tdep *tdep = regset->descr;
+
+ gdb_assert (len == tdep->sizeof_fpregset);
+ x86_64_supply_fxsave (regcache, regnum, fpregs);
+}
+
+/* Return the appropriate register set for the core section identified
+ by SECT_NAME and SECT_SIZE. */
+
+static const struct regset *
+x86_64_regset_from_core_section (struct gdbarch *gdbarch,
+ const char *sect_name, size_t sect_size)
+{
+ struct gdbarch_tdep *tdep = gdbarch_tdep (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 = x86_64_supply_fpregset;
+ }
+
+ return tdep->fpregset;
+ }
+
+ return i386_regset_from_core_section (gdbarch, sect_name, sect_size);
+}
+
void
x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- /* The x86-64 has 16 SSE registers. */
+ /* AMD64 generally uses `fxsave' instead of `fsave' for saving its
+ floating-point registers. */
+ tdep->sizeof_fpregset = I387_SIZEOF_FXSAVE;
+
+ /* AMD64 has an FPU and 16 SSE registers. */
+ tdep->st0_regnum = X86_64_ST0_REGNUM;
tdep->num_xmm_regs = 16;
/* This is what all the fuss is about. */
@@ -1264,6 +1310,7 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Avoid wiring in the MMX registers for now. */
set_gdbarch_num_pseudo_regs (gdbarch, 0);
+ tdep->mm0_regnum = -1;
set_gdbarch_unwind_dummy_id (gdbarch, x86_64_unwind_dummy_id);
@@ -1275,11 +1322,15 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
frame_unwind_append_sniffer (gdbarch, x86_64_sigtramp_frame_sniffer);
frame_unwind_append_sniffer (gdbarch, x86_64_frame_sniffer);
frame_base_set_default (gdbarch, &x86_64_frame_base);
+
+ /* If we have a register mapping, enable the generic core file support. */
+ if (tdep->gregset_reg_offset)
+ set_gdbarch_regset_from_core_section (gdbarch,
+ x86_64_regset_from_core_section);
}
-#define I387_FISEG_REGNUM FISEG_REGNUM
-#define I387_FOSEG_REGNUM FOSEG_REGNUM
+#define I387_ST0_REGNUM X86_64_ST0_REGNUM
/* The 64-bit FXSAVE format differs from the 32-bit format in the
sense that the instruction pointer and data pointer are simply
@@ -1288,22 +1339,25 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
bits of these pointers (instead of just the 16-bits of the segment
selector). */
-/* Fill register REGNUM in GDB's register cache with the appropriate
+/* Fill register REGNUM in REGCACHE with the appropriate
floating-point or SSE register value from *FXSAVE. If REGNUM is
-1, do this for all registers. This function masks off any of the
reserved bits in *FXSAVE. */
void
-x86_64_supply_fxsave (const char *fxsave, int regnum)
+x86_64_supply_fxsave (struct regcache *regcache, int regnum,
+ const void *fxsave)
{
- i387_supply_fxsave (fxsave, regnum);
+ i387_supply_fxsave (regcache, regnum, fxsave);
if (fxsave)
{
+ const char *regs = fxsave;
+
if (regnum == -1 || regnum == I387_FISEG_REGNUM)
- supply_register (I387_FISEG_REGNUM, fxsave + 12);
+ regcache_raw_supply (regcache, I387_FISEG_REGNUM, regs + 12);
if (regnum == -1 || regnum == I387_FOSEG_REGNUM)
- supply_register (I387_FOSEG_REGNUM, fxsave + 20);
+ regcache_raw_supply (regcache, I387_FOSEG_REGNUM, regs + 20);
}
}
diff --git a/gdb/x86-64-tdep.h b/gdb/x86-64-tdep.h
index 76bb3d3..17d2cdf 100644
--- a/gdb/x86-64-tdep.h
+++ b/gdb/x86-64-tdep.h
@@ -27,6 +27,7 @@
struct gdbarch;
struct frame_info;
+struct regcache;
#include "i386-tdep.h"
@@ -48,12 +49,13 @@ struct frame_info;
void x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch);
-/* Fill register REGNUM in GDB's register cache with the appropriate
+/* Fill register REGNUM in REGCACHE with the appropriate
floating-point or SSE register value from *FXSAVE. If REGNUM is
-1, do this for all registers. This function masks off any of the
reserved bits in *FXSAVE. */
-void x86_64_supply_fxsave (const char *fxsave, int regnum);
+extern void x86_64_supply_fxsave (struct regcache *regcache, int regnum,
+ const void *fxsave);
/* Fill register REGNUM (if it is a floating-point or SSE register) in
*FXSAVE with the value in GDB's register cache. If REGNUM is -1, do
@@ -63,6 +65,9 @@ void x86_64_supply_fxsave (const char *fxsave, int regnum);
void x86_64_fill_fxsave (char *fxsave, int regnum);
+/* Variables exported from amd64nbsd-tdep.c. */
+extern int amd64nbsd_r_reg_offset[];
+
/* Variables exported from amd64fbsd-tdep.c. */
extern CORE_ADDR amd64fbsd_sigtramp_start;
extern CORE_ADDR amd64fbsd_sigtramp_end;
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 05fb159..6183785 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -193,8 +193,6 @@ static void xcoff_symfile_finish (struct objfile *);
static void xcoff_symfile_offsets (struct objfile *,
struct section_addr_info *addrs);
-static void find_linenos (bfd *, sec_ptr, void *);
-
static char *coff_getfilename (union internal_auxent *, struct objfile *);
static void read_symbol (struct internal_syment *, int);
@@ -1699,7 +1697,7 @@ gotit:
* mainline code can read the whole thing for efficiency.
*/
static void
-find_linenos (bfd *abfd, sec_ptr asect, void *vpinfo)
+find_linenos (struct bfd *abfd, struct bfd_section *asect, void *vpinfo)
{
struct coff_symfile_info *info;
int size, count;
@@ -2635,22 +2633,6 @@ scan_xcoff_symtab (struct objfile *objfile)
psymtab_language, objfile);
p += 1;
}
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* The semantics of C++ state that "struct foo { ... }"
-// OBSOLETE also defines a typedef for "foo". Unfortuantely, cfront
-// OBSOLETE never makes the typedef when translating from C++ to C.
-// OBSOLETE We make the typedef here so that "ptype foo" works as
-// OBSOLETE expected for cfront translated code. */
-// OBSOLETE else if (psymtab_language == language_cplus)
-// OBSOLETE {
-// OBSOLETE /* Also a typedef with the same name. */
-// OBSOLETE add_psymbol_to_list (namestring, p - namestring,
-// OBSOLETE VAR_DOMAIN, LOC_TYPEDEF,
-// OBSOLETE &objfile->static_psymbols,
-// OBSOLETE symbol.n_value, 0,
-// OBSOLETE psymtab_language, objfile);
-// OBSOLETE }
-#endif /* OBSOLETE CFront */
}
goto check_enum;
@@ -2799,11 +2781,6 @@ scan_xcoff_symtab (struct objfile *objfile)
case '9':
case '-':
case '#': /* for symbol identification (used in live ranges) */
-#if 0 /* OBSOLETE CFront */
-// OBSOLETE /* added to support cfront stabs strings */
-// OBSOLETE case 'Z': /* for definition continuations */
-// OBSOLETE case 'P': /* for prototypes */
-#endif /* OBSOLETE CFront */
continue;
case ':':
@@ -2902,7 +2879,7 @@ xcoff_initial_scan (struct objfile *objfile, int mainline)
/* Read the .debug section, if present. */
{
- sec_ptr secp;
+ struct bfd_section *secp;
bfd_size_type length;
char *debugsec = NULL;
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 1e86294..e4bebc8 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -230,7 +230,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),
- REGISTER_RAW_SIZE (E_PTR_RET_REGNUM));
+ DEPRECATED_REGISTER_RAW_SIZE (E_PTR_RET_REGNUM));
read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
}
@@ -343,15 +343,15 @@ xstormy16_pop_frame (void)
{
/* Restore the saved regs. */
for (i = 0; i < NUM_REGS; i++)
- if (get_frame_saved_regs (fi)[i])
+ if (deprecated_get_frame_saved_regs (fi)[i])
{
if (i == SP_REGNUM)
- write_register (i, get_frame_saved_regs (fi)[i]);
+ write_register (i, deprecated_get_frame_saved_regs (fi)[i]);
else if (i == E_PC_REGNUM)
- write_register (i, read_memory_integer (get_frame_saved_regs (fi)[i],
+ write_register (i, read_memory_integer (deprecated_get_frame_saved_regs (fi)[i],
xstormy16_pc_size));
else
- write_register (i, read_memory_integer (get_frame_saved_regs (fi)[i],
+ write_register (i, read_memory_integer (deprecated_get_frame_saved_regs (fi)[i],
xstormy16_reg_size));
}
/* Restore the PC */
@@ -492,7 +492,7 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
if (fi)
{
regnum = inst & 0x000f;
- get_frame_saved_regs (fi)[regnum] = get_frame_extra_info (fi)->framesize;
+ deprecated_get_frame_saved_regs (fi)[regnum] = get_frame_extra_info (fi)->framesize;
get_frame_extra_info (fi)->framesize += xstormy16_reg_size;
}
}
@@ -548,7 +548,7 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
if (offset & 0x0800)
offset -= 0x1000;
- get_frame_saved_regs (fi)[regnum] = get_frame_extra_info (fi)->framesize + offset;
+ deprecated_get_frame_saved_regs (fi)[regnum] = get_frame_extra_info (fi)->framesize + offset;
}
next_addr += xstormy16_inst_size;
}
@@ -595,12 +595,12 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
previous value would have been pushed). */
if (get_frame_extra_info (fi)->frameless_p)
{
- get_frame_saved_regs (fi)[E_SP_REGNUM] = sp - get_frame_extra_info (fi)->framesize;
+ deprecated_get_frame_saved_regs (fi)[E_SP_REGNUM] = sp - get_frame_extra_info (fi)->framesize;
deprecated_update_frame_base_hack (fi, sp);
}
else
{
- get_frame_saved_regs (fi)[E_SP_REGNUM] = fp - get_frame_extra_info (fi)->framesize;
+ deprecated_get_frame_saved_regs (fi)[E_SP_REGNUM] = fp - get_frame_extra_info (fi)->framesize;
deprecated_update_frame_base_hack (fi, fp);
}
@@ -609,11 +609,11 @@ xstormy16_scan_prologue (CORE_ADDR start_addr, CORE_ADDR end_addr,
sp, fp and framesize. We know the beginning of the frame
so we can translate the register offsets to real addresses. */
for (regnum = 0; regnum < E_SP_REGNUM; ++regnum)
- if (get_frame_saved_regs (fi)[regnum])
- get_frame_saved_regs (fi)[regnum] += get_frame_saved_regs (fi)[E_SP_REGNUM];
+ if (deprecated_get_frame_saved_regs (fi)[regnum])
+ deprecated_get_frame_saved_regs (fi)[regnum] += deprecated_get_frame_saved_regs (fi)[E_SP_REGNUM];
/* Save address of PC on stack. */
- get_frame_saved_regs (fi)[E_PC_REGNUM] = get_frame_saved_regs (fi)[E_SP_REGNUM];
+ deprecated_get_frame_saved_regs (fi)[E_PC_REGNUM] = deprecated_get_frame_saved_regs (fi)[E_SP_REGNUM];
}
return next_addr;
@@ -733,7 +733,7 @@ xstormy16_frame_init_saved_regs (struct frame_info *fi)
{
CORE_ADDR func_addr, func_end;
- if (!get_frame_saved_regs (fi))
+ if (!deprecated_get_frame_saved_regs (fi))
{
frame_saved_regs_zalloc (fi);
@@ -765,7 +765,7 @@ xstormy16_frame_saved_pc (struct frame_info *fi)
}
else
{
- saved_pc = read_memory_unsigned_integer (get_frame_saved_regs (fi)[E_PC_REGNUM],
+ saved_pc = read_memory_unsigned_integer (deprecated_get_frame_saved_regs (fi)[E_PC_REGNUM],
xstormy16_pc_size);
}
@@ -1026,7 +1026,7 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* NOTE: cagney/2002-12-06: This can be deleted when this arch is
ready to unwind the PC first (see frame.c:get_prev_frame()). */
- set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_default);
+ set_gdbarch_deprecated_init_frame_pc (gdbarch, deprecated_init_frame_pc_default);
/*
* Basic register fields and methods.
diff --git a/gdb/z8k-tdep.c b/gdb/z8k-tdep.c
deleted file mode 100644
index d6d42e3..0000000
--- a/gdb/z8k-tdep.c
+++ /dev/null
@@ -1,535 +0,0 @@
-// OBSOLETE /* Target-machine dependent code for Zilog Z8000, for GDB.
-// OBSOLETE
-// OBSOLETE Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-// OBSOLETE 2002, 2003 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 Contributed by Steve Chamberlain
-// OBSOLETE sac@cygnus.com
-// OBSOLETE */
-// OBSOLETE
-// OBSOLETE #include "defs.h"
-// OBSOLETE #include "frame.h"
-// OBSOLETE #include "symtab.h"
-// OBSOLETE #include "gdbcmd.h"
-// OBSOLETE #include "gdbtypes.h"
-// OBSOLETE #include "dis-asm.h"
-// OBSOLETE #include "gdbcore.h"
-// OBSOLETE #include "regcache.h"
-// OBSOLETE
-// OBSOLETE #include "value.h" /* For read_register() */
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE static int read_memory_pointer (CORE_ADDR x);
-// OBSOLETE
-// OBSOLETE /* Return the saved PC from this frame.
-// OBSOLETE
-// OBSOLETE If the frame has a memory copy of SRP_REGNUM, use that. If not,
-// OBSOLETE just use the register SRP_REGNUM itself. */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE z8k_frame_saved_pc (struct frame_info *frame)
-// OBSOLETE {
-// OBSOLETE return read_memory_pointer (frame->frame + (BIG ? 4 : 2));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #define IS_PUSHL(x) (BIG ? ((x & 0xfff0) == 0x91e0):((x & 0xfff0) == 0x91F0))
-// OBSOLETE #define IS_PUSHW(x) (BIG ? ((x & 0xfff0) == 0x93e0):((x & 0xfff0)==0x93f0))
-// OBSOLETE #define IS_MOVE_FP(x) (BIG ? x == 0xa1ea : x == 0xa1fa)
-// OBSOLETE #define IS_MOV_SP_FP(x) (BIG ? x == 0x94ea : x == 0x0d76)
-// OBSOLETE #define IS_SUB2_SP(x) (x==0x1b87)
-// OBSOLETE #define IS_MOVK_R5(x) (x==0x7905)
-// OBSOLETE #define IS_SUB_SP(x) ((x & 0xffff) == 0x020f)
-// OBSOLETE #define IS_PUSH_FP(x) (BIG ? (x == 0x93ea) : (x == 0x93fa))
-// OBSOLETE
-// OBSOLETE /* work out how much local space is on the stack and
-// OBSOLETE return the pc pointing to the first push */
-// OBSOLETE
-// OBSOLETE static CORE_ADDR
-// OBSOLETE skip_adjust (CORE_ADDR pc, int *size)
-// OBSOLETE {
-// OBSOLETE *size = 0;
-// OBSOLETE
-// OBSOLETE if (IS_PUSH_FP (read_memory_short (pc))
-// OBSOLETE && IS_MOV_SP_FP (read_memory_short (pc + 2)))
-// OBSOLETE {
-// OBSOLETE /* This is a function with an explict frame pointer */
-// OBSOLETE pc += 4;
-// OBSOLETE *size += 2; /* remember the frame pointer */
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* remember any stack adjustment */
-// OBSOLETE if (IS_SUB_SP (read_memory_short (pc)))
-// OBSOLETE {
-// OBSOLETE *size += read_memory_short (pc + 2);
-// OBSOLETE pc += 4;
-// OBSOLETE }
-// OBSOLETE return pc;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static CORE_ADDR examine_frame (CORE_ADDR, CORE_ADDR * regs, CORE_ADDR);
-// OBSOLETE static CORE_ADDR
-// OBSOLETE examine_frame (CORE_ADDR pc, CORE_ADDR *regs, CORE_ADDR sp)
-// OBSOLETE {
-// OBSOLETE int w = read_memory_short (pc);
-// OBSOLETE int offset = 0;
-// OBSOLETE int regno;
-// OBSOLETE
-// OBSOLETE for (regno = 0; regno < NUM_REGS; regno++)
-// OBSOLETE regs[regno] = 0;
-// OBSOLETE
-// OBSOLETE while (IS_PUSHW (w) || IS_PUSHL (w))
-// OBSOLETE {
-// OBSOLETE /* work out which register is being pushed to where */
-// OBSOLETE if (IS_PUSHL (w))
-// OBSOLETE {
-// OBSOLETE regs[w & 0xf] = offset;
-// OBSOLETE regs[(w & 0xf) + 1] = offset + 2;
-// OBSOLETE offset += 4;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE regs[w & 0xf] = offset;
-// OBSOLETE offset += 2;
-// OBSOLETE }
-// OBSOLETE pc += 2;
-// OBSOLETE w = read_memory_short (pc);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if (IS_MOVE_FP (w))
-// OBSOLETE {
-// OBSOLETE /* We know the fp */
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE else if (IS_SUB_SP (w))
-// OBSOLETE {
-// OBSOLETE /* Subtracting a value from the sp, so were in a function
-// OBSOLETE which needs stack space for locals, but has no fp. We fake up
-// OBSOLETE the values as if we had an fp */
-// OBSOLETE regs[FP_REGNUM] = sp;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* This one didn't have an fp, we'll fake it up */
-// OBSOLETE regs[SP_REGNUM] = sp;
-// OBSOLETE }
-// OBSOLETE /* stack pointer contains address of next frame */
-// OBSOLETE /* regs[fp_regnum()] = fp; */
-// OBSOLETE regs[SP_REGNUM] = sp;
-// OBSOLETE return pc;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE z8k_skip_prologue (CORE_ADDR start_pc)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR dummy[NUM_REGS];
-// OBSOLETE
-// OBSOLETE return examine_frame (start_pc, dummy, 0);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE z8k_addr_bits_remove (CORE_ADDR addr)
-// OBSOLETE {
-// OBSOLETE return (addr & PTR_MASK);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static int
-// OBSOLETE read_memory_pointer (CORE_ADDR x)
-// OBSOLETE {
-// OBSOLETE return read_memory_integer (ADDR_BITS_REMOVE (x), BIG ? 4 : 2);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE z8k_frame_chain (struct frame_info *thisframe)
-// OBSOLETE {
-// OBSOLETE if (!inside_entry_file (get_frame_pc (thisframe)))
-// OBSOLETE {
-// OBSOLETE return read_memory_pointer (thisframe->frame);
-// OBSOLETE }
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs,
-// OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO.
-// OBSOLETE This includes special registers such as pc and fp saved in special
-// OBSOLETE ways in the stack frame. sp is even more special:
-// OBSOLETE the address we return for it IS the sp for the next frame. */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE z8k_frame_init_saved_regs (struct frame_info *frame_info)
-// OBSOLETE {
-// OBSOLETE CORE_ADDR pc;
-// OBSOLETE int w;
-// OBSOLETE
-// OBSOLETE frame_saved_regs_zalloc (frame_info);
-// OBSOLETE pc = get_pc_function_start (get_frame_pc (frame_info));
-// OBSOLETE
-// OBSOLETE /* wander down the instruction stream */
-// OBSOLETE examine_frame (pc, frame_info->saved_regs, frame_info->frame);
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE z8k_push_dummy_frame (void)
-// OBSOLETE {
-// OBSOLETE internal_error (__FILE__, __LINE__, "failed internal consistency check");
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE gdb_print_insn_z8k (bfd_vma memaddr, disassemble_info *info)
-// OBSOLETE {
-// OBSOLETE if (BIG)
-// OBSOLETE return print_insn_z8001 (memaddr, info);
-// OBSOLETE else
-// OBSOLETE return print_insn_z8002 (memaddr, info);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Fetch the instruction at ADDR, returning 0 if ADDR is beyond LIM or
-// OBSOLETE is not the address of a valid instruction, the address of the next
-// OBSOLETE instruction beyond ADDR otherwise. *PWORD1 receives the first word
-// OBSOLETE of the instruction. */
-// OBSOLETE
-// OBSOLETE CORE_ADDR
-// OBSOLETE NEXT_PROLOGUE_INSN (CORE_ADDR addr, CORE_ADDR lim, short *pword1)
-// OBSOLETE {
-// OBSOLETE char buf[2];
-// OBSOLETE if (addr < lim + 8)
-// OBSOLETE {
-// OBSOLETE read_memory (addr, buf, 2);
-// OBSOLETE *pword1 = extract_signed_integer (buf, 2);
-// OBSOLETE
-// OBSOLETE return addr + 2;
-// OBSOLETE }
-// OBSOLETE return 0;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE #if 0
-// OBSOLETE /* Put here the code to store, into a struct frame_saved_regs,
-// OBSOLETE the addresses of the saved registers of frame described by FRAME_INFO.
-// OBSOLETE This includes special registers such as pc and fp saved in special
-// OBSOLETE ways in the stack frame. sp is even more special:
-// OBSOLETE the address we return for it IS the sp for the next frame.
-// OBSOLETE
-// OBSOLETE We cache the result of doing this in the frame_cache_obstack, since
-// OBSOLETE it is fairly expensive. */
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE frame_find_saved_regs (struct frame_info *fip, struct frame_saved_regs *fsrp)
-// OBSOLETE {
-// OBSOLETE int locals;
-// OBSOLETE CORE_ADDR pc;
-// OBSOLETE CORE_ADDR adr;
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE memset (fsrp, 0, sizeof *fsrp);
-// OBSOLETE
-// OBSOLETE pc = skip_adjust (get_pc_function_start (get_frame_pc (fip)), &locals);
-// OBSOLETE
-// OBSOLETE {
-// OBSOLETE adr = get_frame_base (fip) - locals;
-// OBSOLETE for (i = 0; i < 8; i++)
-// OBSOLETE {
-// OBSOLETE int word = read_memory_short (pc);
-// OBSOLETE
-// OBSOLETE pc += 2;
-// OBSOLETE if (IS_PUSHL (word))
-// OBSOLETE {
-// OBSOLETE fsrp->regs[word & 0xf] = adr;
-// OBSOLETE fsrp->regs[(word & 0xf) + 1] = adr - 2;
-// OBSOLETE adr -= 4;
-// OBSOLETE }
-// OBSOLETE else if (IS_PUSHW (word))
-// OBSOLETE {
-// OBSOLETE fsrp->regs[word & 0xf] = adr;
-// OBSOLETE adr -= 2;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE break;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE fsrp->regs[PC_REGNUM] = fip->frame + 4;
-// OBSOLETE fsrp->regs[FP_REGNUM] = fip->frame;
-// OBSOLETE
-// OBSOLETE }
-// OBSOLETE #endif
-// OBSOLETE
-// OBSOLETE int
-// OBSOLETE z8k_saved_pc_after_call (struct frame_info *frame)
-// OBSOLETE {
-// OBSOLETE return ADDR_BITS_REMOVE
-// OBSOLETE (read_memory_integer (read_register (SP_REGNUM), PTR_SIZE));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE extract_return_value (struct type *type, char *regbuf, char *valbuf)
-// OBSOLETE {
-// OBSOLETE int b;
-// OBSOLETE int len = TYPE_LENGTH (type);
-// OBSOLETE
-// OBSOLETE for (b = 0; b < len; b += 2)
-// OBSOLETE {
-// OBSOLETE int todo = len - b;
-// OBSOLETE
-// OBSOLETE if (todo > 2)
-// OBSOLETE todo = 2;
-// OBSOLETE memcpy (valbuf + b, regbuf + b, todo);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE write_return_value (struct type *type, char *valbuf)
-// OBSOLETE {
-// OBSOLETE int reg;
-// OBSOLETE int len;
-// OBSOLETE
-// OBSOLETE for (len = 0; len < TYPE_LENGTH (type); len += 2)
-// OBSOLETE deprecated_write_register_bytes (REGISTER_BYTE (len / 2 + 2),
-// OBSOLETE valbuf + len, 2);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
-// OBSOLETE {
-// OBSOLETE write_register (2, addr);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE z8k_print_register_hook (int regno)
-// OBSOLETE {
-// OBSOLETE if ((regno & 1) == 0 && regno < 16)
-// OBSOLETE {
-// OBSOLETE unsigned char l[4];
-// OBSOLETE
-// OBSOLETE frame_register_read (deprecated_selected_frame, regno, l + 0);
-// OBSOLETE frame_register_read (deprecated_selected_frame, regno + 1, l + 2);
-// OBSOLETE printf_unfiltered ("\t");
-// OBSOLETE printf_unfiltered ("0x%02x%02x%02x%02x", l[0], l[1], l[2], l[3]);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE if ((regno & 3) == 0 && regno < 16)
-// OBSOLETE {
-// OBSOLETE unsigned char l[8];
-// OBSOLETE
-// OBSOLETE frame_register_read (deprecated_selected_frame, regno, l + 0);
-// OBSOLETE frame_register_read (deprecated_selected_frame, regno + 1, l + 2);
-// OBSOLETE frame_register_read (deprecated_selected_frame, regno + 2, l + 4);
-// OBSOLETE frame_register_read (deprecated_selected_frame, regno + 3, l + 6);
-// OBSOLETE
-// OBSOLETE printf_unfiltered ("\t");
-// OBSOLETE printf_unfiltered ("0x%02x%02x%02x%02x%02x%02x%02x%02x",
-// OBSOLETE l[0], l[1], l[2], l[3], l[4], l[5], l[6], l[7]);
-// OBSOLETE }
-// OBSOLETE if (regno == 15)
-// OBSOLETE {
-// OBSOLETE unsigned short rval;
-// OBSOLETE int i;
-// OBSOLETE
-// OBSOLETE frame_register_read (deprecated_selected_frame, regno, (char *) (&rval));
-// OBSOLETE
-// OBSOLETE printf_unfiltered ("\n");
-// OBSOLETE for (i = 0; i < 10; i += 2)
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("(sp+%d=%04x)", i,
-// OBSOLETE (unsigned int)read_memory_short (rval + i));
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE z8k_print_registers_info (struct gdbarch *gdbarch,
-// OBSOLETE struct ui_file *file,
-// OBSOLETE struct frame_info *frame,
-// OBSOLETE int regnum, int print_all)
-// OBSOLETE {
-// OBSOLETE int i;
-// OBSOLETE const int numregs = NUM_REGS + NUM_PSEUDO_REGS;
-// OBSOLETE char *raw_buffer = alloca (MAX_REGISTER_RAW_SIZE);
-// OBSOLETE char *virtual_buffer = alloca (MAX_REGISTER_VIRTUAL_SIZE);
-// OBSOLETE
-// OBSOLETE for (i = 0; i < numregs; i++)
-// OBSOLETE {
-// OBSOLETE /* Decide between printing all regs, non-float / vector regs, or
-// OBSOLETE specific reg. */
-// OBSOLETE if (regnum == -1)
-// OBSOLETE {
-// OBSOLETE if (!print_all)
-// OBSOLETE {
-// OBSOLETE if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
-// OBSOLETE continue;
-// OBSOLETE if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)))
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE if (i != regnum)
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* If the register name is empty, it is undefined for this
-// OBSOLETE processor, so don't display anything. */
-// OBSOLETE if (REGISTER_NAME (i) == NULL || *(REGISTER_NAME (i)) == '\0')
-// OBSOLETE continue;
-// OBSOLETE
-// OBSOLETE fputs_filtered (REGISTER_NAME (i), file);
-// OBSOLETE print_spaces_filtered (15 - strlen (REGISTER_NAME (i)), file);
-// OBSOLETE
-// OBSOLETE /* Get the data in raw format. */
-// OBSOLETE if (! frame_register_read (frame, i, raw_buffer))
-// OBSOLETE {
-// OBSOLETE fprintf_filtered (file, "*value not available*\n");
-// OBSOLETE continue;
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* FIXME: cagney/2002-08-03: This code shouldn't be necessary.
-// OBSOLETE The function frame_register_read() should have returned the
-// OBSOLETE pre-cooked register so no conversion is necessary. */
-// OBSOLETE /* Convert raw data to virtual format if necessary. */
-// OBSOLETE if (REGISTER_CONVERTIBLE (i))
-// OBSOLETE {
-// OBSOLETE REGISTER_CONVERT_TO_VIRTUAL (i, REGISTER_VIRTUAL_TYPE (i),
-// OBSOLETE raw_buffer, virtual_buffer);
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE memcpy (virtual_buffer, raw_buffer,
-// OBSOLETE REGISTER_VIRTUAL_SIZE (i));
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* If virtual format is floating, print it that way, and in raw
-// OBSOLETE hex. */
-// OBSOLETE if (TYPE_CODE (REGISTER_VIRTUAL_TYPE (i)) == TYPE_CODE_FLT)
-// OBSOLETE {
-// OBSOLETE int j;
-// OBSOLETE
-// OBSOLETE val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-// OBSOLETE file, 0, 1, 0, Val_pretty_default);
-// OBSOLETE
-// OBSOLETE fprintf_filtered (file, "\t(raw 0x");
-// OBSOLETE for (j = 0; j < REGISTER_RAW_SIZE (i); j++)
-// OBSOLETE {
-// OBSOLETE int idx;
-// OBSOLETE if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-// OBSOLETE idx = j;
-// OBSOLETE else
-// OBSOLETE idx = REGISTER_RAW_SIZE (i) - 1 - j;
-// OBSOLETE fprintf_filtered (file, "%02x", (unsigned char) raw_buffer[idx]);
-// OBSOLETE }
-// OBSOLETE fprintf_filtered (file, ")");
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE /* Print the register in hex. */
-// OBSOLETE val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-// OBSOLETE file, 'x', 1, 0, Val_pretty_default);
-// OBSOLETE /* If not a vector register, print it also according to its
-// OBSOLETE natural format. */
-// OBSOLETE if (TYPE_VECTOR (REGISTER_VIRTUAL_TYPE (i)) == 0)
-// OBSOLETE {
-// OBSOLETE fprintf_filtered (file, "\t");
-// OBSOLETE val_print (REGISTER_VIRTUAL_TYPE (i), virtual_buffer, 0, 0,
-// OBSOLETE file, 0, 1, 0, Val_pretty_default);
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE /* Some z8k specific info. */
-// OBSOLETE z8k_print_register_hook (i);
-// OBSOLETE
-// OBSOLETE fprintf_filtered (file, "\n");
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE z8k_do_registers_info (int regnum, int all)
-// OBSOLETE {
-// OBSOLETE z8k_print_registers_info (current_gdbarch, gdb_stdout,
-// OBSOLETE deprecated_selected_frame, regnum, all);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE z8k_pop_frame (void)
-// OBSOLETE {
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE struct cmd_list_element *setmemorylist;
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE z8k_set_pointer_size (int newsize)
-// OBSOLETE {
-// OBSOLETE static int oldsize = 0;
-// OBSOLETE
-// OBSOLETE if (oldsize != newsize)
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("pointer size set to %d bits\n", newsize);
-// OBSOLETE oldsize = newsize;
-// OBSOLETE if (newsize == 32)
-// OBSOLETE {
-// OBSOLETE BIG = 1;
-// OBSOLETE }
-// OBSOLETE else
-// OBSOLETE {
-// OBSOLETE BIG = 0;
-// OBSOLETE }
-// OBSOLETE /* FIXME: This code should be using the GDBARCH framework to
-// OBSOLETE handle changed type sizes. If this problem is ever fixed
-// OBSOLETE (the direct reference to _initialize_gdbtypes() below
-// OBSOLETE eliminated) then Makefile.in should be updated so that
-// OBSOLETE z8k-tdep.c is again compiled with -Werror. */
-// OBSOLETE _initialize_gdbtypes ();
-// OBSOLETE }
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE segmented_command (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE z8k_set_pointer_size (32);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE unsegmented_command (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE z8k_set_pointer_size (16);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE static void
-// OBSOLETE set_memory (char *args, int from_tty)
-// OBSOLETE {
-// OBSOLETE printf_unfiltered ("\"set memory\" must be followed by the name of a memory subcommand.\n");
-// OBSOLETE help_list (setmemorylist, "set memory ", -1, gdb_stdout);
-// OBSOLETE }
-// OBSOLETE
-// OBSOLETE void
-// OBSOLETE _initialize_z8ktdep (void)
-// OBSOLETE {
-// OBSOLETE tm_print_insn = gdb_print_insn_z8k;
-// OBSOLETE
-// OBSOLETE add_prefix_cmd ("memory", no_class, set_memory,
-// OBSOLETE "set the memory model", &setmemorylist, "set memory ", 0,
-// OBSOLETE &setlist);
-// OBSOLETE add_cmd ("segmented", class_support, segmented_command,
-// OBSOLETE "Set segmented memory model.", &setmemorylist);
-// OBSOLETE add_cmd ("unsegmented", class_support, unsegmented_command,
-// OBSOLETE "Set unsegmented memory model.", &setmemorylist);
-// OBSOLETE
-// OBSOLETE }
diff --git a/include/ChangeLog b/include/ChangeLog
index 331aef1..9fa8373 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,8 +1,53 @@
+2003-11-06 Bruno Rohee <bruno@rohee.com>
+
+ * hp-symtab.h: Fix "the the" typo.
+
+2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bfdlink.h (bfd_elf_version_expr): Add "symbol" and remove
+ "wildcard".
+
+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-10-22 Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (struct bfd_elf_version_expr): Remove match field.
+ Add wildcard and mask fields.
+ (BFD_ELF_VERSION_C_TYPE): Define.
+ (BFD_ELF_VERSION_CXX_TYPE): Likewise.
+ (BFD_ELF_VERSION_JAVA_TYPE): Likewise.
+ (struct bfd_elf_version_expr_head): New.
+ (struct bfd_elf_version_tree): Add match field.
+ Change type of globals and locals fields
+ to struct bfd_elf_version_expr_head.
+
+2003-10-14 Bob Wilson <bob.wilson@acm.org>
+
+ * elf/xtensa.h: Formatting. Fix comments about property section
+ names for linkonce sections.
+
+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.
diff --git a/include/bfdlink.h b/include/bfdlink.h
index c174dcd..75ea39d 100644
--- a/include/bfdlink.h
+++ b/include/bfdlink.h
@@ -617,20 +617,37 @@ extern struct bfd_link_order *bfd_new_link_order (bfd *, asection *);
BFD, but it would be a pain. Instead, the regular linker sets up
these structures, and then passes them into BFD. */
-/* Regular expressions for a version. */
+/* Glob pattern for a version. */
struct bfd_elf_version_expr
{
- /* Next regular expression for this version. */
+ /* Next glob pattern for this version. */
struct bfd_elf_version_expr *next;
- /* Regular expression. */
+ /* Glob pattern. */
const char *pattern;
- /* Matching function. */
- int (*match) (struct bfd_elf_version_expr *, const char *);
+ /* NULL for a glob pattern, otherwise a straight symbol. */
+ const char *symbol;
/* Defined by ".symver". */
- unsigned int symver: 1;
+ unsigned int symver : 1;
/* Defined by version script. */
unsigned int script : 1;
+ /* Pattern type. */
+#define BFD_ELF_VERSION_C_TYPE 1
+#define BFD_ELF_VERSION_CXX_TYPE 2
+#define BFD_ELF_VERSION_JAVA_TYPE 4
+ unsigned int mask : 3;
+};
+
+struct bfd_elf_version_expr_head
+{
+ /* List of all patterns, both wildcards and non-wildcards. */
+ struct bfd_elf_version_expr *list;
+ /* Hash table for non-wildcards. */
+ void *htab;
+ /* Remaining patterns. */
+ struct bfd_elf_version_expr *remaining;
+ /* What kind of pattern types are present in list (bitmask). */
+ unsigned int mask;
};
/* Version dependencies. */
@@ -654,15 +671,19 @@ struct bfd_elf_version_tree
/* Version number. */
unsigned int vernum;
/* Regular expressions for global symbols in this version. */
- struct bfd_elf_version_expr *globals;
+ struct bfd_elf_version_expr_head globals;
/* Regular expressions for local symbols in this version. */
- struct bfd_elf_version_expr *locals;
+ struct bfd_elf_version_expr_head locals;
/* List of versions which this version depends upon. */
struct bfd_elf_version_deps *deps;
/* Index of the version name. This is used within BFD. */
unsigned int name_indx;
/* Whether this version tree was used. This is used within BFD. */
int used;
+ /* Matching hook. */
+ struct bfd_elf_version_expr *(*match)
+ (struct bfd_elf_version_expr_head *head,
+ struct bfd_elf_version_expr *prev, const char *sym);
};
#endif
diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index 02f2052..c8e4d95 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,37 @@
+2003-11-06 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h (R_PPC_RELAX32PC): Define.
+
+2003-10-22 Alexandre Oliva <aoliva@redhat.com>,
+ Michael Snyder <msnyder@redhat.com>
+
+ * sh.h (EF_SH4A, EF_SH4AL_DSP, EF_SH4_NOFPU, EF_SH4A_NOFPU): New.
+ (EF_SH_MERGE_MACH): Combine them.
+
+2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * mmix.h (R_MMIX_PUSHJ_STUBBABLE): New reloc number.
+ (_bfd_mmix_before_linker_allocation): Rename from
+ _bfd_mmix_prepare_linker_allocated_gregs.
+ (_bfd_mmix_after_linker_allocation): Rename from
+ _bfd_mmix_finalize_linker_allocated_gregs.
+
+2003-10-06 Dave Brolley <brolley@redhat.com>
+
+ * frv.h (EF_FRV_CPU_FR550): New macro.
+
+2003-09-30 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (E_MIPS_ARCH_64R2): New define.
+
+2003-09-23 DJ Delorie <dj@redhat.com>
+
+ * sh.h (R_SH_SWITCH8, R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
+ R_SH_LOOP_START,R_SH_LOOP_END): Move to "reserved" spaces.
+ (R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
+ R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
+ R_SH_PSHA, R_SH_PSHL): New.
+
2003-09-11 James Cownie <jcownie@etnus.com>
* dwarf2.h: Add HP dwarf extensions from their hacked gdb
@@ -10,9 +44,9 @@
2003-08-21 James Cownie <jcownie@etnus.com>
* dwarf2.h: Add PGI dwarf extensions.
-
+
2003-08-08 Dmitry Diky <diwil@mail.ru>
-
+
* msp430.h: Add xW42 and xE42 parts. Sort MPU list according to
gcc order.
@@ -74,7 +108,7 @@
2003-06-03 Nick Clifton <nickc@redhat.com>
* v850.h (R_V850_32): Rename to R_V850_ABS32.
- Add R_V850_REL32.
+ Add R_V850_REL32.
2003-05-15 Roland McGrath <roland@redhat.com>
@@ -105,8 +139,8 @@
2003-04-01 Bob Wilson <bob.wilson@acm.org>
- * elf/common.h (EM_XTENSA_OLD): Define.
- * elf/xtensa.h: New file.
+ * elf/common.h (EM_XTENSA_OLD): Define.
+ * elf/xtensa.h: New file.
2003-04-01 Nick Clifton <nickc@redhat.com>
diff --git a/include/elf/frv.h b/include/elf/frv.h
index 65ce97d..08def62 100644
--- a/include/elf/frv.h
+++ b/include/elf/frv.h
@@ -75,6 +75,7 @@ END_RELOC_NUMBERS(R_FRV_max)
#define EF_FRV_CPU_SIMPLE 0x03000000 /* SIMPLE */
#define EF_FRV_CPU_TOMCAT 0x04000000 /* Tomcat, FR500 prototype */
#define EF_FRV_CPU_FR400 0x05000000 /* FRV400 */
+#define EF_FRV_CPU_FR550 0x06000000 /* FRV550 */
/* Mask of PIC related bits */
#define EF_FRV_PIC_FLAGS (EF_FRV_PIC | EF_FRV_LIBPIC | EF_FRV_BIGPIC)
diff --git a/include/elf/mips.h b/include/elf/mips.h
index 4b36ff7..ce43158 100644
--- a/include/elf/mips.h
+++ b/include/elf/mips.h
@@ -151,6 +151,9 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
/* -mips32r2 code. */
#define E_MIPS_ARCH_32R2 0x70000000
+/* -mips64r2 code. */
+#define E_MIPS_ARCH_64R2 0x80000000
+
/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
#define EF_MIPS_ABI 0x0000F000
diff --git a/include/elf/mmix.h b/include/elf/mmix.h
index fef3e91..89778e4 100644
--- a/include/elf/mmix.h
+++ b/include/elf/mmix.h
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "elf/reloc-macros.h"
-/* Relocations. */
+/* Relocations. See the reloc table in bfd/elf64-mmix.c for details. */
START_RELOC_NUMBERS (elf_mmix_reloc_type)
RELOC_NUMBER (R_MMIX_NONE, 0)
@@ -90,6 +90,9 @@ START_RELOC_NUMBERS (elf_mmix_reloc_type)
/* A LOCAL assertion. */
RELOC_NUMBER (R_MMIX_LOCAL, 35)
+
+ /* A PUSHJ instruction, generating a stub if it does not reach. */
+ RELOC_NUMBER (R_MMIX_PUSHJ_STUBBABLE, 36)
END_RELOC_NUMBERS (R_MMIX_max)
@@ -157,9 +160,9 @@ END_RELOC_NUMBERS (R_MMIX_max)
#define MMO_SEC_DEBUGGING 0x10000
#ifdef BFD_ARCH_SIZE
-extern bfd_boolean _bfd_mmix_prepare_linker_allocated_gregs
+extern bfd_boolean _bfd_mmix_before_linker_allocation
(bfd *, struct bfd_link_info *);
-extern bfd_boolean _bfd_mmix_finalize_linker_allocated_gregs
+extern bfd_boolean _bfd_mmix_after_linker_allocation
(bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_mmix_check_all_relocs
(bfd *, struct bfd_link_info *);
diff --git a/include/elf/ppc.h b/include/elf/ppc.h
index 54914e3..b510f44 100644
--- a/include/elf/ppc.h
+++ b/include/elf/ppc.h
@@ -120,9 +120,10 @@ START_RELOC_NUMBERS (elf_ppc_reloc_type)
RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115)
RELOC_NUMBER (R_PPC_EMB_RELSDA, 116)
-/* Fake relocation for branch stubs. This will keep them
+/* Fake relocations for branch stubs. This will keep them
together. */
#define R_PPC_RELAX32 251
+#define R_PPC_RELAX32PC 252
/* These are GNU extensions to enable C++ vtable garbage collection. */
RELOC_NUMBER (R_PPC_GNU_VTINHERIT, 253)
diff --git a/include/elf/sh.h b/include/elf/sh.h
index 00a5f2a..15d460d 100644
--- a/include/elf/sh.h
+++ b/include/elf/sh.h
@@ -27,13 +27,18 @@
#define EF_SH1 1
#define EF_SH2 2
#define EF_SH3 3
-#define EF_SH_HAS_DSP(flags) ((flags) & 4)
+#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_SH4_NOFPU 0x10
+#define EF_SH4A_NOFPU 0x11
/* This one can only mix in objects from other EF_SH5 objects. */
#define EF_SH5 10
@@ -56,6 +61,20 @@
: (((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)))
@@ -83,8 +102,8 @@
#include "elf/reloc-macros.h"
/* Relocations. */
-/* Relocations 25ff are GNU extensions.
- 25..33 are used for relaxation and use the same constants as COFF uses. */
+/* Relocations 10-32 and 128-255 are GNU extensions.
+ 25..32 and 10 are used for relaxation. */
START_RELOC_NUMBERS (elf_sh_reloc_type)
RELOC_NUMBER (R_SH_NONE, 0)
RELOC_NUMBER (R_SH_DIR32, 1)
@@ -96,8 +115,16 @@ START_RELOC_NUMBERS (elf_sh_reloc_type)
RELOC_NUMBER (R_SH_DIR8BP, 7)
RELOC_NUMBER (R_SH_DIR8W, 8)
RELOC_NUMBER (R_SH_DIR8L, 9)
- FAKE_RELOC (R_SH_FIRST_INVALID_RELOC, 10)
- FAKE_RELOC (R_SH_LAST_INVALID_RELOC, 24)
+
+ RELOC_NUMBER (R_SH_LOOP_START, 10)
+ RELOC_NUMBER (R_SH_LOOP_END, 11)
+
+ FAKE_RELOC (R_SH_FIRST_INVALID_RELOC, 12)
+ FAKE_RELOC (R_SH_LAST_INVALID_RELOC, 21)
+
+ RELOC_NUMBER (R_SH_GNU_VTINHERIT, 22)
+ RELOC_NUMBER (R_SH_GNU_VTENTRY, 23)
+ RELOC_NUMBER (R_SH_SWITCH8, 24)
RELOC_NUMBER (R_SH_SWITCH16, 25)
RELOC_NUMBER (R_SH_SWITCH32, 26)
RELOC_NUMBER (R_SH_USES, 27)
@@ -106,13 +133,19 @@ START_RELOC_NUMBERS (elf_sh_reloc_type)
RELOC_NUMBER (R_SH_CODE, 30)
RELOC_NUMBER (R_SH_DATA, 31)
RELOC_NUMBER (R_SH_LABEL, 32)
- RELOC_NUMBER (R_SH_SWITCH8, 33)
- RELOC_NUMBER (R_SH_GNU_VTINHERIT, 34)
- RELOC_NUMBER (R_SH_GNU_VTENTRY, 35)
- RELOC_NUMBER (R_SH_LOOP_START, 36)
- RELOC_NUMBER (R_SH_LOOP_END, 37)
- FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_2, 38)
- FAKE_RELOC (R_SH_LAST_INVALID_RELOC_2, 44)
+
+ RELOC_NUMBER (R_SH_DIR16, 33)
+ RELOC_NUMBER (R_SH_DIR8, 34)
+ RELOC_NUMBER (R_SH_DIR8UL, 35)
+ RELOC_NUMBER (R_SH_DIR8UW, 36)
+ RELOC_NUMBER (R_SH_DIR8U, 37)
+ RELOC_NUMBER (R_SH_DIR8SW, 38)
+ RELOC_NUMBER (R_SH_DIR8S, 39)
+ RELOC_NUMBER (R_SH_DIR4UL, 40)
+ RELOC_NUMBER (R_SH_DIR4UW, 41)
+ RELOC_NUMBER (R_SH_DIR4U, 42)
+ RELOC_NUMBER (R_SH_PSHA, 43)
+ RELOC_NUMBER (R_SH_PSHL, 44)
RELOC_NUMBER (R_SH_DIR5U, 45)
RELOC_NUMBER (R_SH_DIR6U, 46)
RELOC_NUMBER (R_SH_DIR6S, 47)
@@ -120,7 +153,10 @@ START_RELOC_NUMBERS (elf_sh_reloc_type)
RELOC_NUMBER (R_SH_DIR10SW, 49)
RELOC_NUMBER (R_SH_DIR10SL, 50)
RELOC_NUMBER (R_SH_DIR10SQ, 51)
- FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_3, 52)
+ FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_2, 52)
+ FAKE_RELOC (R_SH_LAST_INVALID_RELOC_2, 52)
+ RELOC_NUMBER (R_SH_DIR16S, 53)
+ FAKE_RELOC (R_SH_FIRST_INVALID_RELOC_3, 54)
FAKE_RELOC (R_SH_LAST_INVALID_RELOC_3, 143)
RELOC_NUMBER (R_SH_TLS_GD_32, 144)
RELOC_NUMBER (R_SH_TLS_LD_32, 145)
diff --git a/include/elf/xtensa.h b/include/elf/xtensa.h
index 394ee41..6c584c7 100644
--- a/include/elf/xtensa.h
+++ b/include/elf/xtensa.h
@@ -16,7 +16,8 @@
You should have received a copy of the GNU General Public 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. */
/* This file holds definitions specific to the Xtensa ELF ABI. */
@@ -68,8 +69,8 @@ END_RELOC_NUMBERS (R_XTENSA_max)
/* Definitions for instruction and literal property tables. The
- instruction tables for ".gnu.linkonce.t.*" sections are placed in
- the following sections:
+ tables for ".gnu.linkonce.*" sections are placed in the following
+ sections:
instruction tables: .gnu.linkonce.x.*
literal tables: .gnu.linkonce.p.*
diff --git a/include/floatformat.h b/include/floatformat.h
index 3d0fd7a..a8244ad 100644
--- a/include/floatformat.h
+++ b/include/floatformat.h
@@ -80,6 +80,9 @@ struct floatformat
/* Internal name for debugging. */
const char *name;
+
+ /* Validator method. */
+ int (*is_valid) PARAMS ((const struct floatformat *fmt, const char *from));
};
/* floatformats for IEEE single and double, big and little endian. */
diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog
index 79c8178..3a17b1d 100644
--- a/include/gdb/ChangeLog
+++ b/include/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2003-10-31 Kevin Buettner <kevin@redhat.com>
+
+ * sim-frv.h: New file.
+
+2003-10-15 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * callback.h (struct host_callback_struct): New members ftruncate
+ and truncate.
+
2003-06-10 Corinna Vinschen <vinschen@redhat.com>
* gdb/fileio.h: New file.
diff --git a/include/gdb/callback.h b/include/gdb/callback.h
index 3075284..3fa4191 100644
--- a/include/gdb/callback.h
+++ b/include/gdb/callback.h
@@ -93,6 +93,8 @@ struct host_callback_struct
void (*flush_stderr) PARAMS ((host_callback *));
int (*stat) PARAMS ((host_callback *, const char *, struct stat *));
int (*fstat) PARAMS ((host_callback *, int, struct stat *));
+ int (*ftruncate) PARAMS ((host_callback *, int, long));
+ int (*truncate) PARAMS ((host_callback *, const char *, long));
/* When present, call to the client to give it the oportunity to
poll any io devices for a request to quit (indicated by a nonzero
diff --git a/include/hp-symtab.h b/include/hp-symtab.h
index 0c9a48a..6267d55 100644
--- a/include/hp-symtab.h
+++ b/include/hp-symtab.h
@@ -4,7 +4,7 @@
Written by the Center for Software Science at the University of Utah
and by Cygnus Support.
- Copyright 1994, 1995, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999, 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
@@ -191,11 +191,11 @@ typedef union dnttpointer
#define SLTNIL (-1)
typedef int sltpointer;
-/* Index into DOC (= "Debugging Optimized Code") line table */
+/* Index into DOC (= "Debugging Optimized Code") line table. */
#define LTNIL (-1)
typedef int ltpointer;
-/* Index into context table */
+/* Index into context table. */
#define CTXTNIL (-1)
typedef int ctxtpointer;
@@ -371,7 +371,7 @@ struct dntt_type_module
ADDRESS points to an SLT entry from which line number and code locations
may be determined.
- ENTRYADDR is the memory address corresponding the the function's entry point
+ ENTRYADDR is the memory address corresponding the function's entry point
RETVAL points to a LNTT entry describing the function's return value.
@@ -633,18 +633,16 @@ struct dntt_type_type
{
unsigned int extension: 1;
unsigned int kind: 10; /* DNTT_TYPE_TYPEDEF or
- DNTT_TYPE_TAGDEF
- */
+ DNTT_TYPE_TAGDEF. */
unsigned int global: 1;
unsigned int typeinfo: 1;
unsigned int unused: 19;
vtpointer name;
dnttpointer type; /* Underlying type, which for TAGDEF's may be
- * DNTT_TYPE_STRUCT, DNTT_TYPE_UNION,
- * DNTT_TYPE_ENUM, or DNTT_TYPE_CLASS.
- * For TYPEDEF's other underlying types
- * are also possible.
- */
+ DNTT_TYPE_STRUCT, DNTT_TYPE_UNION,
+ DNTT_TYPE_ENUM, or DNTT_TYPE_CLASS.
+ For TYPEDEF's other underlying types
+ are also possible. */
};
/* DNTT_TYPE_POINTER:
@@ -737,7 +735,7 @@ struct dntt_type_set
00 for a constant lower bound (found in LOWBOUND).
- 01 for a dynamic lower bound with the lower bound found in the the
+ 01 for a dynamic lower bound with the lower bound found in the
memory address pointed to by LOWBOUND.
10 for a dynamic lower bound described by an variable found in the
@@ -934,10 +932,10 @@ struct dntt_type_functype
infers the "with" semantics when it sees a "this" argument to the member
function. So GDB can safely ignore the DNTT_TYPE_WITH record.
- A DNTT_TYPE_WITH has a matching DNTT_TYPE_END symbol
- */
+ A DNTT_TYPE_WITH has a matching DNTT_TYPE_END symbol. */
-struct dntt_type_with {
+struct dntt_type_with
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* always DNTT_TYPE_WITH */
unsigned int addrtype: 2; /* 0 => STATTYPE */
@@ -994,86 +992,86 @@ struct dntt_type_with {
CLASS_SCOPE is what is used to indicate it is really a method.
- A DNTT_TYPE_CLASS_SCOPE symbol must have a matching DNTT_TYPE_END symbol
-*/
+ A DNTT_TYPE_CLASS_SCOPE symbol must have a matching DNTT_TYPE_END symbol. */
-struct dntt_type_class_scope {
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_CLASS_SCOPE */
+struct dntt_type_class_scope
+{
+ unsigned int extension: 1; /* Always zero. */
+ unsigned int kind: 10; /* Always DNTT_TYPE_CLASS_SCOPE. */
unsigned int unused: 21;
- sltpointer address ; /* pointer to SLT entry */
- dnttpointer type ; /* pointer to class type DNTT */
+ sltpointer address ; /* Pointer to SLT entry. */
+ dnttpointer type ; /* Pointer to class type DNTT. */
};
/* C++ reference parameter.
The structure of this record is the same as DNTT_TYPE_POINTER -
- refer to struct dntt_type_pointer.
- */
+ refer to struct dntt_type_pointer. */
/* The next two describe C++ pointer-to-data-member type, and
pointer-to-member-function type, respectively.
- DNTT_TYPE_PTRMEM and DNTT_TYPE_PTRMEMFUNC have the same structure
- */
+ DNTT_TYPE_PTRMEM and DNTT_TYPE_PTRMEMFUNC have the same structure. */
-struct dntt_type_ptrmem {
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_PTRMEM */
+struct dntt_type_ptrmem
+{
+ unsigned int extension: 1; /* Always zero. */
+ unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEM. */
unsigned int unused: 21;
- dnttpointer pointsto ; /* pointer to class DNTT */
- dnttpointer memtype ; /* type of member */
+ dnttpointer pointsto ; /* Pointer to class DNTT. */
+ dnttpointer memtype ; /* Type of member. */
};
-struct dntt_type_ptrmemfunc {
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_PTRMEMFUNC */
+struct dntt_type_ptrmemfunc
+{
+ unsigned int extension: 1; /* Always zero. */
+ unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEMFUNC. */
unsigned int unused: 21;
- dnttpointer pointsto ; /* pointer to class DNTT */
- dnttpointer memtype ; /* type of member */
+ dnttpointer pointsto ; /* Pointer to class DNTT. */
+ dnttpointer memtype ; /* Type of member. */
};
/* The DNTT_TYPE_CLASS symbol is emitted to describe a class type.
- * "memberlist" points to a chained list of FIELD or GENFIELD records
- * indicating the class members. "parentlist" points to a chained list
- * of INHERITANCE records indicating classes from which we inherit
- * fields.
- */
+ "memberlist" points to a chained list of FIELD or GENFIELD records
+ indicating the class members. "parentlist" points to a chained list
+ of INHERITANCE records indicating classes from which we inherit
+ fields. */
struct dntt_type_class
{
- unsigned int extension: 1; /* always 0 */
- unsigned int kind: 10; /* always DNTT_TYPE_CLASS */
- unsigned int abstract: 1; /* is this an abstract class? */
- unsigned int class_decl: 2; /* 0=class,1=union,2=struct */
- unsigned int expansion: 1; /* 1=template expansion */
+ unsigned int extension: 1; /* Always zero. */
+ unsigned int kind: 10; /* Always DNTT_TYPE_CLASS. */
+ unsigned int abstract: 1; /* Is this an abstract class? */
+ unsigned int class_decl: 2; /* 0=class,1=union,2=struct. */
+ unsigned int expansion: 1; /* 1=template expansion. */
unsigned int unused: 17;
- dnttpointer memberlist ; /* ptr to chain of [GEN]FIELDs */
- unsigned long vtbl_loc ; /* offset in obj of ptr to vtbl */
- dnttpointer parentlist ; /* ptr to K_INHERITANCE list */
- unsigned long bitlength ; /* total at this level */
- dnttpointer identlist ; /* ptr to chain of class ident's */
- dnttpointer friendlist ; /* ptr to K_FRIEND list */
- dnttpointer templateptr ; /* ptr to template */
- dnttpointer nextexp ; /* ptr to next expansion */
+ dnttpointer memberlist ; /* Ptr to chain of [GEN]FIELDs. */
+ unsigned long vtbl_loc ; /* Offset in obj of ptr to vtbl. */
+ dnttpointer parentlist ; /* Ptr to K_INHERITANCE list. */
+ unsigned long bitlength ; /* Total at this level. */
+ dnttpointer identlist ; /* Ptr to chain of class ident's. */
+ dnttpointer friendlist ; /* Ptr to K_FRIEND list. */
+ dnttpointer templateptr ; /* Ptr to template. */
+ dnttpointer nextexp ; /* Ptr to next expansion. */
};
/* Class members are indicated via either the FIELD record (for
data members, same as for C struct fields), or by the GENFIELD record
- (for member functions).
- */
+ (for member functions). */
-struct dntt_type_genfield {
- unsigned int extension: 1; /* always zero */
- unsigned int kind: 10; /* always DNTT_TYPE_GENFIELD */
- unsigned int visibility: 2; /* pub = 0, prot = 1, priv = 2 */
- unsigned int a_union: 1; /* 1 => anonymous union member */
+struct dntt_type_genfield
+{
+ unsigned int extension: 1; /* Always zero. */
+ unsigned int kind: 10; /* Always DNTT_TYPE_GENFIELD. */
+ unsigned int visibility: 2; /* Pub = 0, prot = 1, priv = 2. */
+ unsigned int a_union: 1; /* 1 => anonymous union member. */
unsigned int unused: 18;
- dnttpointer field ; /* pointer to field or qualifier */
- dnttpointer nextfield ; /* pointer to next field */
+ dnttpointer field ; /* Pointer to field or qualifier. */
+ dnttpointer nextfield ; /* Pointer to next field. */
};
-/* C++ virtual functions */
+/* C++ virtual functions. */
-struct dntt_type_vfunc {
+struct dntt_type_vfunc
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* always DNTT_TYPE_VFUNC */
unsigned int pure: 1; /* pure virtual function ? */
@@ -1082,9 +1080,10 @@ struct dntt_type_vfunc {
unsigned long vtbl_offset ; /* offset into vtbl for virtual */
};
-/* Not precisely sure what this is intended for - DDE ignores it */
+/* Not precisely sure what this is intended for - DDE ignores it. */
-struct dntt_type_memaccess {
+struct dntt_type_memaccess
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* always DNTT_TYPE_MEMACCESS */
unsigned int unused: 21;
@@ -1093,12 +1092,12 @@ struct dntt_type_memaccess {
};
/* The DNTT_TYPE_INHERITANCE record describes derived classes.
- * In particular, the "parentlist" field of the CLASS record points
- * to a list of INHERITANCE records for classes from which we
- * inherit members.
- */
+ In particular, the "parentlist" field of the CLASS record points
+ to a list of INHERITANCE records for classes from which we
+ inherit members. */
-struct dntt_type_inheritance {
+struct dntt_type_inheritance
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* always DNTT_TYPE_INHERITANCE */
unsigned int Virtual: 1; /* virtual base class ? */
@@ -1112,7 +1111,8 @@ struct dntt_type_inheritance {
/* C++ "friend" classes ... */
-struct dntt_type_friend_class {
+struct dntt_type_friend_class
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_CLASS */
unsigned int unused: 21;
@@ -1120,7 +1120,8 @@ struct dntt_type_friend_class {
dnttpointer next ; /* next DNTT_FRIEND */
};
-struct dntt_type_friend_func {
+struct dntt_type_friend_func
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_FUNC */
unsigned int unused: 21;
@@ -1131,11 +1132,11 @@ struct dntt_type_friend_func {
};
/* DDE appears to ignore the DNTT_TYPE_MODIFIER record.
- * It could perhaps be used to give better "ptype" output in GDB;
- * otherwise it is probably safe for GDB to ignore it also.
- */
+ It could perhaps be used to give better "ptype" output in GDB;
+ otherwise it is probably safe for GDB to ignore it also. */
-struct dntt_type_modifier {
+struct dntt_type_modifier
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* always DNTT_TYPE_MODIFIER */
unsigned int m_const: 1; /* const */
@@ -1148,9 +1149,10 @@ struct dntt_type_modifier {
unsigned long future ; /* padding to 3-word block end */
};
-/* I'm not sure what this was intended for - DDE ignores it */
+/* I'm not sure what this was intended for - DDE ignores it. */
-struct dntt_type_object_id {
+struct dntt_type_object_id
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* always DNTT_TYPE_OBJECT_ID */
unsigned int indirect: 1; /* Is object_ident addr of addr? */
@@ -1165,16 +1167,15 @@ struct dntt_type_object_id {
/* No separate dntt_type_memfunc; same as dntt_type_func */
/* Symbol records to support templates. These only get used
- * in DDE's "describe" output (like GDB's "ptype").
- */
+ in DDE's "describe" output (like GDB's "ptype"). */
/* The TEMPLATE record is the header for a template-class.
- * Like the CLASS record, a TEMPLATE record has a memberlist that
- * points to a list of template members. It also has an arglist
- * pointing to a list of TEMPLATE_ARG records.
- */
+ Like the CLASS record, a TEMPLATE record has a memberlist that
+ points to a list of template members. It also has an arglist
+ pointing to a list of TEMPLATE_ARG records. */
-struct dntt_type_template {
+struct dntt_type_template
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* always DNTT_TYPE_TEMPLATE */
unsigned int abstract: 1; /* is this an abstract class? */
@@ -1191,12 +1192,15 @@ struct dntt_type_template {
};
/* Template-class arguments are a list of TEMPL_ARG records
- * chained together. The "name" field is the name of the formal.
- * E.g.:
- * template <class T> class q { ... };
- * Then "T" is the name of the formal argument.
- */
-struct dntt_type_templ_arg {
+ chained together. The "name" field is the name of the formal.
+ E.g.:
+
+ template <class T> class q { ... };
+
+ Then "T" is the name of the formal argument. */
+
+struct dntt_type_templ_arg
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* always DNTT_TYPE_TEMPL_ARG */
unsigned int usagetype: 1; /* 0 type-name 1 expression */
@@ -1208,19 +1212,22 @@ struct dntt_type_templ_arg {
};
/* FUNC_TEMPLATE records are sort of like FUNCTION, but are emitted
- * for template member functions. E.g.,
- * template <class T> class q {
- ...
- void f();
- ...
- };
- * Within the list of FIELDs/GENFIELDs defining the member list
- * of the template "q", "f" would appear as a FUNC_TEMPLATE.
- * We'll also see instances of FUNCTION "f" records for each
- * instantiation of the template.
- */
-
-struct dntt_type_func_template {
+ for template member functions. E.g.,
+
+ template <class T> class q
+ {
+ ...
+ void f();
+ ...
+ };
+
+ Within the list of FIELDs/GENFIELDs defining the member list
+ of the template "q", "f" would appear as a FUNC_TEMPLATE.
+ We'll also see instances of FUNCTION "f" records for each
+ instantiation of the template. */
+
+struct dntt_type_func_template
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* always DNTT_TYPE_FUNC_TEMPLATE */
unsigned int public: 1; /* 1 => globally visible */
@@ -1240,13 +1247,13 @@ struct dntt_type_func_template {
};
/* LINK is apparently intended to link together function template
- * definitions with their instantiations. However, it is not clear
- * why this would be needed, except to provide the information on
- * a "ptype" command. And as far as I can tell, aCC does not
- * generate this record.
- */
+ definitions with their instantiations. However, it is not clear
+ why this would be needed, except to provide the information on
+ a "ptype" command. And as far as I can tell, aCC does not
+ generate this record. */
-struct dntt_type_link {
+struct dntt_type_link
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* always DNTT_TYPE_LINK */
unsigned int linkKind: 4; /* always LINK_UNKNOWN */
@@ -1257,7 +1264,7 @@ struct dntt_type_link {
long future[2] ; /* padding to 3-word block end */
};
-/* end of C++ specific SOM's */
+/* end of C++ specific SOM's. */
/* DNTT_TYPE_DYN_ARRAY_DESC is unused by GDB */
/* DNTT_TYPE_DESC_SUBRANGE is unused by GDB */
@@ -1266,7 +1273,8 @@ struct dntt_type_link {
/* DNTT_TYPE_INLN_LIST is unused by GDB */
/* DNTT_TYPE_ALIAS is unused by GDB */
-struct dntt_type_doc_function {
+struct dntt_type_doc_function
+{
unsigned int extension: 1; /* always zero */
unsigned int kind: 10; /* K_DOC_FUNCTION or */
/* K_DOC_MEMFUNC */
@@ -1311,8 +1319,8 @@ struct dntt_type_block
};
/* One entry in a DNTT (either the LNTT or GNTT).
- * This is a union of the above 60 or so structure definitions.
- */
+ This is a union of the above 60 or so structure definitions. */
+
union dnttentry
{
struct dntt_type_srcfile dsfile;
@@ -1438,163 +1446,163 @@ union sltentry
struct slt_generic sgeneric;
};
-/* $LINES$ declarations
- * This is the line table used for optimized code, which is only present
- * in the new $PROGRAM_INFO$ debug space.
- */
+/* $LINES$ declarations
+ This is the line table used for optimized code, which is only present
+ in the new $PROGRAM_INFO$ debug space. */
#define DST_LN_ESCAPE_FLAG1 15
#define DST_LN_ESCAPE_FLAG2 14
#define DST_LN_CTX_SPEC1 13
#define DST_LN_CTX_SPEC2 12
-/*
- Escape function codes:
-*/
+/* Escape function codes: */
+
typedef enum
- {
- dst_ln_pad, /* pad byte */
- dst_ln_escape_1, /* reserved */
- dst_ln_dpc1_dln1, /* 1 byte line delta, 1 byte pc delta */
- dst_ln_dpc2_dln2, /* 2 bytes line delta, 2 bytes pc delta */
- dst_ln_pc4_ln4, /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
- dst_ln_dpc0_dln1, /* 1 byte line delta, pc delta = 0 */
- dst_ln_ln_off_1, /* statement escape, stmt # = 1 (2nd stmt on line) */
- dst_ln_ln_off, /* statement escape, stmt # = next byte */
- dst_ln_entry, /* entry escape, next byte is entry number */
- dst_ln_exit, /* exit escape */
- dst_ln_stmt_end, /* gap escape, 4 bytes pc delta */
- dst_ln_stmt_cp, /* current stmt is a critical point */
- dst_ln_escape_12, /* reserved */
- dst_ln_escape_13, /* this is an exception site record */
- dst_ln_nxt_byte, /* next byte contains the real escape code */
- dst_ln_end, /* end escape, final entry follows */
- dst_ln_escape1_END_OF_ENUM
- }
- dst_ln_escape1_t;
+{
+ dst_ln_pad, /* pad byte */
+ dst_ln_escape_1, /* reserved */
+ dst_ln_dpc1_dln1, /* 1 byte line delta, 1 byte pc delta */
+ dst_ln_dpc2_dln2, /* 2 bytes line delta, 2 bytes pc delta */
+ dst_ln_pc4_ln4, /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
+ dst_ln_dpc0_dln1, /* 1 byte line delta, pc delta = 0 */
+ dst_ln_ln_off_1, /* statement escape, stmt # = 1 (2nd stmt on line) */
+ dst_ln_ln_off, /* statement escape, stmt # = next byte */
+ dst_ln_entry, /* entry escape, next byte is entry number */
+ dst_ln_exit, /* exit escape */
+ dst_ln_stmt_end, /* gap escape, 4 bytes pc delta */
+ dst_ln_stmt_cp, /* current stmt is a critical point */
+ dst_ln_escape_12, /* reserved */
+ dst_ln_escape_13, /* this is an exception site record */
+ dst_ln_nxt_byte, /* next byte contains the real escape code */
+ dst_ln_end, /* end escape, final entry follows */
+ dst_ln_escape1_END_OF_ENUM
+}
+dst_ln_escape1_t;
typedef enum
- {
- dst_ln_ctx_1, /* next byte describes context switch with 5-bit */
- /* index into the image table and 3-bit run length. */
- /* If run length is 0, end with another cxt specifier or ctx_end */
- dst_ln_ctx_2, /* next 2 bytes switch context: 13 bit index, 3 bit run length */
- dst_ln_ctx_4, /* next 4 bytes switch context: 29 bit index, 3 bit run length */
- dst_ln_ctx_end, /* end current context */
- dst_ln_col_run_1, /* next byte is column position of start of next statement, */
- /* following byte is length of statement */
- dst_ln_col_run_2, /* next 2 bytes is column position of start of next statement, */
- /* following 2 bytes is length of statement */
- dst_ln_init_base1, /* next 4 bytes are absolute PC, followed by 1 byte of line number */
- dst_ln_init_base2, /* next 4 bytes are absolute PC, followed by 2 bytes of line number */
- dst_ln_init_base3, /* next 4 bytes are absolute PC, followed by 3 bytes of line number */
- dst_ln_escape2_END_OF_ENUM
- }
- dst_ln_escape2_t;
+{
+ dst_ln_ctx_1, /* next byte describes context switch with 5-bit */
+ /* index into the image table and 3-bit run length. */
+ /* If run length is 0, end with another cxt specifier or ctx_end */
+ dst_ln_ctx_2, /* next 2 bytes switch context: 13 bit index, 3 bit run length */
+ dst_ln_ctx_4, /* next 4 bytes switch context: 29 bit index, 3 bit run length */
+ dst_ln_ctx_end, /* end current context */
+ dst_ln_col_run_1, /* next byte is column position of start of next statement, */
+ /* following byte is length of statement */
+ dst_ln_col_run_2, /* next 2 bytes is column position of start of next statement, */
+ /* following 2 bytes is length of statement */
+ dst_ln_init_base1, /* next 4 bytes are absolute PC, followed by 1 byte of line number */
+ dst_ln_init_base2, /* next 4 bytes are absolute PC, followed by 2 bytes of line number */
+ dst_ln_init_base3, /* next 4 bytes are absolute PC, followed by 3 bytes of line number */
+ dst_ln_escape2_END_OF_ENUM
+}
+dst_ln_escape2_t;
typedef union
- {
- struct
- {
- unsigned int pc_delta : 4; /* 4 bit pc delta */
- int ln_delta : 4; /* 4 bit line number delta */
- }
- delta;
-
- struct
- {
- unsigned int esc_flag : 4; /* alias for pc_delta */
- unsigned int esc_code : 4; /* escape function code (dst_ln_escape1_t, or ...2_t */
- }
- esc;
-
- struct
- {
- unsigned int esc_flag : 4; /* dst_ln_ctx_spec1, or dst_ln_ctx_spec2 */
- unsigned int run_length : 2;
- unsigned int ctx_index : 2; /* ...spec2 contains index; ...spec1, index - 4 */
- }
- ctx_spec;
-
- char sdata; /* signed data byte */
- unsigned char udata; /* unsigned data byte */
- }
- dst_ln_entry_t,
- *dst_ln_entry_ptr_t;
+{
+ struct
+ {
+ unsigned int pc_delta : 4; /* 4 bit pc delta */
+ int ln_delta : 4; /* 4 bit line number delta */
+ }
+ delta;
+
+ struct
+ {
+ unsigned int esc_flag : 4; /* alias for pc_delta */
+ unsigned int esc_code : 4; /* escape function code (dst_ln_escape1_t, or ...2_t */
+ }
+ esc;
+
+ struct
+ {
+ unsigned int esc_flag : 4; /* dst_ln_ctx_spec1, or dst_ln_ctx_spec2 */
+ unsigned int run_length : 2;
+ unsigned int ctx_index : 2; /* ...spec2 contains index; ...spec1, index - 4 */
+ }
+ ctx_spec;
+
+ char sdata; /* signed data byte */
+ unsigned char udata; /* unsigned data byte */
+}
+dst_ln_entry_t,
+ * dst_ln_entry_ptr_t;
/* Warning: although the above union occupies only 1 byte the compiler treats
- * it as having size 2 (the minimum size of a struct). Therefore a sequence of
- * dst_ln_entry_t's cannot be described as an array, and walking through such a
- * sequence requires convoluted code such as
- * ln_ptr = (dst_ln_entry_ptr_t) (char*) ln_ptr + 1
- * We regret the inconvenience. */
-
-/* Structure for interpreting the byte following a dst_ln_ctx1 entry */
-typedef struct {
- unsigned int ctx1_index : 5; /* 5 bit index into context table */
- unsigned int ctx1_run_length : 3; /* 3 bit run length */
+ it as having size 2 (the minimum size of a struct). Therefore a sequence of
+ dst_ln_entry_t's cannot be described as an array, and walking through such a
+ sequence requires convoluted code such as
+ ln_ptr = (dst_ln_entry_ptr_t) (char*) ln_ptr + 1
+ We regret the inconvenience. */
+
+/* Structure for interpreting the byte following a dst_ln_ctx1 entry. */
+typedef struct
+{
+ unsigned int ctx1_index : 5; /* 5 bit index into context table */
+ unsigned int ctx1_run_length : 3; /* 3 bit run length */
} dst_ln_ctx1_t,
*dst_ln_ctx1_ptr_t;
-/* Structure for interpreting the bytes following a dst_ln_ctx2 entry */
-typedef struct {
- unsigned int ctx2_index : 13; /* 13 bit index into context table */
- unsigned int ctx2_run_length : 3; /* 3 bit run length */
+/* Structure for interpreting the bytes following a dst_ln_ctx2 entry. */
+typedef struct
+{
+ unsigned int ctx2_index : 13; /* 13 bit index into context table */
+ unsigned int ctx2_run_length : 3; /* 3 bit run length */
} dst_ln_ctx2_t,
*dst_ln_ctx2_ptr_t;
-/* Structure for interpreting the bytes following a dst_ln_ctx4 entry */
-typedef struct {
- unsigned int ctx4_index : 29; /* 29 bit index into context table */
- unsigned int ctx4_run_length : 3; /* 3 bit run length */
+/* Structure for interpreting the bytes following a dst_ln_ctx4 entry. */
+typedef struct
+{
+ unsigned int ctx4_index : 29; /* 29 bit index into context table */
+ unsigned int ctx4_run_length : 3; /* 3 bit run length */
} dst_ln_ctx4_t,
*dst_ln_ctx4_ptr_t;
/* PXDB definitions.
- *
- * PXDB is a post-processor which takes the executable file
- * and massages the debug information so that the debugger may
- * start up and run more efficiently. Some of the tasks
- * performed by PXDB are:
- *
- * o Remove duplicate global type and variable information
- * from the GNTT,
- *
- * o Append the GNTT onto the end of the LNTT and place both
- * back in the LNTT section,
- *
- * o Build quick look-up tables (description follows) for
- * files, procedures, modules, and paragraphs (for Cobol),
- * placing these in the GNTT section,
- *
- * o Reconstruct the header appearing in the header section
- * to access this information.
- *
- * The "quick look-up" tables are in the $GNTT$ sub-space, in
- * the following order:
- *
- * Procedures -sorted by address
- * Source files -sorted by address (of the
- * generated code from routines)
- * Modules -sorted by address
- * Classes -<unsorted?>
- * Address Alias -sorted by index <?>
- * Object IDs -sorted by object identifier
- *
- * Most quick entries have (0-based) indices into the LNTT tables to
- * the full entries for the item it describes.
- *
- * The post-PXDB header is in the $HEADER$ sub-space. Alas, it
- * occurs in different forms, depending on the optimization level
- * in the compilation step and whether PXDB was run or not. The
- * worst part is the forms aren't self-describing, so we'll have
- * to grovel in the bits to figure out what kind we're looking at
- * (see hp_get_header in hp-psymtab-read.c).
- */
-
-/* PXDB versions
- */
+
+ PXDB is a post-processor which takes the executable file
+ and massages the debug information so that the debugger may
+ start up and run more efficiently. Some of the tasks
+ performed by PXDB are:
+
+ o Remove duplicate global type and variable information
+ from the GNTT,
+
+ o Append the GNTT onto the end of the LNTT and place both
+ back in the LNTT section,
+
+ o Build quick look-up tables (description follows) for
+ files, procedures, modules, and paragraphs (for Cobol),
+ placing these in the GNTT section,
+
+ o Reconstruct the header appearing in the header section
+ to access this information.
+
+ The "quick look-up" tables are in the $GNTT$ sub-space, in
+ the following order:
+
+ Procedures -sorted by address
+ Source files -sorted by address (of the
+ generated code from routines)
+ Modules -sorted by address
+ Classes -<unsorted?>
+ Address Alias -sorted by index <?>
+ Object IDs -sorted by object identifier
+
+ Most quick entries have (0-based) indices into the LNTT tables to
+ the full entries for the item it describes.
+
+ The post-PXDB header is in the $HEADER$ sub-space. Alas, it
+ occurs in different forms, depending on the optimization level
+ in the compilation step and whether PXDB was run or not. The
+ worst part is the forms aren't self-describing, so we'll have
+ to grovel in the bits to figure out what kind we're looking at
+ (see hp_get_header in hp-psymtab-read.c). */
+
+/* PXDB versions. */
+
#define PXDB_VERSION_CPLUSPLUS 1
#define PXDB_VERSION_7_4 2
#define PXDB_VERSION_CPP_30 3
@@ -1605,118 +1613,106 @@ typedef struct {
#define PXDB_VERSION_2_1 1
/* Header version for the case that there is no DOC info
- * but the executable has been processed by pxdb (the easy
- * case, from "cc -g").
- */
-typedef struct PXDB_struct {
- int pd_entries; /* # of entries in function look-up table */
- int fd_entries; /* # of entries in file look-up table */
- int md_entries; /* # of entries in module look-up table */
- unsigned int pxdbed : 1; /* 1 => file has been preprocessed */
- unsigned int bighdr : 1; /* 1 => this header contains 'time' word */
- unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */
+ but the executable has been processed by pxdb (the easy
+ case, from "cc -g"). */
+
+typedef struct PXDB_struct
+{
+ int pd_entries; /* # of entries in function look-up table */
+ int fd_entries; /* # of entries in file look-up table */
+ int md_entries; /* # of entries in module look-up table */
+ unsigned int pxdbed : 1; /* 1 => file has been preprocessed */
+ unsigned int bighdr : 1; /* 1 => this header contains 'time' word */
+ unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */
/* used for version check in xdb */
- unsigned int inlined: 1; /* one or more functions have been inlined */
- unsigned int spare:12;
- short version; /* pxdb header version */
- int globals; /* index into the DNTT where GNTT begins */
- unsigned int time; /* modify time of file before being pxdbed */
- int pg_entries; /* # of entries in label look-up table */
- int functions; /* actual number of functions */
- int files; /* actual number of files */
- int cd_entries; /* # of entries in class look-up table */
- int aa_entries; /* # of entries in addr alias look-up table */
- int oi_entries; /* # of entries in object id look-up table */
+ unsigned int inlined: 1; /* one or more functions have been inlined */
+ unsigned int spare:12;
+ short version; /* pxdb header version */
+ int globals; /* index into the DNTT where GNTT begins */
+ unsigned int time; /* modify time of file before being pxdbed */
+ int pg_entries; /* # of entries in label look-up table */
+ int functions; /* actual number of functions */
+ int files; /* actual number of files */
+ int cd_entries; /* # of entries in class look-up table */
+ int aa_entries; /* # of entries in addr alias look-up table */
+ int oi_entries; /* # of entries in object id look-up table */
} PXDB_header, *PXDB_header_ptr;
/* Header version for the case that there is no DOC info and the
- * executable has NOT been processed by pxdb.
- */
-typedef struct XDB_header_struct {
- long gntt_length;
- long lntt_length;
- long slt_length;
- long vt_length;
- long xt_length;
+ executable has NOT been processed by pxdb. */
+
+typedef struct XDB_header_struct
+{
+ long gntt_length;
+ long lntt_length;
+ long slt_length;
+ long vt_length;
+ long xt_length;
} XDB_header;
/* Header version for the case that there is DOC info and the
- * executable has been processed by pxdb.
- */
-typedef struct DOC_info_PXDB_header_struct {
- unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */
- unsigned int doc_header: 1; /* bit set if this is doc-style header*/
- unsigned int version: 8; /* version of pxdb see defines
- * PXDB_VERSION_* in this file */
- unsigned int reserved_for_flags: 16;/* for future use; -- must be
- * set to zero
- */
- unsigned int has_aux_pd_table: 1; /* $GNTT$ has aux PD table */
- unsigned int has_expr_table: 1; /* space has $EXPR$ */
- unsigned int has_range_table: 1; /* space has $RANGE$ */
- unsigned int has_context_table: 1; /* space has $SRC_CTXT$ */
- unsigned int has_lines_table: 1; /* space contains a $LINES$
- * subspace for line tables.
- */
- unsigned int has_lt_offset_map: 1; /* space contains an lt_offset
- * subspace for line table mapping
- */
- /* the following fields are the same as those in the PXDB_header in $DEBUG$ */
- int pd_entries; /* # of entries in function look-up table */
- int fd_entries; /* # of entries in file look-up table */
- int md_entries; /* # of entries in module look-up table */
- unsigned int pxdbed : 1; /* 1 => file has been preprocessed */
- unsigned int bighdr : 1; /* 1 => this header contains 'time' word */
- unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */
- /* used for version check in xdb */
- unsigned int inlined: 1; /* one or more functions have been inlined */
- unsigned int spare : 28;
- int globals; /* index into the DNTT where GNTT begins */
- unsigned int time; /* modify time of file before being pxdbed */
- int pg_entries; /* # of entries in label look-up table */
- int functions; /* actual number of functions */
- int files; /* actual number of files */
- int cd_entries; /* # of entries in class look-up table */
- int aa_entries; /* # of entries in addr alias look-up table */
- int oi_entries; /* # of entries in object id look-up table */
+ executable has been processed by pxdb. */
+
+typedef struct DOC_info_PXDB_header_struct
+{
+ unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */
+ unsigned int doc_header: 1; /* bit set if this is doc-style header */
+ unsigned int version: 8; /* version of pxdb see defines
+ PXDB_VERSION_* in this file. */
+ unsigned int reserved_for_flags: 16;/* for future use; -- must be
+ set to zero. */
+ unsigned int has_aux_pd_table: 1; /* $GNTT$ has aux PD table */
+ unsigned int has_expr_table: 1; /* space has $EXPR$ */
+ unsigned int has_range_table: 1; /* space has $RANGE$ */
+ unsigned int has_context_table: 1; /* space has $SRC_CTXT$ */
+ unsigned int has_lines_table: 1; /* space contains a $LINES$
+ subspace for line tables. */
+ unsigned int has_lt_offset_map: 1; /* space contains an lt_offset
+ subspace for line table mapping. */
+ /* The following fields are the same as those in the PXDB_header in $DEBUG$ */
+ int pd_entries; /* # of entries in function look-up table */
+ int fd_entries; /* # of entries in file look-up table */
+ int md_entries; /* # of entries in module look-up table */
+ unsigned int pxdbed : 1; /* 1 => file has been preprocessed */
+ unsigned int bighdr : 1; /* 1 => this header contains 'time' word */
+ unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */
+ /* used for version check in xdb */
+ unsigned int inlined: 1; /* one or more functions have been inlined */
+ unsigned int spare : 28;
+ int globals; /* index into the DNTT where GNTT begins */
+ unsigned int time; /* modify time of file before being pxdbed */
+ int pg_entries; /* # of entries in label look-up table */
+ int functions; /* actual number of functions */
+ int files; /* actual number of files */
+ int cd_entries; /* # of entries in class look-up table */
+ int aa_entries; /* # of entries in addr alias look-up table */
+ int oi_entries; /* # of entries in object id look-up table */
} DOC_info_PXDB_header;
/* Header version for the case that there is DOC info and the
- * executable has NOT been processed by pxdb.
- */
-typedef struct DOC_info_header_struct {
- unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */
- unsigned int doc_header: 1; /* bit set if this is doc-style header*/
- unsigned int version: 8; /* version of debug/header
- format. For 10.0 the value
- will be 1. For "Davis" the
- value is 2.
- */
- unsigned int reserved_for_flags: 18; /* for future use; -- must be
- set to zero
- */
- unsigned int has_range_table: 1; /* space contains a $RANGE$
- subspace for variable ranges.
- */
- unsigned int has_context_table: 1; /* space contains a $CTXT$
- subspace for context/inline
- table.
- */
- unsigned int has_lines_table: 1; /* space contains a $LINES$
- subspace for line tables.
- */
- unsigned int has_lt_offset_map: 1; /* space contains an lt_offset
- subspace for line table mapping
- */
-
- long gntt_length; /* same as old header */
- long lntt_length; /* same as old header */
- long slt_length; /* same as old header */
- long vt_length; /* same as old header */
- long xt_length; /* same as old header */
- long ctxt_length; /* present only if version >= 2 */
- long range_length; /* present only if version >= 2 */
- long expr_length; /* present only if version >= 2 */
+ executable has NOT been processed by pxdb. */
+
+typedef struct DOC_info_header_struct
+{
+ unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */
+ unsigned int doc_header: 1; /* bit set if this is doc-style header*/
+ unsigned int version: 8; /* version of debug/header
+ format. For 10.0 the value
+ will be 1. For "Davis" the value is 2. */
+ unsigned int reserved_for_flags: 18; /* for future use; -- must be set to zero. */
+ unsigned int has_range_table: 1; /* space contains a $RANGE$ subspace for variable ranges. */
+ unsigned int has_context_table: 1; /* space contains a $CTXT$ subspace for context/inline table. */
+ unsigned int has_lines_table: 1; /* space contains a $LINES$ subspace for line tables. */
+ unsigned int has_lt_offset_map: 1; /* space contains an lt_offset subspace for line table mapping. */
+
+ long gntt_length; /* same as old header */
+ long lntt_length; /* same as old header */
+ long slt_length; /* same as old header */
+ long vt_length; /* same as old header */
+ long xt_length; /* same as old header */
+ long ctxt_length; /* present only if version >= 2 */
+ long range_length; /* present only if version >= 2 */
+ long expr_length; /* present only if version >= 2 */
} DOC_info_header;
@@ -1730,145 +1726,141 @@ typedef union GenericDebugHeader_union
/* Procedure Descriptor:
- *
- * An element of the procedure quick look-up table
- */
-typedef struct quick_procedure {
- long isym; /* 0-based index of first symbol*/
- /* for procedure in $LNTT$, */
- /* i.e. the procedure itself */
- CORE_ADDR adrStart; /* memory adr of start of proc */
- CORE_ADDR adrEnd; /* memory adr of end of proc */
- char *sbAlias; /* alias name of procedure */
- char *sbProc; /* real name of procedure */
- CORE_ADDR adrBp; /* address of entry breakpoint */
- CORE_ADDR adrExitBp; /* address of exit breakpoint */
- int icd; /* member of this class (index) */
- unsigned int ipd; /* index of template for this */
- /* function (index) */
- unsigned int unused: 5;
- unsigned int no_lt_offset: 1;/* no entry in lt_offset table */
- unsigned int fTemplate: 1; /* function template */
- unsigned int fExpansion: 1; /* function expansion */
- unsigned int linked : 1; /* linked with other expansions */
- unsigned int duplicate: 1; /* clone of another procedure */
- unsigned int overloaded:1; /* overloaded function */
- unsigned int member: 1; /* class member function */
- unsigned int constructor:1; /* constructor function */
- unsigned int destructor:1; /* destructor function */
- unsigned int Static: 1; /* static function */
- unsigned int Virtual: 1; /* virtual function */
- unsigned int constant: 1; /* constant function */
- unsigned int pure: 1; /* pure (virtual) function */
- unsigned int language: 4; /* procedure's language */
- unsigned int inlined: 1; /* function has been inlined */
- unsigned int Operator: 1; /* operator function */
- unsigned int stub: 1; /* bodyless function */
- unsigned int optimize: 2; /* optimization level */
- unsigned int level: 5; /* nesting level (top=0) */
+ An element of the procedure quick look-up table. */
+
+typedef struct quick_procedure
+{
+ long isym; /* 0-based index of first symbol
+ for procedure in $LNTT$,
+ i.e. the procedure itself. */
+ CORE_ADDR adrStart; /* memory adr of start of proc */
+ CORE_ADDR adrEnd; /* memory adr of end of proc */
+ char *sbAlias; /* alias name of procedure */
+ char *sbProc; /* real name of procedure */
+ CORE_ADDR adrBp; /* address of entry breakpoint */
+ CORE_ADDR adrExitBp; /* address of exit breakpoint */
+ int icd; /* member of this class (index) */
+ unsigned int ipd; /* index of template for this */
+ /* function (index) */
+ unsigned int unused: 5;
+ unsigned int no_lt_offset: 1;/* no entry in lt_offset table */
+ unsigned int fTemplate: 1; /* function template */
+ unsigned int fExpansion: 1; /* function expansion */
+ unsigned int linked : 1; /* linked with other expansions */
+ unsigned int duplicate: 1; /* clone of another procedure */
+ unsigned int overloaded:1; /* overloaded function */
+ unsigned int member: 1; /* class member function */
+ unsigned int constructor:1; /* constructor function */
+ unsigned int destructor:1; /* destructor function */
+ unsigned int Static: 1; /* static function */
+ unsigned int Virtual: 1; /* virtual function */
+ unsigned int constant: 1; /* constant function */
+ unsigned int pure: 1; /* pure (virtual) function */
+ unsigned int language: 4; /* procedure's language */
+ unsigned int inlined: 1; /* function has been inlined */
+ unsigned int Operator: 1; /* operator function */
+ unsigned int stub: 1; /* bodyless function */
+ unsigned int optimize: 2; /* optimization level */
+ unsigned int level: 5; /* nesting level (top=0) */
} quick_procedure_entry, *quick_procedure_entry_ptr;
/* Source File Descriptor:
- *
- * An element of the source file quick look-up table
- */
-typedef struct quick_source {
- long isym; /* 0-based index in $LNTT$ of */
- /* first symbol for this file */
- CORE_ADDR adrStart; /* mem adr of start of file's code */
- CORE_ADDR adrEnd; /* mem adr of end of file's code */
- char *sbFile; /* name of source file */
- unsigned int fHasDecl: 1; /* do we have a .d file? */
- unsigned int fWarned: 1; /* have warned about age problems? */
- unsigned int fSrcfile: 1; /* 0 => include 1=> source */
- unsigned short ilnMac; /* lines in file (0 if don't know) */
- int ipd; /* 0-based index of first procedure*/
- /* in this file, in the quick */
- /* look-up table of procedures */
- unsigned int *rgLn; /* line pointer array, if any */
+ An element of the source file quick look-up table. */
+
+typedef struct quick_source
+{
+ long isym; /* 0-based index in $LNTT$ of
+ first symbol for this file. */
+ CORE_ADDR adrStart; /* mem adr of start of file's code */
+ CORE_ADDR adrEnd; /* mem adr of end of file's code */
+ char *sbFile; /* name of source file */
+ unsigned int fHasDecl: 1; /* do we have a .d file? */
+ unsigned int fWarned: 1; /* have warned about age problems? */
+ unsigned int fSrcfile: 1; /* 0 => include 1=> source */
+ unsigned short ilnMac; /* lines in file (0 if don't know) */
+ int ipd; /* 0-based index of first procedure
+ in this file, in the quick
+ look-up table of procedures. */
+ unsigned int *rgLn; /* line pointer array, if any */
} quick_file_entry, *quick_file_entry_ptr;
/* Module Descriptor:
- *
- * An element of the module quick reference table
- */
-typedef struct quick_module {
- long isym; /* 0-based index of first */
- /* symbol for module */
- CORE_ADDR adrStart; /* adr of start of mod. */
- CORE_ADDR adrEnd; /* adr of end of mod. */
- char *sbAlias; /* alias name of module */
- char *sbMod; /* real name of module */
- unsigned int imports: 1; /* module have any imports? */
- unsigned int vars_in_front: 1; /* module globals in front? */
- unsigned int vars_in_gaps: 1; /* module globals in gaps? */
- unsigned int language: 4; /* type of language */
- unsigned int unused : 25;
- unsigned int unused2; /* space for future stuff */
+ An element of the module quick reference table. */
+
+typedef struct quick_module
+{
+ long isym; /* 0-based index of first
+ symbol for module. */
+ CORE_ADDR adrStart; /* adr of start of mod. */
+ CORE_ADDR adrEnd; /* adr of end of mod. */
+ char *sbAlias; /* alias name of module */
+ char *sbMod; /* real name of module */
+ unsigned int imports: 1; /* module have any imports? */
+ unsigned int vars_in_front: 1; /* module globals in front? */
+ unsigned int vars_in_gaps: 1; /* module globals in gaps? */
+ unsigned int language: 4; /* type of language */
+ unsigned int unused : 25;
+ unsigned int unused2; /* space for future stuff */
} quick_module_entry, *quick_module_entry_ptr;
/* Auxiliary Procedure Descriptor:
- *
- * An element of the auxiliary procedure quick look-up table
- */
-typedef struct quick_aux_procedure {
- long isym_inln; /* start on inline list for proc */
- long spare;
+ An element of the auxiliary procedure quick look-up table. */
+
+typedef struct quick_aux_procedure
+{
+ long isym_inln; /* start on inline list for proc */
+ long spare;
} quick_aux_procedure_entry, *quick_aux_procedure_entry_ptr;
/* Paragraph Descriptor:
- *
- * An element of the paragraph quick look-up table
- */
-typedef struct quick_paragraph {
- long isym; /* first symbol for label (index) */
- CORE_ADDR adrStart; /* memory adr of start of label */
- CORE_ADDR adrEnd; /* memory adr of end of label */
- char *sbLab; /* name of label */
- unsigned int inst; /* Used in xdb to store inst @ bp */
- unsigned int sect: 1; /* true = section, false = parag. */
- unsigned int unused: 31; /* future use */
+ An element of the paragraph quick look-up table. */
+
+typedef struct quick_paragraph
+{
+ long isym; /* first symbol for label (index) */
+ CORE_ADDR adrStart; /* memory adr of start of label */
+ CORE_ADDR adrEnd; /* memory adr of end of label */
+ char *sbLab; /* name of label */
+ unsigned int inst; /* Used in xdb to store inst @ bp */
+ unsigned int sect: 1; /* true = section, false = parag. */
+ unsigned int unused: 31; /* future use */
} quick_paragraph_entry, *quick_paragraph_entry_ptr;
-/*
- * Class Descriptor:
- *
- * An element of the class quick look-up table
- */
-typedef struct quick_class {
- char *sbClass; /* name of class */
- long isym; /* class symbol (tag) */
- unsigned int type : 2; /* 0=class, 1=union, 2=struct */
- unsigned int fTemplate : 1;/* class template */
- unsigned int expansion : 1;/* template expansion */
- unsigned int unused :28;
- sltpointer lowscope; /* beginning of defined scope */
- sltpointer hiscope; /* end of defined scope */
+/* Class Descriptor:
+ An element of the class quick look-up table. */
+
+typedef struct quick_class
+{
+ char *sbClass; /* name of class */
+ long isym; /* class symbol (tag) */
+ unsigned int type : 2; /* 0=class, 1=union, 2=struct */
+ unsigned int fTemplate : 1;/* class template */
+ unsigned int expansion : 1;/* template expansion */
+ unsigned int unused :28;
+ sltpointer lowscope; /* beginning of defined scope */
+ sltpointer hiscope; /* end of defined scope */
} quick_class_entry, *quick_class_entry_ptr;
-/* Address Alias Entry
- *
- * An element of the address alias quick look-up table
- */
-typedef struct quick_alias {
- CORE_ADDR low;
- CORE_ADDR high;
- int index;
- unsigned int unused : 31;
- unsigned int alternate : 1; /* alternate unnamed aliases? */
+/* Address Alias Entry
+ An element of the address alias quick look-up table. */
+
+typedef struct quick_alias
+{
+ CORE_ADDR low;
+ CORE_ADDR high;
+ int index;
+ unsigned int unused : 31;
+ unsigned int alternate : 1; /* alternate unnamed aliases? */
} quick_alias_entry, *quick_alias_entry_ptr;
-/* Object Identification Entry
- *
- * An element of the object identification quick look-up table
- */
+/* Object Identification Entry
+ An element of the object identification quick look-up table. */
-typedef struct quick_obj_ID {
- CORE_ADDR obj_ident; /* class identifier */
- long isym; /* class symbol */
- long offset; /* offset to object start */
+typedef struct quick_obj_ID
+{
+ CORE_ADDR obj_ident; /* class identifier */
+ long isym; /* class symbol */
+ long offset; /* offset to object start */
} quick_obj_ID_entry, *quick_obj_ID_entry_ptr;
-
#endif /* HP_SYMTAB_INCLUDED */
-
diff --git a/include/obstack.h b/include/obstack.h
index d86d9f2..5496ff2 100644
--- a/include/obstack.h
+++ b/include/obstack.h
@@ -343,7 +343,7 @@ extern int obstack_exit_failure;
#endif
-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
+#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
@@ -411,7 +411,7 @@ __extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + 1 > __o->chunk_limit) \
_obstack_newchunk (__o, 1); \
- *(__o->next_free)++ = (datum); \
+ obstack_1grow_fast (__o, datum); \
(void) 0; })
/* These assume that the obstack alignment is good enough for pointers or ints,
@@ -423,19 +423,28 @@ __extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
_obstack_newchunk (__o, sizeof (void *)); \
- *((void **)__o->next_free)++ = ((void *)datum); \
- (void) 0; })
+ obstack_ptr_grow_fast (__o, datum); })
# define obstack_int_grow(OBSTACK,datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + sizeof (int) > __o->chunk_limit) \
_obstack_newchunk (__o, sizeof (int)); \
- *((int *)__o->next_free)++ = ((int)datum); \
+ obstack_int_grow_fast (__o, datum); })
+
+# define obstack_ptr_grow_fast(OBSTACK,aptr) \
+__extension__ \
+({ struct obstack *__o1 = (OBSTACK); \
+ *(const void **) __o1->next_free = (aptr); \
+ __o1->next_free += sizeof (const void *); \
(void) 0; })
-# define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
-# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+# define obstack_int_grow_fast(OBSTACK,aint) \
+__extension__ \
+({ struct obstack *__o1 = (OBSTACK); \
+ *(int *) __o1->next_free = (aint); \
+ __o1->next_free += sizeof (int); \
+ (void) 0; })
# define obstack_blank(OBSTACK,length) \
__extension__ \
@@ -443,7 +452,7 @@ __extension__ \
int __len = (length); \
if (__o->chunk_limit - __o->next_free < __len) \
_obstack_newchunk (__o, __len); \
- __o->next_free += __len; \
+ obstack_blank_fast (__o, __len); \
(void) 0; })
# define obstack_alloc(OBSTACK,length) \
@@ -530,26 +539,29 @@ __extension__ \
# define obstack_1grow(h,datum) \
( (((h)->next_free + 1 > (h)->chunk_limit) \
? (_obstack_newchunk ((h), 1), 0) : 0), \
- (*((h)->next_free)++ = (datum)))
+ obstack_1grow_fast (h, datum))
# define obstack_ptr_grow(h,datum) \
( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- (*((char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = ((char *) datum)))
+ obstack_ptr_grow_fast (h, datum))
# define obstack_int_grow(h,datum) \
( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- (*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = ((int) datum)))
+ obstack_int_grow_fast (h, datum))
+
+# define obstack_ptr_grow_fast(h,aptr) \
+ (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
-# define obstack_ptr_grow_fast(h,aptr) (*((char **) (h)->next_free)++ = (char *) aptr)
-# define obstack_int_grow_fast(h,aint) (*((int *) (h)->next_free)++ = (int) aint)
+# define obstack_int_grow_fast(h,aint) \
+ (((int *) ((h)->next_free += sizeof (int)))[-1] = (aptr))
# define obstack_blank(h,length) \
( (h)->temp = (length), \
(((h)->chunk_limit - (h)->next_free < (h)->temp) \
? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- ((h)->next_free += (h)->temp))
+ obstack_blank_fast (h, (h)->temp))
# define obstack_alloc(h,length) \
(obstack_blank ((h), (length)), obstack_finish ((h)))
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index aaea214..42cf9a5 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,19 @@
+2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
+ Bernardo Innocenti <bernie@develer.com>
+
+ * m68k.h: Add MCFv4/MCF5528x support.
+
+2003-10-19 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * mmix.h (JMP_INSN_BYTE): Define.
+
+2003-09-30 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h: Document +E, +F, +G, +H, and +I operand types.
+ Update documentation of I, +B and +C operand types.
+ (INSN_ISA64R2, ISA_MIPS64R2, CPU_MIPS64R2): New defines.
+ (M_DEXT, M_DINS): New enum values.
+
2003-09-04 Nick Clifton <nickc@redhat.com>
* v850.h (PROCESSOR_V850E1): Define.
diff --git a/include/opcode/m68k.h b/include/opcode/m68k.h
index 3371d38..3f18984 100644
--- a/include/opcode/m68k.h
+++ b/include/opcode/m68k.h
@@ -1,55 +1,61 @@
/* Opcode table header for m680[01234]0/m6888[12]/m68851.
- Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001
- Free Software Foundation, Inc.
+ Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001,
+ 2003 Free Software Foundation, Inc.
-This file is part of GDB, GAS, and the GNU binutils.
+ This file is part of GDB, GAS, and the GNU binutils.
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them 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, GAS, and the GNU binutils are free software; you can redistribute
+ them and/or modify them 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, GAS, and the 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.
+ GDB, GAS, and the 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 file; see the file COPYING. If not, write to the Free
-Software Foundation, 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 file; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
/* These are used as bit flags for the arch field in the m68k_opcode
structure. */
#define _m68k_undef 0
-#define m68000 0x001
-#define m68008 m68000 /* synonym for -m68000. otherwise unused. */
-#define m68010 0x002
-#define m68020 0x004
-#define m68030 0x008
-#define m68ec030 m68030 /* similar enough to -m68030 to ignore differences;
+#define m68000 0x001
+#define m68008 m68000 /* Synonym for -m68000. otherwise unused. */
+#define m68010 0x002
+#define m68020 0x004
+#define m68030 0x008
+#define m68ec030 m68030 /* Similar enough to -m68030 to ignore differences;
gas will deal with the few differences. */
-#define m68040 0x010
-/* there is no 68050 */
-#define m68060 0x020
-#define m68881 0x040
-#define m68882 m68881 /* synonym for -m68881. otherwise unused. */
-#define m68851 0x080
-#define cpu32 0x100 /* e.g., 68332 */
-#define mcf5200 0x200
+#define m68040 0x010
+/* There is no 68050. */
+#define m68060 0x020
+#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
-
- /* handy aliases */
-#define m68040up (m68040 | m68060)
-#define m68030up (m68030 | m68040up)
-#define m68020up (m68020 | m68030up)
-#define m68010up (m68010 | cpu32 | m68020up)
-#define m68000up (m68000 | m68010up)
-#define mcf (mcf5200 | mcf5206e | mcf5307 | mcf5407)
-#define mcf5307up (mcf5307 | mcf5407)
-
+#define mcf5307 0x800
+#define mcf5407 0x1000
+#define mcfv4e 0x2000
+#define mcf528x 0x4000
+
+ /* Handy aliases. */
+#define m68040up (m68040 | m68060)
+#define m68030up (m68030 | m68040up)
+#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)
@@ -93,7 +99,7 @@ struct m68k_opcode_alias
operand; the second, the place it is stored. */
/* Kinds of operands:
- Characters used: AaBCcDdEFfGHIJkLlMmnOopQqRrSsTtU VvWXYZ0123|*~%;@!&$?/<>#^+-
+ Characters used: AaBbCcDdEFfGHIJkLlMmnOopQqRrSsTtU VvWwXxYyZz0123|*~%;@!&$?/<>#^+-
D data register only. Stored as 3 bits.
A address register only. Stored as 3 bits.
@@ -141,7 +147,7 @@ struct m68k_opcode_alias
Possible values:
0x000 SFC Source Function Code reg [60, 40, 30, 20, 10]
0x001 DFC Data Function Code reg [60, 40, 30, 20, 10]
- 0x002 CACR Cache Control Register [60, 40, 30, 20]
+ 0x002 CACR Cache Control Register [60, 40, 30, 20, mcf]
0x003 TC MMU Translation Control [60, 40]
0x004 ITT0 Instruction Transparent
Translation reg 0 [60, 40]
@@ -153,7 +159,7 @@ struct m68k_opcode_alias
Translation reg 1 [60, 40]
0x008 BUSCR Bus Control Register [60]
0x800 USP User Stack Pointer [60, 40, 30, 20, 10]
- 0x801 VBR Vector Base reg [60, 40, 30, 20, 10]
+ 0x801 VBR Vector Base reg [60, 40, 30, 20, 10, mcf]
0x802 CAAR Cache Address Register [ 30, 20]
0x803 MSP Master Stack Pointer [ 40, 30, 20]
0x804 ISP Interrupt Stack Pointer [ 40, 30, 20]
@@ -165,6 +171,8 @@ struct m68k_opcode_alias
0xC04 RAMBAR0 RAM Base Address Register 0 [520X]
0xC05 RAMBAR1 RAM Base Address Register 0 [520X]
0xC0F MBAR0 RAM Base Address Register 0 [520X]
+ 0xC04 FLASHBAR FLASH Base Address Register [mcf528x]
+ 0xC05 RAMBAR Static RAM Base Address Register [mcf528x]
L Register list of the type d0-d7/a0-a7 etc.
(New! Improved! Can also hold fp0-fp7, as well!)
@@ -218,11 +226,14 @@ struct m68k_opcode_alias
coldfire bset/bclr/btst/mulsl/mulul operands:
q (modes 0,2-5)
v (modes 0,2-5,7.0,7.1)
-*/
-
-/* For the 68851: */
-/*
- I didn't use much imagination in choosing the
+ b (modes 0,2-5,7.2)
+ w (modes 2-5,7.2)
+ y (modes 2,5)
+ z (modes 2,5,7.2)
+ x mov3q immediate operand. */
+
+/* For the 68851: */
+/* I didn't use much imagination in choosing the
following codes, so many of them aren't very
mnemonic. -rab
diff --git a/include/opcode/mips.h b/include/opcode/mips.h
index 65434a7..9dab620 100644
--- a/include/opcode/mips.h
+++ b/include/opcode/mips.h
@@ -236,11 +236,24 @@ struct mips_opcode
"+A" 5 bit ins/ext position, which becomes LSB (OP_*_SHAMT).
Enforces: 0 <= pos < 32.
"+B" 5 bit ins size, which becomes MSB (OP_*_INSMSB).
- Requires that "+A" occur first to set position.
+ Requires that "+A" or "+E" occur first to set position.
Enforces: 0 < (pos+size) <= 32.
"+C" 5 bit ext size, which becomes MSBD (OP_*_EXTMSBD).
- Requires that "+A" occur first to set position.
+ Requires that "+A" or "+E" occur first to set position.
Enforces: 0 < (pos+size) <= 32.
+ (Also used by "dext" w/ different limits, but limits for
+ that are checked by the M_DEXT macro.)
+ "+E" 5 bit dins/dext position, which becomes LSB-32 (OP_*_SHAMT).
+ Enforces: 32 <= pos < 64.
+ "+F" 5 bit "dinsm" size, which becomes MSB-32 (OP_*_INSMSB).
+ Requires that "+A" or "+E" occur first to set position.
+ Enforces: 32 < (pos+size) <= 64.
+ "+G" 5 bit "dextm" size, which becomes MSBD-32 (OP_*_EXTMSBD).
+ Requires that "+A" or "+E" occur first to set position.
+ Enforces: 32 < (pos+size) <= 64.
+ "+H" 5 bit "dextu" size, which becomes MSBD (OP_*_EXTMSBD).
+ Requires that "+A" or "+E" occur first to set position.
+ Enforces: 32 < (pos+size) <= 64.
Floating point instructions:
"D" 5 bit destination register (OP_*_FD)
@@ -265,7 +278,8 @@ struct mips_opcode
Macro instructions:
"A" General 32 bit expression
- "I" 32 bit immediate
+ "I" 32 bit immediate (value placed in imm_expr).
+ "+I" 32 bit immediate (value placed in imm2_expr).
"F" 64 bit floating point constant in .rdata
"L" 64 bit floating point constant in .lit8
"f" 32 bit floating point constant
@@ -292,7 +306,7 @@ struct mips_opcode
Extension character sequences used so far ("+" followed by the
following), for quick reference when adding more:
- "ABCD"
+ "ABCDEFGHI"
*/
/* These are the bits which may be set in the pinfo field of an
@@ -385,6 +399,7 @@ struct mips_opcode
#define INSN_ISA32 0x00000020
#define INSN_ISA64 0x00000040
#define INSN_ISA32R2 0x00000080
+#define INSN_ISA64R2 0x00000100
/* Masks used for MIPS-defined ASEs. */
#define INSN_ASE_MASK 0x0000f000
@@ -432,6 +447,8 @@ struct mips_opcode
#define ISA_MIPS64 (ISA_MIPS5 | INSN_ISA32 | INSN_ISA64)
#define ISA_MIPS32R2 (ISA_MIPS32 | INSN_ISA32R2)
+#define ISA_MIPS64R2 (ISA_MIPS64 | INSN_ISA32R2 | INSN_ISA64R2)
+
/* CPU defines, use instead of hardcoding processor number. Keep this
in sync with bfd/archures.c in order for machine selection to work. */
@@ -460,6 +477,7 @@ struct mips_opcode
#define CPU_MIPS32R2 33
#define CPU_MIPS5 5
#define CPU_MIPS64 64
+#define CPU_MIPS64R2 65
#define CPU_SB1 12310201 /* octal 'SB', 01. */
/* Test for membership in an ISA including chip specific ISAs. INSN
@@ -542,6 +560,8 @@ enum
M_DDIV_3I,
M_DDIVU_3,
M_DDIVU_3I,
+ M_DEXT,
+ M_DINS,
M_DIV_3,
M_DIV_3I,
M_DIVU_3,
diff --git a/include/opcode/mmix.h b/include/opcode/mmix.h
index 825eb0e..d2aef32 100644
--- a/include/opcode/mmix.h
+++ b/include/opcode/mmix.h
@@ -1,5 +1,5 @@
/* mmix.h -- Header file for MMIX opcode table
- Copyright (C) 2001 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003 Free Software Foundation, Inc.
Written by Hans-Peter Nilsson (hp@bitrange.com)
This file is part of GDB, GAS, and the GNU binutils.
@@ -179,6 +179,7 @@ extern const struct mmix_spec_reg mmix_spec_regs[];
#define INCMH_INSN_BYTE 0xe5
#define INCH_INSN_BYTE 0xe4
#define SWYM_INSN_BYTE 0xfd
+#define JMP_INSN_BYTE 0xf0
/* We can have 256 - 32 (local registers) - 1 ($255 is not allocatable)
global registers. */
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 5c4175b..c9b048e 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,67 @@
+2003-10-31 Andreas Jaeger <aj@suse.de>
+
+ * floatformat.c (floatformat_always_valid): Add unused attribute.
+
+2003-10-30 Josef Zlomek <zlomekj@suse.cz>
+
+ * hashtab.c (htab_find_slot_with_hash): Decrease n_deleted
+ instead of increasing n_elements when inserting to deleted slot.
+
+2003-10-20 J. Brobecker <brobecker@gnat.com>
+
+ * cplus-dem.c (demangle_template): Register a new Btype only
+ when needed.
+ * testsuite/demangle-expected: Add a new test.
+
+2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ * testsuite/demangle-expected: Update the expected output of
+ _GLOBAL__I__Z2fnv.
+
+2003-10-02 Daniel Jacobowitz <drow@mvista.com>
+
+ * strerror.c: Revert last change. Declare static sys_nerr
+ and sys_errlist using different names.
+
+2003-10-01 Daniel Jacobowitz <drow@mvista.com>
+
+ * strerror.c: Don't provide or reference sys_errlist if
+ strerror is available.
+
+2003-10-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure.in: Check if $MAKEINFO is missing.
+ * configure: Regenerated.
+
+2003-09-24 Daniel Jacobowitz <drow@mvista.com>
+
+ * configure.in: Use AC_PROG_CPP_WERROR.
+ * configure: Regenerated.
+
+2003-09-22 Andrew Cagney <cagney@redhat.com>
+
+ * floatformat.c (floatformat_i387_ext_is_valid): New function.
+ (floatformat_always_valid): New function.
+ (floatformat_i387_ext): Initialize new "is_valid" field to
+ "floatformat_i387_ext_is_valid".
+ (floatformat_ieee_single_little): Initialize "is_valid" field to
+ floatformat_always_valid.
+ (floatformat_ieee_double_big): Ditto.
+ (floatformat_ieee_double_little): Ditto.
+ (floatformat_ieee_double_little): Ditto.
+ (floatformat_ieee_double_littlebyte_bigword): Ditto.
+ (floatformat_i960_ext): Ditto.
+ (floatformat_m88110_ext): Ditto.
+ (floatformat_m88110_harris_ext): Ditto.
+ (floatformat_arm_ext_big): Ditto.
+ (floatformat_arm_ext_littlebyte_bigword): Ditto.
+ (floatformat_ia64_spill_big): Ditto.
+ (floatformat_ia64_spill_little): Ditto.
+ (floatformat_ia64_quad_big): Ditto.
+ (floatformat_ia64_quad_little): Ditto.
+ (floatformat_ia64_quad_little): Ditto.
+ (floatformat_is_valid): Call "is_valid".
+
2003-09-15 Andrew Cagney <cagney@redhat.com>
* floatformat.c (get_field): Make "data" constant.
diff --git a/libiberty/configure b/libiberty/configure
index 98a641e..71f14e8 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -308,7 +308,7 @@ ac_includes_default="\
# 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 libiberty_topdir MAINT NOTMAINT MAKEINFO BUILD_INFO PERL HAVE_PERL build build_cpu build_vendor build_os host host_cpu host_vendor host_os AR ac_ct_AR RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT ac_libiberty_warn_cflags NO_MINUS_C_MINUS_O OUTPUT_OPTION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP LIBOBJS CHECK target_header_dir pexecute INSTALL_DEST LTLIBOBJS'
+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 libiberty_topdir MAINT NOTMAINT MAKEINFO BUILD_INFO PERL HAVE_PERL build build_cpu build_vendor build_os host host_cpu host_vendor host_os AR ac_ct_AR RANLIB ac_ct_RANLIB CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP ac_libiberty_warn_cflags NO_MINUS_C_MINUS_O OUTPUT_OPTION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA EGREP LIBOBJS CHECK target_header_dir pexecute INSTALL_DEST LTLIBOBJS'
ac_subst_files='host_makefile_frag'
# Initialize some variables set by options.
@@ -1410,14 +1410,25 @@ if test "x$MAKEINFO" = "x"; then
BUILD_INFO=
else
BUILD_INFO=info
- case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
- x*\ [1-3].* )
- MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
+ case "$MAKEINFO" in
+ */missing\ makeinfo*)
BUILD_INFO=
{ echo "$as_me:$LINENO: WARNING:
+*** Makeinfo is missing. Info documentation will not be built." >&5
+echo "$as_me: WARNING:
+*** Makeinfo is missing. Info documentation will not be built." >&2;}
+ ;;
+ *)
+ case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
+ x*\ [1-3].* )
+ MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
+ BUILD_INFO=
+ { echo "$as_me:$LINENO: WARNING:
*** Makeinfo is too old. Info documentation will not be built." >&5
echo "$as_me: WARNING:
*** Makeinfo is too old. Info documentation will not be built." >&2;}
+ ;;
+ esac
;;
esac
fi
@@ -2586,6 +2597,242 @@ 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_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 test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # 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. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* 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
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ 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
+#line $LINENO "configure"
+/* 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
+ 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
+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
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+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
+#line $LINENO "configure"
+/* 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
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ 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
+#line $LINENO "configure"
+/* 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
+ 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
+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
+
+
+ac_c_preproc_warn_flag=yes
if test x$GCC = xyes; then
ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
@@ -3134,33 +3381,37 @@ host_makefile_frag=${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_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 test "${ac_cv_prog_CPP+set}" = set; then
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+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
- # 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. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
@@ -3168,12 +3419,7 @@ _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
+#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
@@ -3192,18 +3438,30 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- :
+ eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- # Broken: fails on valid input.
-continue
+ eval "$as_ac_Header=no"
fi
rm -f conftest.err 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
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
+fi
+done
+
+echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
@@ -3211,63 +3469,61 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <ac_nonexistent.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+
+int
+main ()
+{
+ int s;
+ wait (&s);
+ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+ ;
+ return 0;
+}
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
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
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
+ (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_sys_wait_h=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- # Passes both tests.
-ac_preproc_ok=:
-break
+ac_cv_header_sys_wait_h=no
fi
-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
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
+if test $ac_cv_header_sys_wait_h = yes; then
- done
- ac_cv_prog_CPP=$CPP
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_WAIT_H 1
+_ACEOF
fi
- CPP=$ac_cv_prog_CPP
+
+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
- ac_cv_prog_CPP=$CPP
-fi
-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
#line $LINENO "configure"
/* confdefs.h. */
@@ -3275,42 +3531,56 @@ _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
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
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
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
+ (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 "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- # Broken: fails on valid input.
-continue
+ac_cv_header_time=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+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
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+
+echo "$as_me:$LINENO: checking whether errno must be declared" >&5
+echo $ECHO_N "checking whether errno must be declared... $ECHO_C" >&6
+if test "${libiberty_cv_declare_errno+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
@@ -3318,55 +3588,45 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <ac_nonexistent.h>
+#include <errno.h>
+int
+main ()
+{
+int x = errno;
+ ;
+ return 0;
+}
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
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
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
+ (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
+ libiberty_cv_declare_errno=no
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- # Passes both tests.
-ac_preproc_ok=:
-break
+libiberty_cv_declare_errno=yes
fi
-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; }; }
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5
+echo "${ECHO_T}$libiberty_cv_declare_errno" >&6
+if test $libiberty_cv_declare_errno = yes
+then
+cat >>confdefs.h <<\_ACEOF
+#define NEED_DECLARATION_ERRNO 1
+_ACEOF
-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
+fi
echo "$as_me:$LINENO: checking for egrep" >&5
@@ -3570,123 +3830,6 @@ _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>&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.$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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
-do
-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
-#line $LINENO "configure"
-/* 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>&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.$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
-#line $LINENO "configure"
-/* 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
@@ -3706,241 +3849,25 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
+ eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
+ eval "$as_ac_Header=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 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 preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
- 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: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_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
- 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 "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
-echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
-if test "${ac_cv_header_sys_wait_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/wait.h>
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
-#endif
-#ifndef WIFEXITED
-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-#endif
-
-int
-main ()
-{
- int s;
- wait (&s);
- s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-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); } &&
- { 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_sys_wait_h=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_sys_wait_h=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
-echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
-if test $ac_cv_header_sys_wait_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYS_WAIT_H 1
-_ACEOF
-
-fi
-
-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
-#line $LINENO "configure"
-/* 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 ()
-{
-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>&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 "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_time=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-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 <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
-_ACEOF
-
-fi
-
-
-echo "$as_me:$LINENO: checking whether errno must be declared" >&5
-echo $ECHO_N "checking whether errno must be declared... $ECHO_C" >&6
-if test "${libiberty_cv_declare_errno+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <errno.h>
-int
-main ()
-{
-int x = errno;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-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); } &&
- { 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
- libiberty_cv_declare_errno=no
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-libiberty_cv_declare_errno=yes
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $libiberty_cv_declare_errno" >&5
-echo "${ECHO_T}$libiberty_cv_declare_errno" >&6
-if test $libiberty_cv_declare_errno = yes
-then
-cat >>confdefs.h <<\_ACEOF
-#define NEED_DECLARATION_ERRNO 1
-_ACEOF
-
-fi
-
echo "$as_me:$LINENO: checking for uintptr_t" >&5
echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
@@ -4909,55 +4836,12 @@ _ACEOF
for ac_header in unistd.h vfork.h
do
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 "$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
-#line $LINENO "configure"
-/* 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>&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.$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
+ cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
@@ -4983,68 +4867,23 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
+ eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
+ eval "$as_ac_Header=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 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 preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
- 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: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_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
- 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
@@ -5859,55 +5698,12 @@ if test "x${ac_cv_func_mmap_fixed_mapped+set}" != xset; then
for ac_header in stdlib.h unistd.h
do
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 "$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
-#line $LINENO "configure"
-/* 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>&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.$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
+ cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
@@ -5933,68 +5729,23 @@ else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
+ eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
+ eval "$as_ac_Header=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 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 preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
- 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: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_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
- 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
@@ -7045,13 +6796,13 @@ 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,@CPP@,$CPP,;t t
s,@ac_libiberty_warn_cflags@,$ac_libiberty_warn_cflags,;t t
s,@NO_MINUS_C_MINUS_O@,$NO_MINUS_C_MINUS_O,;t t
s,@OUTPUT_OPTION@,$OUTPUT_OPTION,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@CHECK@,$CHECK,;t t
diff --git a/libiberty/configure.in b/libiberty/configure.in
index 56e8a19..eb8a99d 100644
--- a/libiberty/configure.in
+++ b/libiberty/configure.in
@@ -69,12 +69,21 @@ if test "x$MAKEINFO" = "x"; then
BUILD_INFO=
else
BUILD_INFO=info
- case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
- x*\ [[1-3]].* )
- MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
+ case "$MAKEINFO" in
+ */missing\ makeinfo*)
BUILD_INFO=
AC_MSG_WARN([
+*** Makeinfo is missing. Info documentation will not be built.])
+ ;;
+ *)
+ case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
+ x*\ [[1-3]].* )
+ MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
+ BUILD_INFO=
+ AC_MSG_WARN([
*** Makeinfo is too old. Info documentation will not be built.])
+ ;;
+ esac
;;
esac
fi
@@ -101,6 +110,7 @@ AC_CHECK_TOOL(RANLIB, ranlib, :)
GCC_NO_EXECUTABLES
AC_PROG_CC
+AC_PROG_CPP_WERROR
if test x$GCC = xyes; then
ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
diff --git a/libiberty/cplus-dem.c b/libiberty/cplus-dem.c
index 59afcd3..5e2e7a7 100644
--- a/libiberty/cplus-dem.c
+++ b/libiberty/cplus-dem.c
@@ -2043,13 +2043,10 @@ demangle_template (work, mangled, tname, trawname, is_type, remember)
const char *start;
int is_java_array = 0;
string temp;
- int bindex = 0;
(*mangled)++;
if (is_type)
{
- if (remember)
- bindex = register_Btype (work);
start = *mangled;
/* get template name */
if (**mangled == 'z')
@@ -2226,7 +2223,10 @@ demangle_template (work, mangled, tname, trawname, is_type, remember)
}
if (is_type && remember)
- remember_Btype (work, tname->b, LEN_STRING (tname), bindex);
+ {
+ const int bindex = register_Btype (work);
+ remember_Btype (work, tname->b, LEN_STRING (tname), bindex);
+ }
/*
if (work -> static_type)
diff --git a/libiberty/floatformat.c b/libiberty/floatformat.c
index ee87e27..daac661 100644
--- a/libiberty/floatformat.c
+++ b/libiberty/floatformat.c
@@ -29,6 +29,22 @@ extern char *memcpy ();
extern char *memset ();
#endif
+static unsigned long get_field PARAMS ((const unsigned char *,
+ enum floatformat_byteorders,
+ unsigned int,
+ unsigned int,
+ unsigned int));
+static int floatformat_always_valid PARAMS ((const struct floatformat *fmt,
+ const char *from));
+
+static int
+floatformat_always_valid (fmt, from)
+ const struct floatformat *fmt ATTRIBUTE_UNUSED;
+ const char *from ATTRIBUTE_UNUSED;
+{
+ return 1;
+}
+
/* The odds that CHAR_BIT will be anything but 8 are low enough that I'm not
going to bother with trying to muck around with whether it is defined in
a system header, what we do if not, etc. */
@@ -39,25 +55,29 @@ const struct floatformat floatformat_ieee_single_big =
{
floatformat_big, 32, 0, 1, 8, 127, 255, 9, 23,
floatformat_intbit_no,
- "floatformat_ieee_single_big"
+ "floatformat_ieee_single_big",
+ floatformat_always_valid
};
const struct floatformat floatformat_ieee_single_little =
{
floatformat_little, 32, 0, 1, 8, 127, 255, 9, 23,
floatformat_intbit_no,
- "floatformat_ieee_single_little"
+ "floatformat_ieee_single_little",
+ floatformat_always_valid
};
const struct floatformat floatformat_ieee_double_big =
{
floatformat_big, 64, 0, 1, 11, 1023, 2047, 12, 52,
floatformat_intbit_no,
- "floatformat_ieee_double_big"
+ "floatformat_ieee_double_big",
+ floatformat_always_valid
};
const struct floatformat floatformat_ieee_double_little =
{
floatformat_little, 64, 0, 1, 11, 1023, 2047, 12, 52,
floatformat_intbit_no,
- "floatformat_ieee_double_little"
+ "floatformat_ieee_double_little",
+ floatformat_always_valid
};
/* floatformat for IEEE double, little endian byte order, with big endian word
@@ -67,34 +87,64 @@ const struct floatformat floatformat_ieee_double_littlebyte_bigword =
{
floatformat_littlebyte_bigword, 64, 0, 1, 11, 1023, 2047, 12, 52,
floatformat_intbit_no,
- "floatformat_ieee_double_littlebyte_bigword"
+ "floatformat_ieee_double_littlebyte_bigword",
+ floatformat_always_valid
};
+static int floatformat_i387_ext_is_valid PARAMS ((const struct floatformat *fmt, const char *from));
+
+static int
+floatformat_i387_ext_is_valid (fmt, from)
+ const struct floatformat *fmt;
+ const char *from;
+{
+ /* In the i387 double-extended format, if the exponent is all ones,
+ then the integer bit must be set. If the exponent is neither 0
+ nor ~0, the intbit must also be set. Only if the exponent is
+ zero can it be zero, and then it must be zero. */
+ unsigned long exponent, int_bit;
+ const unsigned char *ufrom = (const unsigned char *) from;
+
+ exponent = get_field (ufrom, fmt->byteorder, fmt->totalsize,
+ fmt->exp_start, fmt->exp_len);
+ int_bit = get_field (ufrom, fmt->byteorder, fmt->totalsize,
+ fmt->man_start, 1);
+
+ if ((exponent == 0) != (int_bit == 0))
+ return 0;
+ else
+ return 1;
+}
+
const struct floatformat floatformat_i387_ext =
{
floatformat_little, 80, 0, 1, 15, 0x3fff, 0x7fff, 16, 64,
floatformat_intbit_yes,
- "floatformat_i387_ext"
+ "floatformat_i387_ext",
+ floatformat_i387_ext_is_valid
};
const struct floatformat floatformat_m68881_ext =
{
/* Note that the bits from 16 to 31 are unused. */
floatformat_big, 96, 0, 1, 15, 0x3fff, 0x7fff, 32, 64,
floatformat_intbit_yes,
- "floatformat_m68881_ext"
+ "floatformat_m68881_ext",
+ floatformat_always_valid
};
const struct floatformat floatformat_i960_ext =
{
/* Note that the bits from 0 to 15 are unused. */
floatformat_little, 96, 16, 17, 15, 0x3fff, 0x7fff, 32, 64,
floatformat_intbit_yes,
- "floatformat_i960_ext"
+ "floatformat_i960_ext",
+ floatformat_always_valid
};
const struct floatformat floatformat_m88110_ext =
{
floatformat_big, 80, 0, 1, 15, 0x3fff, 0x7fff, 16, 64,
floatformat_intbit_yes,
- "floatformat_m88110_ext"
+ "floatformat_m88110_ext",
+ floatformat_always_valid
};
const struct floatformat floatformat_m88110_harris_ext =
{
@@ -102,53 +152,54 @@ const struct floatformat floatformat_m88110_harris_ext =
double, and the last 64 bits are wasted. */
floatformat_big,128, 0, 1, 11, 0x3ff, 0x7ff, 12, 52,
floatformat_intbit_no,
- "floatformat_m88110_ext_harris"
+ "floatformat_m88110_ext_harris",
+ floatformat_always_valid
};
const struct floatformat floatformat_arm_ext_big =
{
/* Bits 1 to 16 are unused. */
floatformat_big, 96, 0, 17, 15, 0x3fff, 0x7fff, 32, 64,
floatformat_intbit_yes,
- "floatformat_arm_ext_big"
+ "floatformat_arm_ext_big",
+ floatformat_always_valid
};
const struct floatformat floatformat_arm_ext_littlebyte_bigword =
{
/* Bits 1 to 16 are unused. */
floatformat_littlebyte_bigword, 96, 0, 17, 15, 0x3fff, 0x7fff, 32, 64,
floatformat_intbit_yes,
- "floatformat_arm_ext_littlebyte_bigword"
+ "floatformat_arm_ext_littlebyte_bigword",
+ floatformat_always_valid
};
const struct floatformat floatformat_ia64_spill_big =
{
floatformat_big, 128, 0, 1, 17, 65535, 0x1ffff, 18, 64,
floatformat_intbit_yes,
- "floatformat_ia64_spill_big"
+ "floatformat_ia64_spill_big",
+ floatformat_always_valid
};
const struct floatformat floatformat_ia64_spill_little =
{
floatformat_little, 128, 0, 1, 17, 65535, 0x1ffff, 18, 64,
floatformat_intbit_yes,
- "floatformat_ia64_spill_little"
+ "floatformat_ia64_spill_little",
+ floatformat_always_valid
};
const struct floatformat floatformat_ia64_quad_big =
{
floatformat_big, 128, 0, 1, 15, 16383, 0x7fff, 16, 112,
floatformat_intbit_no,
- "floatformat_ia64_quad_big"
+ "floatformat_ia64_quad_big",
+ floatformat_always_valid
};
const struct floatformat floatformat_ia64_quad_little =
{
floatformat_little, 128, 0, 1, 15, 16383, 0x7fff, 16, 112,
floatformat_intbit_no,
- "floatformat_ia64_quad_little"
+ "floatformat_ia64_quad_little",
+ floatformat_always_valid
};
-static unsigned long get_field PARAMS ((const unsigned char *,
- enum floatformat_byteorders,
- unsigned int,
- unsigned int,
- unsigned int));
-
/* Extract a field which starts at START and is LEN bits long. DATA and
TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */
static unsigned long
@@ -411,30 +462,7 @@ floatformat_is_valid (fmt, from)
const struct floatformat *fmt;
const char *from;
{
- if (fmt == &floatformat_i387_ext)
- {
- /* In the i387 double-extended format, if the exponent is all
- ones, then the integer bit must be set. If the exponent
- is neither 0 nor ~0, the intbit must also be set. Only
- if the exponent is zero can it be zero, and then it must
- be zero. */
- unsigned long exponent, int_bit;
- const unsigned char *ufrom = (const unsigned char *) from;
-
- exponent = get_field (ufrom, fmt->byteorder, fmt->totalsize,
- fmt->exp_start, fmt->exp_len);
- int_bit = get_field (ufrom, fmt->byteorder, fmt->totalsize,
- fmt->man_start, 1);
-
- if ((exponent == 0) != (int_bit == 0))
- return 0;
- else
- return 1;
- }
-
- /* Other formats with invalid representations should be added
- here. */
- return 1;
+ return fmt->is_valid (fmt, from);
}
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c
index cbf8259..231fbc0 100644
--- a/libiberty/hashtab.c
+++ b/libiberty/hashtab.c
@@ -535,14 +535,14 @@ htab_find_slot_with_hash (htab, element, hash, insert)
if (insert == NO_INSERT)
return NULL;
- htab->n_elements++;
-
if (first_deleted_slot)
{
+ htab->n_deleted--;
*first_deleted_slot = EMPTY_ENTRY;
return first_deleted_slot;
}
+ htab->n_elements++;
return &htab->entries[index];
}
diff --git a/libiberty/strerror.c b/libiberty/strerror.c
index 18050c2..83a5992 100644
--- a/libiberty/strerror.c
+++ b/libiberty/strerror.c
@@ -462,6 +462,8 @@ static int num_error_names = 0;
#ifndef HAVE_SYS_ERRLIST
+#define sys_nerr sys_nerr__
+#define sys_errlist sys_errlist__
static int sys_nerr;
static const char **sys_errlist;
@@ -472,7 +474,6 @@ extern char *sys_errlist[];
#endif
-
/*
NAME
diff --git a/libiberty/testsuite/demangle-expected b/libiberty/testsuite/demangle-expected
index 6be66e1..8dfab8e 100644
--- a/libiberty/testsuite/demangle-expected
+++ b/libiberty/testsuite/demangle-expected
@@ -2853,7 +2853,7 @@ std::_Alloc_traits<std::basic_string<char, std::string_char_traits<char>, libcw:
#
--format=gnu-v3
_GLOBAL__I__Z2fnv
-global constructors keyed to fn()
+global constructors keyed to _Z2fnv
#
--format=gnu-v3
_Z1rM1GFivEMS_KFivES_M1HFivES1_4whatIKS_E5what2IS8_ES3_
@@ -2864,3 +2864,9 @@ r(int (G::*)(), int (G::*)() const, G, int (H::*)(), int (G::*)(), what<G const>
--format=auto
__CPR212____ct__Q3_3std141list__tm__128_Q2_3edm41THandle__tm__26_Q2_4emid15EMparticleChunkQ2_3std68allocator__tm__51_Q2_3edmJ37J14const_iteratorFRCQ3_3std18list__tm__7_Z1ZZ2Z8iterator
__CPR212____ct__Q3_3std141list__tm__128_Q2_3edm41THandle__tm__26_Q2_4emid15EMparticleChunkQ2_3std68allocator__tm__51_Q2_3edmJ37J14const_iteratorFRCQ3_3std18list__tm__7_Z1ZZ2Z8iterator
+#
+# This used to cause a crash. It doesn't follow the C++ encoding so
+# the demangled name should be identical to the original symbol name.
+--format=auto
+_test_array__L_1__B23b___clean.6
+_test_array__L_1__B23b___clean.6
diff --git a/libiberty/vasprintf.c b/libiberty/vasprintf.c
index 7752604..d3d4f3a 100644
--- a/libiberty/vasprintf.c
+++ b/libiberty/vasprintf.c
@@ -59,13 +59,13 @@ not be allocated, minus one is returned and @code{NULL} is stored in
*/
-static int int_vasprintf PARAMS ((char **, const char *, va_list *));
+static int int_vasprintf PARAMS ((char **, const char *, va_list));
static int
int_vasprintf (result, format, args)
char **result;
const char *format;
- va_list *args;
+ va_list args;
{
const char *p = format;
/* Add one to make sure that it is never zero, which might cause malloc
@@ -73,7 +73,11 @@ int_vasprintf (result, format, args)
int total_width = strlen (format) + 1;
va_list ap;
- memcpy ((PTR) &ap, (PTR) args, sizeof (va_list));
+#ifdef va_copy
+ va_copy (ap, args);
+#else
+ memcpy ((PTR) &ap, (PTR) &args, sizeof (va_list));
+#endif
while (*p != '\0')
{
@@ -135,12 +139,15 @@ int_vasprintf (result, format, args)
p++;
}
}
+#ifdef va_copy
+ va_end (ap);
+#endif
#ifdef TEST
global_total_width = total_width;
#endif
*result = (char *) malloc (total_width);
if (*result != NULL)
- return vsprintf (*result, format, *args);
+ return vsprintf (*result, format, args);
else
return -1;
}
@@ -155,7 +162,7 @@ vasprintf (result, format, args)
va_list args;
#endif
{
- return int_vasprintf (result, format, &args);
+ return int_vasprintf (result, format, args);
}
#ifdef TEST
diff --git a/ltconfig b/ltconfig
index f49a2cf..0a8c7d2 100755
--- a/ltconfig
+++ b/ltconfig
@@ -1179,7 +1179,7 @@ hpux9* | hpux10* | hpux11*)
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32/usr/local/lib"
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
fi
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 9b109a6..2f613cb 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,52 @@
+2003-11-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * m68k-opc.c (m68k_opcodes): Reorder "fmovel".
+
+2003-11-03 Daniel Jacobowitz <drow@mvista.com>
+
+ * arm-dis.c (print_arm_insn): Print "-" after "#".
+
+2003-10-30 Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
+
+ * alpha-opc.c: Add support for a second argument to RPCC.
+
+2003-10-27 Stephane Carrez <stcarrez@nerim.fr>
+
+ * m68hc11-dis.c: Convert to ISO C90 prototypes.
+
+2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
+ Bernardo Innocenti <bernie@develer.com>
+
+ * m68k-dis.c: Add MCFv4/MCF5528x support.
+ * m68k-opc.c: Likewise.
+
+2003-10-10 Dave Brolley <brolley@redhat.com>
+
+ * frv-asm.c,frv-desc.c,frv-opc.c: Regenerated.
+
+2003-10-08 Dave Brolley <brolley@redhat.com>
+
+ * frv-desc.[ch], frv-opc.[ch]: Regenerated.
+
+2003-09-30 Bob Wilson <bob.wilson@acm.org>
+
+ * xtensa-dis.c (fetch_data): Remove numBytes parameter.
+ (print_insn_xtensa): Fix call to fetch_data.
+
+2003-09-30 Chris Demetriou <cgd@broadcom.com>
+
+ * mips-dis.c (mips_arch_choices): Add entry for "mips64r2"
+ (print_insn_args): Add handing for +E, +F, +G, and +H.
+ * mips-opc.c (I65): New define for MIPS64r2.
+ (mips_builtin_opcodes): Add "dext", "dextm", "dextu", "dins",
+ "dinsm", "dinsu", "drotl", "drotr", "drotr32", "drotrv", "dsbh",
+ and "dshd" for MIPS64r2. Adjust "dror", "dror32", and "drorv" to
+ be supported on MIPS64r2.
+
+2003-09-24 Dave Brolley <brolley@redhat.com>
+
+ * frv-desc.c, frv-opc.c, frv-opc.h: Regenerated.
+
2003-09-14 Andreas Jaeger <aj@suse.de>
* i386-dis.c: Convert to ISO C90 prototypes.
diff --git a/opcodes/alpha-opc.c b/opcodes/alpha-opc.c
index 8dc10e4..7cac7f8 100644
--- a/opcodes/alpha-opc.c
+++ b/opcodes/alpha-opc.c
@@ -1,5 +1,5 @@
/* alpha-opc.c -- Alpha AXP opcode list
- Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@cygnus.com>,
patterned after the PPC opcode handling written by Ian Lance Taylor.
@@ -1105,7 +1105,8 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "wmb", MFC(0x18,0x4400), BASE, ARG_NONE },
{ "fetch", MFC(0x18,0x8000), BASE, { ZA, PRB } },
{ "fetch_m", MFC(0x18,0xA000), BASE, { ZA, PRB } },
- { "rpcc", MFC(0x18,0xC000), BASE, { RA } },
+ { "rpcc", MFC(0x18,0xC000), BASE, { RA, ZB } },
+ { "rpcc", MFC(0x18,0xC000), BASE, { RA, RB } }, /* ev6 una */
{ "rc", MFC(0x18,0xE000), BASE, { RA } },
{ "ecb", MFC(0x18,0xE800), BASE, { ZA, PRB } }, /* ev56 una */
{ "rs", MFC(0x18,0xF000), BASE, { RA } },
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index ac36e88..5f8fc4c 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -286,7 +286,7 @@ print_insn_arm (pc, info, given)
{
int offset = given & 0xfff;
if (offset)
- func (stream, ", %s#%d",
+ func (stream, ", #%s%d",
(((given & 0x00800000) == 0)
? "-" : ""), offset);
}
@@ -307,7 +307,7 @@ print_insn_arm (pc, info, given)
{
int offset = given & 0xfff;
if (offset)
- func (stream, "], %s#%d",
+ func (stream, "], #%s%d",
(((given & 0x00800000) == 0)
? "-" : ""), offset);
else
@@ -350,7 +350,7 @@ print_insn_arm (pc, info, given)
/* Immediate. */
int offset = ((given & 0xf00) >> 4) | (given & 0xf);
if (offset)
- func (stream, ", %s#%d",
+ func (stream, ", #%s%d",
(((given & 0x00800000) == 0)
? "-" : ""), offset);
}
@@ -374,7 +374,7 @@ print_insn_arm (pc, info, given)
/* Immediate. */
int offset = ((given & 0xf00) >> 4) | (given & 0xf);
if (offset)
- func (stream, "], %s#%d",
+ func (stream, "], #%s%d",
(((given & 0x00800000) == 0)
? "-" : ""), offset);
else
@@ -451,7 +451,7 @@ print_insn_arm (pc, info, given)
int offset = given & 0xff;
if (offset)
- func (stream, ", %s#%d]%s",
+ func (stream, ", #%s%d]%s",
((given & 0x00800000) == 0 ? "-" : ""),
offset * 4,
((given & 0x00200000) != 0 ? "!" : ""));
@@ -467,7 +467,7 @@ print_insn_arm (pc, info, given)
if (given & (1 << 21))
{
if (offset)
- func (stream, ", %s#%d",
+ func (stream, ", #%s%d",
((given & 0x00800000) == 0 ? "-" : ""),
offset * 4);
}
@@ -876,12 +876,12 @@ print_insn_arm (pc, info, given)
if (offset)
{
if ((given & 0x01000000) != 0)
- func (stream, ", %s#%d]%s",
+ func (stream, ", #%s%d]%s",
((given & 0x00800000) == 0 ? "-" : ""),
offset * multiplier,
((given & 0x00200000) != 0 ? "!" : ""));
else
- func (stream, "], %s#%d",
+ func (stream, "], #%s%d",
((given & 0x00800000) == 0 ? "-" : ""),
offset * multiplier);
}
diff --git a/opcodes/disassemble.c b/opcodes/disassemble.c
index 2d1358e..14113b5 100644
--- a/opcodes/disassemble.c
+++ b/opcodes/disassemble.c
@@ -145,7 +145,8 @@ disassembler (abfd)
|| bfd_get_mach (abfd) == bfd_mach_h8300hn)
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_h8300sn
+ || bfd_get_mach (abfd) == bfd_mach_h8300sx)
disassemble = print_insn_h8300s;
else
disassemble = print_insn_h8300;
diff --git a/opcodes/frv-asm.c b/opcodes/frv-asm.c
index 1d24b28..678a250 100644
--- a/opcodes/frv-asm.c
+++ b/opcodes/frv-asm.c
@@ -476,7 +476,7 @@ frv_cgen_parse_operand (cd, opindex, strp, fields)
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_cccr_names, & fields->f_CCi);
break;
case FRV_OPERAND_CPRDOUBLEK :
- errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_cpr_names, & fields->f_CPRk);
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_cpr_names, & fields->f_CPRk);
break;
case FRV_OPERAND_CPRI :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_cpr_names, & fields->f_CPRi);
@@ -515,13 +515,13 @@ frv_cgen_parse_operand (cd, opindex, strp, fields)
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fccr_names, & fields->f_FCCk);
break;
case FRV_OPERAND_FRDOUBLEI :
- errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRi);
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRi);
break;
case FRV_OPERAND_FRDOUBLEJ :
- errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRj);
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRj);
break;
case FRV_OPERAND_FRDOUBLEK :
- errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRk);
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRk);
break;
case FRV_OPERAND_FRI :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRi);
@@ -557,7 +557,7 @@ frv_cgen_parse_operand (cd, opindex, strp, fields)
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_fr_names, & fields->f_FRk);
break;
case FRV_OPERAND_GRDOUBLEK :
- errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_gr_names, & fields->f_GRk);
+ errmsg = parse_even_register (cd, strp, & frv_cgen_opval_gr_names, & fields->f_GRk);
break;
case FRV_OPERAND_GRI :
errmsg = cgen_parse_keyword (cd, strp, & frv_cgen_opval_gr_names, & fields->f_GRi);
diff --git a/opcodes/frv-desc.c b/opcodes/frv-desc.c
index 1e66026..9cc85fe 100644
--- a/opcodes/frv-desc.c
+++ b/opcodes/frv-desc.c
@@ -47,6 +47,7 @@ static const CGEN_ATTR_ENTRY MACH_attr[] =
{
{ "base", MACH_BASE },
{ "frv", MACH_FRV },
+ { "fr550", MACH_FR550 },
{ "fr500", MACH_FR500 },
{ "fr400", MACH_FR400 },
{ "tomcat", MACH_TOMCAT },
@@ -68,10 +69,14 @@ static const CGEN_ATTR_ENTRY UNIT_attr[] =
{ "I0", UNIT_I0 },
{ "I1", UNIT_I1 },
{ "I01", UNIT_I01 },
+ { "I2", UNIT_I2 },
+ { "I3", UNIT_I3 },
{ "IALL", UNIT_IALL },
{ "FM0", UNIT_FM0 },
{ "FM1", UNIT_FM1 },
{ "FM01", UNIT_FM01 },
+ { "FM2", UNIT_FM2 },
+ { "FM3", UNIT_FM3 },
{ "FMALL", UNIT_FMALL },
{ "FMLOW", UNIT_FMLOW },
{ "B0", UNIT_B0 },
@@ -146,6 +151,37 @@ static const CGEN_ATTR_ENTRY FR500_MAJOR_attr[] =
{ 0, 0 }
};
+static const CGEN_ATTR_ENTRY FR550_MAJOR_attr[] =
+{
+ { "NONE", FR550_MAJOR_NONE },
+ { "I_1", FR550_MAJOR_I_1 },
+ { "I_2", FR550_MAJOR_I_2 },
+ { "I_3", FR550_MAJOR_I_3 },
+ { "I_4", FR550_MAJOR_I_4 },
+ { "I_5", FR550_MAJOR_I_5 },
+ { "I_6", FR550_MAJOR_I_6 },
+ { "I_7", FR550_MAJOR_I_7 },
+ { "I_8", FR550_MAJOR_I_8 },
+ { "B_1", FR550_MAJOR_B_1 },
+ { "B_2", FR550_MAJOR_B_2 },
+ { "B_3", FR550_MAJOR_B_3 },
+ { "B_4", FR550_MAJOR_B_4 },
+ { "B_5", FR550_MAJOR_B_5 },
+ { "B_6", FR550_MAJOR_B_6 },
+ { "C_1", FR550_MAJOR_C_1 },
+ { "C_2", FR550_MAJOR_C_2 },
+ { "F_1", FR550_MAJOR_F_1 },
+ { "F_2", FR550_MAJOR_F_2 },
+ { "F_3", FR550_MAJOR_F_3 },
+ { "F_4", FR550_MAJOR_F_4 },
+ { "M_1", FR550_MAJOR_M_1 },
+ { "M_2", FR550_MAJOR_M_2 },
+ { "M_3", FR550_MAJOR_M_3 },
+ { "M_4", FR550_MAJOR_M_4 },
+ { "M_5", FR550_MAJOR_M_5 },
+ { 0, 0 }
+};
+
const CGEN_ATTR_TABLE frv_cgen_ifield_attr_table[] =
{
{ "MACH", & MACH_attr[0], & MACH_attr[0] },
@@ -189,6 +225,7 @@ const CGEN_ATTR_TABLE frv_cgen_insn_attr_table[] =
{ "UNIT", & UNIT_attr[0], & UNIT_attr[0] },
{ "FR400-MAJOR", & FR400_MAJOR_attr[0], & FR400_MAJOR_attr[0] },
{ "FR500-MAJOR", & FR500_MAJOR_attr[0], & FR500_MAJOR_attr[0] },
+ { "FR550-MAJOR", & FR550_MAJOR_attr[0], & FR550_MAJOR_attr[0] },
{ "ALIAS", &bool_attr[0], &bool_attr[0] },
{ "VIRTUAL", &bool_attr[0], &bool_attr[0] },
{ "UNCOND-CTI", &bool_attr[0], &bool_attr[0] },
@@ -218,6 +255,7 @@ static const CGEN_ISA frv_cgen_isa_table[] = {
static const CGEN_MACH frv_cgen_mach_table[] = {
{ "frv", "frv", MACH_FRV, 0 },
+ { "fr550", "fr550", MACH_FR550, 0 },
{ "fr500", "fr500", MACH_FR500, 0 },
{ "tomcat", "tomcat", MACH_TOMCAT, 0 },
{ "fr400", "fr400", MACH_FR400, 0 },
@@ -527,6 +565,8 @@ static CGEN_KEYWORD_ENTRY frv_cgen_opval_spr_names_entries[] =
{ "cccr", 263, {0, {0}}, 0, 0 },
{ "lr", 272, {0, {0}}, 0, 0 },
{ "lcr", 273, {0, {0}}, 0, 0 },
+ { "iacc0h", 280, {0, {0}}, 0, 0 },
+ { "iacc0l", 281, {0, {0}}, 0, 0 },
{ "isr", 288, {0, {0}}, 0, 0 },
{ "neear0", 352, {0, {0}}, 0, 0 },
{ "neear1", 353, {0, {0}}, 0, 0 },
@@ -1464,7 +1504,7 @@ static CGEN_KEYWORD_ENTRY frv_cgen_opval_spr_names_entries[] =
CGEN_KEYWORD frv_cgen_opval_spr_names =
{
& frv_cgen_opval_spr_names_entries[0],
- 1005,
+ 1007,
0, 0, 0, 0, ""
};
@@ -1618,6 +1658,18 @@ CGEN_KEYWORD frv_cgen_opval_acc_names =
0, 0, 0, 0, ""
};
+static CGEN_KEYWORD_ENTRY frv_cgen_opval_iacc0_names_entries[] =
+{
+ { "iacc0", 0, {0, {0}}, 0, 0 }
+};
+
+CGEN_KEYWORD frv_cgen_opval_iacc0_names =
+{
+ & frv_cgen_opval_iacc0_names_entries[0],
+ 1,
+ 0, 0, 0, 0, ""
+};
+
static CGEN_KEYWORD_ENTRY frv_cgen_opval_iccr_names_entries[] =
{
{ "icc0", 0, {0, {0}}, 0, 0 },
@@ -1764,6 +1816,7 @@ const CGEN_HW_ENTRY frv_cgen_hw_table[] =
{ "h-accg", HW_H_ACCG, CGEN_ASM_KEYWORD, (PTR) & frv_cgen_opval_accg_names, { 0|A(VIRTUAL)|A(PROFILE), { (1<<MACH_BASE) } } },
{ "h-acc40S", HW_H_ACC40S, CGEN_ASM_KEYWORD, (PTR) & frv_cgen_opval_acc_names, { 0|A(VIRTUAL)|A(PROFILE), { (1<<MACH_BASE) } } },
{ "h-acc40U", HW_H_ACC40U, CGEN_ASM_KEYWORD, (PTR) & frv_cgen_opval_acc_names, { 0|A(VIRTUAL)|A(PROFILE), { (1<<MACH_BASE) } } },
+ { "h-iacc0", HW_H_IACC0, CGEN_ASM_KEYWORD, (PTR) & frv_cgen_opval_iacc0_names, { 0|A(VIRTUAL)|A(PROFILE), { (1<<MACH_FR400) } } },
{ "h-iccr", HW_H_ICCR, CGEN_ASM_KEYWORD, (PTR) & frv_cgen_opval_iccr_names, { 0|A(PROFILE), { (1<<MACH_BASE) } } },
{ "h-fccr", HW_H_FCCR, CGEN_ASM_KEYWORD, (PTR) & frv_cgen_opval_fccr_names, { 0|A(PROFILE), { (1<<MACH_BASE) } } },
{ "h-cccr", HW_H_CCCR, CGEN_ASM_KEYWORD, (PTR) & frv_cgen_opval_cccr_names, { 0|A(PROFILE), { (1<<MACH_BASE) } } },
@@ -2284,3702 +2337,3732 @@ static const CGEN_IBASE frv_cgen_insn_table[MAX_INSNS] =
/* add$pack $GRi,$GRj,$GRk */
{
FRV_INSN_ADD, "add", "add", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* sub$pack $GRi,$GRj,$GRk */
{
FRV_INSN_SUB, "sub", "sub", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* and$pack $GRi,$GRj,$GRk */
{
FRV_INSN_AND, "and", "and", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* or$pack $GRi,$GRj,$GRk */
{
FRV_INSN_OR, "or", "or", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* xor$pack $GRi,$GRj,$GRk */
{
FRV_INSN_XOR, "xor", "xor", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* not$pack $GRj,$GRk */
{
FRV_INSN_NOT, "not", "not", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* sdiv$pack $GRi,$GRj,$GRk */
{
FRV_INSN_SDIV, "sdiv", "sdiv", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* nsdiv$pack $GRi,$GRj,$GRk */
{
FRV_INSN_NSDIV, "nsdiv", "nsdiv", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_MULT_DIV, FR400_MAJOR_NONE, FR500_MAJOR_I_1 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_MULT_DIV, FR400_MAJOR_NONE, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* udiv$pack $GRi,$GRj,$GRk */
{
FRV_INSN_UDIV, "udiv", "udiv", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* nudiv$pack $GRi,$GRj,$GRk */
{
FRV_INSN_NUDIV, "nudiv", "nudiv", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_MULT_DIV, FR400_MAJOR_NONE, FR500_MAJOR_I_1 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_MULT_DIV, FR400_MAJOR_NONE, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* smul$pack $GRi,$GRj,$GRdoublek */
{
FRV_INSN_SMUL, "smul", "smul", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* umul$pack $GRi,$GRj,$GRdoublek */
{
FRV_INSN_UMUL, "umul", "umul", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
+ },
+/* smu$pack $GRi,$GRj */
+ {
+ FRV_INSN_SMU, "smu", "smu", 32,
+ { 0, { (1<<MACH_FR400), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_NONE, FR550_MAJOR_NONE } }
+ },
+/* smass$pack $GRi,$GRj */
+ {
+ FRV_INSN_SMASS, "smass", "smass", 32,
+ { 0, { (1<<MACH_FR400), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_NONE, FR550_MAJOR_NONE } }
+ },
+/* smsss$pack $GRi,$GRj */
+ {
+ FRV_INSN_SMSSS, "smsss", "smsss", 32,
+ { 0, { (1<<MACH_FR400), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_NONE, FR550_MAJOR_NONE } }
},
/* sll$pack $GRi,$GRj,$GRk */
{
FRV_INSN_SLL, "sll", "sll", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* srl$pack $GRi,$GRj,$GRk */
{
FRV_INSN_SRL, "srl", "srl", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* sra$pack $GRi,$GRj,$GRk */
{
FRV_INSN_SRA, "sra", "sra", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
+ },
+/* slass$pack $GRi,$GRj,$GRk */
+ {
+ FRV_INSN_SLASS, "slass", "slass", 32,
+ { 0, { (1<<MACH_FR400), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_NONE, FR550_MAJOR_NONE } }
+ },
+/* scutss$pack $GRj,$GRk */
+ {
+ FRV_INSN_SCUTSS, "scutss", "scutss", 32,
+ { 0, { (1<<MACH_FR400), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_NONE, FR550_MAJOR_NONE } }
},
/* scan$pack $GRi,$GRj,$GRk */
{
FRV_INSN_SCAN, "scan", "scan", 32,
- { 0, { (1<<MACH_BASE), UNIT_SCAN, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_SCAN, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* cadd$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CADD, "cadd", "cadd", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* csub$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSUB, "csub", "csub", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* cand$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CAND, "cand", "cand", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* cor$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_COR, "cor", "cor", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* cxor$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CXOR, "cxor", "cxor", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* cnot$pack $GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CNOT, "cnot", "cnot", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* csmul$pack $GRi,$GRj,$GRdoublek,$CCi,$cond */
{
FRV_INSN_CSMUL, "csmul", "csmul", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* csdiv$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSDIV, "csdiv", "csdiv", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* cudiv$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CUDIV, "cudiv", "cudiv", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* csll$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSLL, "csll", "csll", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* csrl$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSRL, "csrl", "csrl", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* csra$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSRA, "csra", "csra", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* cscan$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSCAN, "cscan", "cscan", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_SCAN, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_SCAN, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* addcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_ADDCC, "addcc", "addcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* subcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_SUBCC, "subcc", "subcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* andcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_ANDCC, "andcc", "andcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* orcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_ORCC, "orcc", "orcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* xorcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_XORCC, "xorcc", "xorcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* sllcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_SLLCC, "sllcc", "sllcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* srlcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_SRLCC, "srlcc", "srlcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* sracc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_SRACC, "sracc", "sracc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* smulcc$pack $GRi,$GRj,$GRdoublek,$ICCi_1 */
{
FRV_INSN_SMULCC, "smulcc", "smulcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* umulcc$pack $GRi,$GRj,$GRdoublek,$ICCi_1 */
{
FRV_INSN_UMULCC, "umulcc", "umulcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* caddcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CADDCC, "caddcc", "caddcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* csubcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSUBCC, "csubcc", "csubcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* csmulcc$pack $GRi,$GRj,$GRdoublek,$CCi,$cond */
{
FRV_INSN_CSMULCC, "csmulcc", "csmulcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* candcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CANDCC, "candcc", "candcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* corcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CORCC, "corcc", "corcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* cxorcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CXORCC, "cxorcc", "cxorcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* csllcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSLLCC, "csllcc", "csllcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* csrlcc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSRLCC, "csrlcc", "csrlcc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* csracc$pack $GRi,$GRj,$GRk,$CCi,$cond */
{
FRV_INSN_CSRACC, "csracc", "csracc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* addx$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_ADDX, "addx", "addx", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* subx$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_SUBX, "subx", "subx", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* addxcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_ADDXCC, "addxcc", "addxcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* subxcc$pack $GRi,$GRj,$GRk,$ICCi_1 */
{
FRV_INSN_SUBXCC, "subxcc", "subxcc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
+ },
+/* addss$pack $GRi,$GRj,$GRk */
+ {
+ FRV_INSN_ADDSS, "addss", "addss", 32,
+ { 0, { (1<<MACH_FR400), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_NONE, FR550_MAJOR_NONE } }
+ },
+/* subss$pack $GRi,$GRj,$GRk */
+ {
+ FRV_INSN_SUBSS, "subss", "subss", 32,
+ { 0, { (1<<MACH_FR400), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_NONE, FR550_MAJOR_NONE } }
},
/* addi$pack $GRi,$s12,$GRk */
{
FRV_INSN_ADDI, "addi", "addi", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* subi$pack $GRi,$s12,$GRk */
{
FRV_INSN_SUBI, "subi", "subi", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* andi$pack $GRi,$s12,$GRk */
{
FRV_INSN_ANDI, "andi", "andi", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* ori$pack $GRi,$s12,$GRk */
{
FRV_INSN_ORI, "ori", "ori", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* xori$pack $GRi,$s12,$GRk */
{
FRV_INSN_XORI, "xori", "xori", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* sdivi$pack $GRi,$s12,$GRk */
{
FRV_INSN_SDIVI, "sdivi", "sdivi", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* nsdivi$pack $GRi,$s12,$GRk */
{
FRV_INSN_NSDIVI, "nsdivi", "nsdivi", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_MULT_DIV, FR400_MAJOR_NONE, FR500_MAJOR_I_1 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_MULT_DIV, FR400_MAJOR_NONE, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* udivi$pack $GRi,$s12,$GRk */
{
FRV_INSN_UDIVI, "udivi", "udivi", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* nudivi$pack $GRi,$s12,$GRk */
{
FRV_INSN_NUDIVI, "nudivi", "nudivi", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_MULT_DIV, FR400_MAJOR_NONE, FR500_MAJOR_I_1 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_MULT_DIV, FR400_MAJOR_NONE, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* smuli$pack $GRi,$s12,$GRdoublek */
{
FRV_INSN_SMULI, "smuli", "smuli", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* umuli$pack $GRi,$s12,$GRdoublek */
{
FRV_INSN_UMULI, "umuli", "umuli", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* slli$pack $GRi,$s12,$GRk */
{
FRV_INSN_SLLI, "slli", "slli", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* srli$pack $GRi,$s12,$GRk */
{
FRV_INSN_SRLI, "srli", "srli", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* srai$pack $GRi,$s12,$GRk */
{
FRV_INSN_SRAI, "srai", "srai", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* scani$pack $GRi,$s12,$GRk */
{
FRV_INSN_SCANI, "scani", "scani", 32,
- { 0, { (1<<MACH_BASE), UNIT_SCAN, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_SCAN, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* addicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_ADDICC, "addicc", "addicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* subicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_SUBICC, "subicc", "subicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* andicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_ANDICC, "andicc", "andicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* oricc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_ORICC, "oricc", "oricc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* xoricc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_XORICC, "xoricc", "xoricc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* smulicc$pack $GRi,$s10,$GRdoublek,$ICCi_1 */
{
FRV_INSN_SMULICC, "smulicc", "smulicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* umulicc$pack $GRi,$s10,$GRdoublek,$ICCi_1 */
{
FRV_INSN_UMULICC, "umulicc", "umulicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_MULT_DIV, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_2 } }
},
/* sllicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_SLLICC, "sllicc", "sllicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* srlicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_SRLICC, "srlicc", "srlicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* sraicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_SRAICC, "sraicc", "sraicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* addxi$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_ADDXI, "addxi", "addxi", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* subxi$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_SUBXI, "subxi", "subxi", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* addxicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_ADDXICC, "addxicc", "addxicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* subxicc$pack $GRi,$s10,$GRk,$ICCi_1 */
{
FRV_INSN_SUBXICC, "subxicc", "subxicc", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* cmpb$pack $GRi,$GRj,$ICCi_1 */
{
FRV_INSN_CMPB, "cmpb", "cmpb", 32,
- { 0, { (1<<MACH_FR400), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_NONE, FR550_MAJOR_I_1 } }
},
/* cmpba$pack $GRi,$GRj,$ICCi_1 */
{
FRV_INSN_CMPBA, "cmpba", "cmpba", 32,
- { 0, { (1<<MACH_FR400), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_NONE, FR550_MAJOR_I_1 } }
},
/* setlo$pack $ulo16,$GRklo */
{
FRV_INSN_SETLO, "setlo", "setlo", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* sethi$pack $uhi16,$GRkhi */
{
FRV_INSN_SETHI, "sethi", "sethi", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* setlos$pack $slo16,$GRk */
{
FRV_INSN_SETLOS, "setlos", "setlos", 32,
- { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_I_1 } }
},
/* ldsb$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_LDSB, "ldsb", "ldsb", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldub$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_LDUB, "ldub", "ldub", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldsh$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_LDSH, "ldsh", "ldsh", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* lduh$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_LDUH, "lduh", "lduh", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ld$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_LD, "ld", "ld", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldbf$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_LDBF, "ldbf", "ldbf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldhf$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_LDHF, "ldhf", "ldhf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldf$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_LDF, "ldf", "ldf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldc$pack @($GRi,$GRj),$CPRk */
{
FRV_INSN_LDC, "ldc", "ldc", 32,
- { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* nldsb$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_NLDSB, "nldsb", "nldsb", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldub$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_NLDUB, "nldub", "nldub", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldsh$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_NLDSH, "nldsh", "nldsh", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nlduh$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_NLDUH, "nlduh", "nlduh", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nld$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_NLD, "nld", "nld", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldbf$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_NLDBF, "nldbf", "nldbf", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldhf$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_NLDHF, "nldhf", "nldhf", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldf$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_NLDF, "nldf", "nldf", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldd$pack @($GRi,$GRj),$GRdoublek */
{
FRV_INSN_LDD, "ldd", "ldd", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* lddf$pack @($GRi,$GRj),$FRdoublek */
{
FRV_INSN_LDDF, "lddf", "lddf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* lddc$pack @($GRi,$GRj),$CPRdoublek */
{
FRV_INSN_LDDC, "lddc", "lddc", 32,
- { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldd$pack @($GRi,$GRj),$GRdoublek */
{
FRV_INSN_NLDD, "nldd", "nldd", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nlddf$pack @($GRi,$GRj),$FRdoublek */
{
FRV_INSN_NLDDF, "nlddf", "nlddf", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldq$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_LDQ, "ldq", "ldq", 32,
- { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* ldqf$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_LDQF, "ldqf", "ldqf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* ldqc$pack @($GRi,$GRj),$CPRk */
{
FRV_INSN_LDQC, "ldqc", "ldqc", 32,
- { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* nldq$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_NLDQ, "nldq", "nldq", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* nldqf$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_NLDQF, "nldqf", "nldqf", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* ldsbu$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_LDSBU, "ldsbu", "ldsbu", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldubu$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_LDUBU, "ldubu", "ldubu", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldshu$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_LDSHU, "ldshu", "ldshu", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* lduhu$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_LDUHU, "lduhu", "lduhu", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldu$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_LDU, "ldu", "ldu", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldsbu$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_NLDSBU, "nldsbu", "nldsbu", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldubu$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_NLDUBU, "nldubu", "nldubu", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldshu$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_NLDSHU, "nldshu", "nldshu", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nlduhu$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_NLDUHU, "nlduhu", "nlduhu", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldu$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_NLDU, "nldu", "nldu", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldbfu$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_LDBFU, "ldbfu", "ldbfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldhfu$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_LDHFU, "ldhfu", "ldhfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldfu$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_LDFU, "ldfu", "ldfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldcu$pack @($GRi,$GRj),$CPRk */
{
FRV_INSN_LDCU, "ldcu", "ldcu", 32,
- { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* nldbfu$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_NLDBFU, "nldbfu", "nldbfu", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldhfu$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_NLDHFU, "nldhfu", "nldhfu", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldfu$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_NLDFU, "nldfu", "nldfu", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* lddu$pack @($GRi,$GRj),$GRdoublek */
{
FRV_INSN_LDDU, "lddu", "lddu", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nlddu$pack @($GRi,$GRj),$GRdoublek */
{
FRV_INSN_NLDDU, "nlddu", "nlddu", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* lddfu$pack @($GRi,$GRj),$FRdoublek */
{
FRV_INSN_LDDFU, "lddfu", "lddfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* lddcu$pack @($GRi,$GRj),$CPRdoublek */
{
FRV_INSN_LDDCU, "lddcu", "lddcu", 32,
- { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nlddfu$pack @($GRi,$GRj),$FRdoublek */
{
FRV_INSN_NLDDFU, "nlddfu", "nlddfu", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldqu$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_LDQU, "ldqu", "ldqu", 32,
- { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* nldqu$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_NLDQU, "nldqu", "nldqu", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* ldqfu$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_LDQFU, "ldqfu", "ldqfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* ldqcu$pack @($GRi,$GRj),$CPRk */
{
FRV_INSN_LDQCU, "ldqcu", "ldqcu", 32,
- { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* nldqfu$pack @($GRi,$GRj),$FRintk */
{
FRV_INSN_NLDQFU, "nldqfu", "nldqfu", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* ldsbi$pack @($GRi,$d12),$GRk */
{
FRV_INSN_LDSBI, "ldsbi", "ldsbi", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldshi$pack @($GRi,$d12),$GRk */
{
FRV_INSN_LDSHI, "ldshi", "ldshi", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldi$pack @($GRi,$d12),$GRk */
{
FRV_INSN_LDI, "ldi", "ldi", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldubi$pack @($GRi,$d12),$GRk */
{
FRV_INSN_LDUBI, "ldubi", "ldubi", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* lduhi$pack @($GRi,$d12),$GRk */
{
FRV_INSN_LDUHI, "lduhi", "lduhi", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldbfi$pack @($GRi,$d12),$FRintk */
{
FRV_INSN_LDBFI, "ldbfi", "ldbfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldhfi$pack @($GRi,$d12),$FRintk */
{
FRV_INSN_LDHFI, "ldhfi", "ldhfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldfi$pack @($GRi,$d12),$FRintk */
{
FRV_INSN_LDFI, "ldfi", "ldfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldsbi$pack @($GRi,$d12),$GRk */
{
FRV_INSN_NLDSBI, "nldsbi", "nldsbi", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldubi$pack @($GRi,$d12),$GRk */
{
FRV_INSN_NLDUBI, "nldubi", "nldubi", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldshi$pack @($GRi,$d12),$GRk */
{
FRV_INSN_NLDSHI, "nldshi", "nldshi", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nlduhi$pack @($GRi,$d12),$GRk */
{
FRV_INSN_NLDUHI, "nlduhi", "nlduhi", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldi$pack @($GRi,$d12),$GRk */
{
FRV_INSN_NLDI, "nldi", "nldi", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldbfi$pack @($GRi,$d12),$FRintk */
{
FRV_INSN_NLDBFI, "nldbfi", "nldbfi", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldhfi$pack @($GRi,$d12),$FRintk */
{
FRV_INSN_NLDHFI, "nldhfi", "nldhfi", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nldfi$pack @($GRi,$d12),$FRintk */
{
FRV_INSN_NLDFI, "nldfi", "nldfi", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* lddi$pack @($GRi,$d12),$GRdoublek */
{
FRV_INSN_LDDI, "lddi", "lddi", 32,
- { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* lddfi$pack @($GRi,$d12),$FRdoublek */
{
FRV_INSN_LDDFI, "lddfi", "lddfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nlddi$pack @($GRi,$d12),$GRdoublek */
{
FRV_INSN_NLDDI, "nlddi", "nlddi", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* nlddfi$pack @($GRi,$d12),$FRdoublek */
{
FRV_INSN_NLDDFI, "nlddfi", "nlddfi", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* ldqi$pack @($GRi,$d12),$GRk */
{
FRV_INSN_LDQI, "ldqi", "ldqi", 32,
- { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* ldqfi$pack @($GRi,$d12),$FRintk */
{
FRV_INSN_LDQFI, "ldqfi", "ldqfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
- },
-/* nldqi$pack @($GRi,$d12),$GRk */
- {
- FRV_INSN_NLDQI, "nldqi", "nldqi", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* nldqfi$pack @($GRi,$d12),$FRintk */
{
FRV_INSN_NLDQFI, "nldqfi", "nldqfi", 32,
- { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* stb$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STB, "stb", "stb", 32,
- { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* sth$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STH, "sth", "sth", 32,
- { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* st$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_ST, "st", "st", 32,
- { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* stbf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STBF, "stbf", "stbf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* sthf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STHF, "sthf", "sthf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* stf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STF, "stf", "stf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* stc$pack $CPRk,@($GRi,$GRj) */
{
FRV_INSN_STC, "stc", "stc", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* rstb$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_RSTB, "rstb", "rstb", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* rsth$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_RSTH, "rsth", "rsth", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* rst$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_RST, "rst", "rst", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* rstbf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_RSTBF, "rstbf", "rstbf", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* rsthf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_RSTHF, "rsthf", "rsthf", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* rstf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_RSTF, "rstf", "rstf", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
-/* std$pack $GRk,@($GRi,$GRj) */
+/* std$pack $GRdoublek,@($GRi,$GRj) */
{
FRV_INSN_STD, "std", "std", 32,
- { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
-/* stdf$pack $FRk,@($GRi,$GRj) */
+/* stdf$pack $FRdoublek,@($GRi,$GRj) */
{
FRV_INSN_STDF, "stdf", "stdf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
-/* stdc$pack $CPRk,@($GRi,$GRj) */
+/* stdc$pack $CPRdoublek,@($GRi,$GRj) */
{
FRV_INSN_STDC, "stdc", "stdc", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
-/* rstd$pack $GRk,@($GRi,$GRj) */
+/* rstd$pack $GRdoublek,@($GRi,$GRj) */
{
FRV_INSN_RSTD, "rstd", "rstd", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
-/* rstdf$pack $FRk,@($GRi,$GRj) */
+/* rstdf$pack $FRdoublek,@($GRi,$GRj) */
{
FRV_INSN_RSTDF, "rstdf", "rstdf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* stq$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STQ, "stq", "stq", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* stqf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STQF, "stqf", "stqf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* stqc$pack $CPRk,@($GRi,$GRj) */
{
FRV_INSN_STQC, "stqc", "stqc", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* rstq$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_RSTQ, "rstq", "rstq", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* rstqf$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_RSTQF, "rstqf", "rstqf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* stbu$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STBU, "stbu", "stbu", 32,
- { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* sthu$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STHU, "sthu", "sthu", 32,
- { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* stu$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STU, "stu", "stu", 32,
- { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* stbfu$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STBFU, "stbfu", "stbfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* sthfu$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STHFU, "sthfu", "sthfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* stfu$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STFU, "stfu", "stfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* stcu$pack $CPRk,@($GRi,$GRj) */
{
FRV_INSN_STCU, "stcu", "stcu", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
-/* stdu$pack $GRk,@($GRi,$GRj) */
+/* stdu$pack $GRdoublek,@($GRi,$GRj) */
{
FRV_INSN_STDU, "stdu", "stdu", 32,
- { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
-/* stdfu$pack $FRk,@($GRi,$GRj) */
+/* stdfu$pack $FRdoublek,@($GRi,$GRj) */
{
FRV_INSN_STDFU, "stdfu", "stdfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
-/* stdcu$pack $CPRk,@($GRi,$GRj) */
+/* stdcu$pack $CPRdoublek,@($GRi,$GRj) */
{
FRV_INSN_STDCU, "stdcu", "stdcu", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* stqu$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_STQU, "stqu", "stqu", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* stqfu$pack $FRintk,@($GRi,$GRj) */
{
FRV_INSN_STQFU, "stqfu", "stqfu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* stqcu$pack $CPRk,@($GRi,$GRj) */
{
FRV_INSN_STQCU, "stqcu", "stqcu", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* cldsb$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CLDSB, "cldsb", "cldsb", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldub$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CLDUB, "cldub", "cldub", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldsh$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CLDSH, "cldsh", "cldsh", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* clduh$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CLDUH, "clduh", "clduh", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cld$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CLD, "cld", "cld", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldbf$pack @($GRi,$GRj),$FRintk,$CCi,$cond */
{
FRV_INSN_CLDBF, "cldbf", "cldbf", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldhf$pack @($GRi,$GRj),$FRintk,$CCi,$cond */
{
FRV_INSN_CLDHF, "cldhf", "cldhf", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldf$pack @($GRi,$GRj),$FRintk,$CCi,$cond */
{
FRV_INSN_CLDF, "cldf", "cldf", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldd$pack @($GRi,$GRj),$GRdoublek,$CCi,$cond */
{
FRV_INSN_CLDD, "cldd", "cldd", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* clddf$pack @($GRi,$GRj),$FRdoublek,$CCi,$cond */
{
FRV_INSN_CLDDF, "clddf", "clddf", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldq$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CLDQ, "cldq", "cldq", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* cldsbu$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CLDSBU, "cldsbu", "cldsbu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldubu$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CLDUBU, "cldubu", "cldubu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldshu$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CLDSHU, "cldshu", "cldshu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* clduhu$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CLDUHU, "clduhu", "clduhu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldu$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CLDU, "cldu", "cldu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldbfu$pack @($GRi,$GRj),$FRintk,$CCi,$cond */
{
FRV_INSN_CLDBFU, "cldbfu", "cldbfu", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldhfu$pack @($GRi,$GRj),$FRintk,$CCi,$cond */
{
FRV_INSN_CLDHFU, "cldhfu", "cldhfu", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldfu$pack @($GRi,$GRj),$FRintk,$CCi,$cond */
{
FRV_INSN_CLDFU, "cldfu", "cldfu", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* clddu$pack @($GRi,$GRj),$GRdoublek,$CCi,$cond */
{
FRV_INSN_CLDDU, "clddu", "clddu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* clddfu$pack @($GRi,$GRj),$FRdoublek,$CCi,$cond */
{
FRV_INSN_CLDDFU, "clddfu", "clddfu", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_LOAD, FR400_MAJOR_I_2, FR500_MAJOR_I_2, FR550_MAJOR_I_3 } }
},
/* cldqu$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CLDQU, "cldqu", "cldqu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_LOAD, FR400_MAJOR_NONE, FR500_MAJOR_I_2, FR550_MAJOR_NONE } }
},
/* cstb$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTB, "cstb", "cstb", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* csth$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTH, "csth", "csth", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* cst$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CST, "cst", "cst", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* cstbf$pack $FRintk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTBF, "cstbf", "cstbf", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* csthf$pack $FRintk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTHF, "csthf", "csthf", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* cstf$pack $FRintk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTF, "cstf", "cstf", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
-/* cstd$pack $GRk,@($GRi,$GRj),$CCi,$cond */
+/* cstd$pack $GRdoublek,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTD, "cstd", "cstd", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
-/* cstdf$pack $FRk,@($GRi,$GRj),$CCi,$cond */
+/* cstdf$pack $FRdoublek,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTDF, "cstdf", "cstdf", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* cstq$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTQ, "cstq", "cstq", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* cstbu$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTBU, "cstbu", "cstbu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* csthu$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTHU, "csthu", "csthu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* cstu$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTU, "cstu", "cstu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* cstbfu$pack $FRintk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTBFU, "cstbfu", "cstbfu", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* csthfu$pack $FRintk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTHFU, "csthfu", "csthfu", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* cstfu$pack $FRintk,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTFU, "cstfu", "cstfu", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
-/* cstdu$pack $GRk,@($GRi,$GRj),$CCi,$cond */
+/* cstdu$pack $GRdoublek,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTDU, "cstdu", "cstdu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
-/* cstdfu$pack $FRk,@($GRi,$GRj),$CCi,$cond */
+/* cstdfu$pack $FRdoublek,@($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CSTDFU, "cstdfu", "cstdfu", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* stbi$pack $GRk,@($GRi,$d12) */
{
FRV_INSN_STBI, "stbi", "stbi", 32,
- { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* sthi$pack $GRk,@($GRi,$d12) */
{
FRV_INSN_STHI, "sthi", "sthi", 32,
- { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* sti$pack $GRk,@($GRi,$d12) */
{
FRV_INSN_STI, "sti", "sti", 32,
- { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* stbfi$pack $FRintk,@($GRi,$d12) */
{
FRV_INSN_STBFI, "stbfi", "stbfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* sthfi$pack $FRintk,@($GRi,$d12) */
{
FRV_INSN_STHFI, "sthfi", "sthfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* stfi$pack $FRintk,@($GRi,$d12) */
{
FRV_INSN_STFI, "stfi", "stfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
-/* stdi$pack $GRk,@($GRi,$d12) */
+/* stdi$pack $GRdoublek,@($GRi,$d12) */
{
FRV_INSN_STDI, "stdi", "stdi", 32,
- { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
-/* stdfi$pack $FRk,@($GRi,$d12) */
+/* stdfi$pack $FRdoublek,@($GRi,$d12) */
{
FRV_INSN_STDFI, "stdfi", "stdfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_STORE, FR400_MAJOR_I_3, FR500_MAJOR_I_3, FR550_MAJOR_I_4 } }
},
/* stqi$pack $GRk,@($GRi,$d12) */
{
FRV_INSN_STQI, "stqi", "stqi", 32,
- { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* stqfi$pack $FRintk,@($GRi,$d12) */
{
FRV_INSN_STQFI, "stqfi", "stqfi", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_STORE, FR400_MAJOR_NONE, FR500_MAJOR_I_3, FR550_MAJOR_NONE } }
},
/* swap$pack @($GRi,$GRj),$GRk */
{
FRV_INSN_SWAP, "swap", "swap", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* swapi$pack @($GRi,$d12),$GRk */
{
FRV_INSN_SWAPI, "swapi", "swapi", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* cswap$pack @($GRi,$GRj),$GRk,$CCi,$cond */
{
FRV_INSN_CSWAP, "cswap", "cswap", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* movgf$pack $GRj,$FRintk */
{
FRV_INSN_MOVGF, "movgf", "movgf", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4, FR550_MAJOR_I_5 } }
},
/* movfg$pack $FRintk,$GRj */
{
FRV_INSN_MOVFG, "movfg", "movfg", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4, FR550_MAJOR_I_5 } }
},
/* movgfd$pack $GRj,$FRintk */
{
FRV_INSN_MOVGFD, "movgfd", "movgfd", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4, FR550_MAJOR_I_5 } }
},
/* movfgd$pack $FRintk,$GRj */
{
FRV_INSN_MOVFGD, "movfgd", "movfgd", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4, FR550_MAJOR_I_5 } }
},
/* movgfq$pack $GRj,$FRintk */
{
FRV_INSN_MOVGFQ, "movgfq", "movgfq", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_4 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_4, FR550_MAJOR_NONE } }
},
/* movfgq$pack $FRintk,$GRj */
{
FRV_INSN_MOVFGQ, "movfgq", "movfgq", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_4 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV), UNIT_I0, FR400_MAJOR_NONE, FR500_MAJOR_I_4, FR550_MAJOR_NONE } }
},
/* cmovgf$pack $GRj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMOVGF, "cmovgf", "cmovgf", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4, FR550_MAJOR_I_5 } }
},
/* cmovfg$pack $FRintk,$GRj,$CCi,$cond */
{
FRV_INSN_CMOVFG, "cmovfg", "cmovfg", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4, FR550_MAJOR_I_5 } }
},
/* cmovgfd$pack $GRj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMOVGFD, "cmovgfd", "cmovgfd", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4, FR550_MAJOR_I_5 } }
},
/* cmovfgd$pack $FRintk,$GRj,$CCi,$cond */
{
FRV_INSN_CMOVFGD, "cmovfgd", "cmovfgd", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_4, FR500_MAJOR_I_4, FR550_MAJOR_I_5 } }
},
/* movgs$pack $GRj,$spr */
{
FRV_INSN_MOVGS, "movgs", "movgs", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* movsg$pack $spr,$GRj */
{
FRV_INSN_MOVSG, "movsg", "movsg", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* bra$pack $hint_taken$label16 */
{
FRV_INSN_BRA, "bra", "bra", 32,
- { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bno$pack$hint_not_taken */
{
FRV_INSN_BNO, "bno", "bno", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* beq$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BEQ, "beq", "beq", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bne$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BNE, "bne", "bne", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* ble$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BLE, "ble", "ble", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bgt$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BGT, "bgt", "bgt", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* blt$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BLT, "blt", "blt", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bge$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BGE, "bge", "bge", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bls$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BLS, "bls", "bls", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bhi$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BHI, "bhi", "bhi", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bc$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BC, "bc", "bc", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bnc$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BNC, "bnc", "bnc", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bn$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BN, "bn", "bn", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bp$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BP, "bp", "bp", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bv$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BV, "bv", "bv", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bnv$pack $ICCi_2,$hint,$label16 */
{
FRV_INSN_BNV, "bnv", "bnv", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbra$pack $hint_taken$label16 */
{
FRV_INSN_FBRA, "fbra", "fbra", 32,
- { 0|A(FR_ACCESS)|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbno$pack$hint_not_taken */
{
FRV_INSN_FBNO, "fbno", "fbno", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbne$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBNE, "fbne", "fbne", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbeq$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBEQ, "fbeq", "fbeq", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fblg$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBLG, "fblg", "fblg", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbue$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBUE, "fbue", "fbue", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbul$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBUL, "fbul", "fbul", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbge$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBGE, "fbge", "fbge", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fblt$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBLT, "fblt", "fblt", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbuge$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBUGE, "fbuge", "fbuge", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbug$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBUG, "fbug", "fbug", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fble$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBLE, "fble", "fble", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbgt$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBGT, "fbgt", "fbgt", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbule$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBULE, "fbule", "fbule", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbu$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBU, "fbu", "fbu", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* fbo$pack $FCCi_2,$hint,$label16 */
{
FRV_INSN_FBO, "fbo", "fbo", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_1, FR500_MAJOR_B_1, FR550_MAJOR_B_1 } }
},
/* bctrlr$pack $ccond,$hint */
{
FRV_INSN_BCTRLR, "bctrlr", "bctrlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bralr$pack$hint_taken */
{
FRV_INSN_BRALR, "bralr", "bralr", 32,
- { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bnolr$pack$hint_not_taken */
{
FRV_INSN_BNOLR, "bnolr", "bnolr", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* beqlr$pack $ICCi_2,$hint */
{
FRV_INSN_BEQLR, "beqlr", "beqlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bnelr$pack $ICCi_2,$hint */
{
FRV_INSN_BNELR, "bnelr", "bnelr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* blelr$pack $ICCi_2,$hint */
{
FRV_INSN_BLELR, "blelr", "blelr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bgtlr$pack $ICCi_2,$hint */
{
FRV_INSN_BGTLR, "bgtlr", "bgtlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bltlr$pack $ICCi_2,$hint */
{
FRV_INSN_BLTLR, "bltlr", "bltlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bgelr$pack $ICCi_2,$hint */
{
FRV_INSN_BGELR, "bgelr", "bgelr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* blslr$pack $ICCi_2,$hint */
{
FRV_INSN_BLSLR, "blslr", "blslr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bhilr$pack $ICCi_2,$hint */
{
FRV_INSN_BHILR, "bhilr", "bhilr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bclr$pack $ICCi_2,$hint */
{
FRV_INSN_BCLR, "bclr", "bclr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bnclr$pack $ICCi_2,$hint */
{
FRV_INSN_BNCLR, "bnclr", "bnclr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bnlr$pack $ICCi_2,$hint */
{
FRV_INSN_BNLR, "bnlr", "bnlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bplr$pack $ICCi_2,$hint */
{
FRV_INSN_BPLR, "bplr", "bplr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bvlr$pack $ICCi_2,$hint */
{
FRV_INSN_BVLR, "bvlr", "bvlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bnvlr$pack $ICCi_2,$hint */
{
FRV_INSN_BNVLR, "bnvlr", "bnvlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbralr$pack$hint_taken */
{
FRV_INSN_FBRALR, "fbralr", "fbralr", 32,
- { 0|A(FR_ACCESS)|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbnolr$pack$hint_not_taken */
{
FRV_INSN_FBNOLR, "fbnolr", "fbnolr", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbeqlr$pack $FCCi_2,$hint */
{
FRV_INSN_FBEQLR, "fbeqlr", "fbeqlr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbnelr$pack $FCCi_2,$hint */
{
FRV_INSN_FBNELR, "fbnelr", "fbnelr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fblglr$pack $FCCi_2,$hint */
{
FRV_INSN_FBLGLR, "fblglr", "fblglr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbuelr$pack $FCCi_2,$hint */
{
FRV_INSN_FBUELR, "fbuelr", "fbuelr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbullr$pack $FCCi_2,$hint */
{
FRV_INSN_FBULLR, "fbullr", "fbullr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbgelr$pack $FCCi_2,$hint */
{
FRV_INSN_FBGELR, "fbgelr", "fbgelr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbltlr$pack $FCCi_2,$hint */
{
FRV_INSN_FBLTLR, "fbltlr", "fbltlr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbugelr$pack $FCCi_2,$hint */
{
FRV_INSN_FBUGELR, "fbugelr", "fbugelr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbuglr$pack $FCCi_2,$hint */
{
FRV_INSN_FBUGLR, "fbuglr", "fbuglr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fblelr$pack $FCCi_2,$hint */
{
FRV_INSN_FBLELR, "fblelr", "fblelr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbgtlr$pack $FCCi_2,$hint */
{
FRV_INSN_FBGTLR, "fbgtlr", "fbgtlr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbulelr$pack $FCCi_2,$hint */
{
FRV_INSN_FBULELR, "fbulelr", "fbulelr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbulr$pack $FCCi_2,$hint */
{
FRV_INSN_FBULR, "fbulr", "fbulr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* fbolr$pack $FCCi_2,$hint */
{
FRV_INSN_FBOLR, "fbolr", "fbolr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_B_3 } }
},
/* bcralr$pack $ccond$hint_taken */
{
FRV_INSN_BCRALR, "bcralr", "bcralr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bcnolr$pack$hint_not_taken */
{
FRV_INSN_BCNOLR, "bcnolr", "bcnolr", 32,
- { 0, { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bceqlr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCEQLR, "bceqlr", "bceqlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bcnelr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCNELR, "bcnelr", "bcnelr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bclelr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCLELR, "bclelr", "bclelr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bcgtlr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCGTLR, "bcgtlr", "bcgtlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bcltlr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCLTLR, "bcltlr", "bcltlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bcgelr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCGELR, "bcgelr", "bcgelr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bclslr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCLSLR, "bclslr", "bclslr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bchilr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCHILR, "bchilr", "bchilr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bcclr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCCLR, "bcclr", "bcclr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bcnclr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCNCLR, "bcnclr", "bcnclr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bcnlr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCNLR, "bcnlr", "bcnlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bcplr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCPLR, "bcplr", "bcplr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bcvlr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCVLR, "bcvlr", "bcvlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* bcnvlr$pack $ICCi_2,$ccond,$hint */
{
FRV_INSN_BCNVLR, "bcnvlr", "bcnvlr", 32,
- { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbralr$pack $ccond$hint_taken */
{
FRV_INSN_FCBRALR, "fcbralr", "fcbralr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbnolr$pack$hint_not_taken */
{
FRV_INSN_FCBNOLR, "fcbnolr", "fcbnolr", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbeqlr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBEQLR, "fcbeqlr", "fcbeqlr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbnelr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBNELR, "fcbnelr", "fcbnelr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcblglr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBLGLR, "fcblglr", "fcblglr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbuelr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBUELR, "fcbuelr", "fcbuelr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbullr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBULLR, "fcbullr", "fcbullr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbgelr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBGELR, "fcbgelr", "fcbgelr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbltlr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBLTLR, "fcbltlr", "fcbltlr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbugelr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBUGELR, "fcbugelr", "fcbugelr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbuglr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBUGLR, "fcbuglr", "fcbuglr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcblelr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBLELR, "fcblelr", "fcblelr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbgtlr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBGTLR, "fcbgtlr", "fcbgtlr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbulelr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBULELR, "fcbulelr", "fcbulelr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbulr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBULR, "fcbulr", "fcbulr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* fcbolr$pack $FCCi_2,$ccond,$hint */
{
FRV_INSN_FCBOLR, "fcbolr", "fcbolr", 32,
- { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2 } }
+ { 0|A(FR_ACCESS)|A(COND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_2, FR500_MAJOR_B_2, FR550_MAJOR_B_2 } }
},
/* jmpl$pack @($GRi,$GRj) */
{
FRV_INSN_JMPL, "jmpl", "jmpl", 32,
- { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_5, FR500_MAJOR_I_5 } }
+ { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_5, FR500_MAJOR_I_5, FR550_MAJOR_I_6 } }
},
/* calll$pack @($GRi,$GRj) */
{
FRV_INSN_CALLL, "calll", "calll", 32,
- { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_5, FR500_MAJOR_I_5 } }
+ { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_5, FR500_MAJOR_I_5, FR550_MAJOR_NONE } }
},
/* jmpil$pack @($GRi,$s12) */
{
FRV_INSN_JMPIL, "jmpil", "jmpil", 32,
- { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_5, FR500_MAJOR_I_5 } }
+ { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_5, FR500_MAJOR_I_5, FR550_MAJOR_I_6 } }
},
/* callil$pack @($GRi,$s12) */
{
FRV_INSN_CALLIL, "callil", "callil", 32,
- { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_5, FR500_MAJOR_I_5 } }
+ { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_5, FR500_MAJOR_I_5, FR550_MAJOR_NONE } }
},
/* call$pack $label24 */
{
FRV_INSN_CALL, "call", "call", 32,
- { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_4, FR500_MAJOR_B_4 } }
+ { 0|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_B0, FR400_MAJOR_B_4, FR500_MAJOR_B_4, FR550_MAJOR_B_4 } }
},
/* rett$pack $debug */
{
FRV_INSN_RETT, "rett", "rett", 32,
- { 0|A(PRIVILEGED)|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0|A(PRIVILEGED)|A(UNCOND_CTI), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* rei$pack $eir */
{
FRV_INSN_REI, "rei", "rei", 32,
- { 0|A(PRIVILEGED), { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_1 } }
+ { 0|A(PRIVILEGED), { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_1, FR550_MAJOR_NONE } }
},
/* tra$pack $GRi,$GRj */
{
FRV_INSN_TRA, "tra", "tra", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tno$pack */
{
FRV_INSN_TNO, "tno", "tno", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* teq$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TEQ, "teq", "teq", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tne$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TNE, "tne", "tne", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tle$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TLE, "tle", "tle", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tgt$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TGT, "tgt", "tgt", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tlt$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TLT, "tlt", "tlt", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tge$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TGE, "tge", "tge", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tls$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TLS, "tls", "tls", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* thi$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_THI, "thi", "thi", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tc$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TC, "tc", "tc", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tnc$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TNC, "tnc", "tnc", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tn$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TN, "tn", "tn", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tp$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TP, "tp", "tp", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tv$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TV, "tv", "tv", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tnv$pack $ICCi_2,$GRi,$GRj */
{
FRV_INSN_TNV, "tnv", "tnv", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftra$pack $GRi,$GRj */
{
FRV_INSN_FTRA, "ftra", "ftra", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftno$pack */
{
FRV_INSN_FTNO, "ftno", "ftno", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftne$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTNE, "ftne", "ftne", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* fteq$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTEQ, "fteq", "fteq", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftlg$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTLG, "ftlg", "ftlg", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftue$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTUE, "ftue", "ftue", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftul$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTUL, "ftul", "ftul", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftge$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTGE, "ftge", "ftge", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftlt$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTLT, "ftlt", "ftlt", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftuge$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTUGE, "ftuge", "ftuge", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftug$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTUG, "ftug", "ftug", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftle$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTLE, "ftle", "ftle", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftgt$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTGT, "ftgt", "ftgt", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftule$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTULE, "ftule", "ftule", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftu$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTU, "ftu", "ftu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* fto$pack $FCCi_2,$GRi,$GRj */
{
FRV_INSN_FTO, "fto", "fto", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tira$pack $GRi,$s12 */
{
FRV_INSN_TIRA, "tira", "tira", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tino$pack */
{
FRV_INSN_TINO, "tino", "tino", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tieq$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TIEQ, "tieq", "tieq", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tine$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TINE, "tine", "tine", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tile$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TILE, "tile", "tile", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tigt$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TIGT, "tigt", "tigt", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tilt$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TILT, "tilt", "tilt", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tige$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TIGE, "tige", "tige", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tils$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TILS, "tils", "tils", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tihi$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TIHI, "tihi", "tihi", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tic$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TIC, "tic", "tic", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tinc$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TINC, "tinc", "tinc", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tin$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TIN, "tin", "tin", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tip$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TIP, "tip", "tip", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tiv$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TIV, "tiv", "tiv", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* tinv$pack $ICCi_2,$GRi,$s12 */
{
FRV_INSN_TINV, "tinv", "tinv", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftira$pack $GRi,$s12 */
{
FRV_INSN_FTIRA, "ftira", "ftira", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftino$pack */
{
FRV_INSN_FTINO, "ftino", "ftino", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftine$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTINE, "ftine", "ftine", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftieq$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTIEQ, "ftieq", "ftieq", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftilg$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTILG, "ftilg", "ftilg", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftiue$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTIUE, "ftiue", "ftiue", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftiul$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTIUL, "ftiul", "ftiul", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftige$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTIGE, "ftige", "ftige", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftilt$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTILT, "ftilt", "ftilt", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftiuge$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTIUGE, "ftiuge", "ftiuge", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftiug$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTIUG, "ftiug", "ftiug", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftile$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTILE, "ftile", "ftile", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftigt$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTIGT, "ftigt", "ftigt", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftiule$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTIULE, "ftiule", "ftiule", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftiu$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTIU, "ftiu", "ftiu", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* ftio$pack $FCCi_2,$GRi,$s12 */
{
FRV_INSN_FTIO, "ftio", "ftio", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* break$pack */
{
FRV_INSN_BREAK, "break", "break", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* mtrap$pack */
{
FRV_INSN_MTRAP, "mtrap", "mtrap", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_1, FR500_MAJOR_C_1, FR550_MAJOR_C_1 } }
},
/* andcr$pack $CRi,$CRj,$CRk */
{
FRV_INSN_ANDCR, "andcr", "andcr", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6, FR550_MAJOR_B_6 } }
},
/* orcr$pack $CRi,$CRj,$CRk */
{
FRV_INSN_ORCR, "orcr", "orcr", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6, FR550_MAJOR_B_6 } }
},
/* xorcr$pack $CRi,$CRj,$CRk */
{
FRV_INSN_XORCR, "xorcr", "xorcr", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6, FR550_MAJOR_B_6 } }
},
/* nandcr$pack $CRi,$CRj,$CRk */
{
FRV_INSN_NANDCR, "nandcr", "nandcr", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6, FR550_MAJOR_B_6 } }
},
/* norcr$pack $CRi,$CRj,$CRk */
{
FRV_INSN_NORCR, "norcr", "norcr", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6, FR550_MAJOR_B_6 } }
},
/* andncr$pack $CRi,$CRj,$CRk */
{
FRV_INSN_ANDNCR, "andncr", "andncr", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6, FR550_MAJOR_B_6 } }
},
/* orncr$pack $CRi,$CRj,$CRk */
{
FRV_INSN_ORNCR, "orncr", "orncr", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6, FR550_MAJOR_B_6 } }
},
/* nandncr$pack $CRi,$CRj,$CRk */
{
FRV_INSN_NANDNCR, "nandncr", "nandncr", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6, FR550_MAJOR_B_6 } }
},
/* norncr$pack $CRi,$CRj,$CRk */
{
FRV_INSN_NORNCR, "norncr", "norncr", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6, FR550_MAJOR_B_6 } }
},
/* notcr$pack $CRj,$CRk */
{
FRV_INSN_NOTCR, "notcr", "notcr", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_6, FR500_MAJOR_B_6, FR550_MAJOR_B_6 } }
},
/* ckra$pack $CRj_int */
{
FRV_INSN_CKRA, "ckra", "ckra", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ckno$pack $CRj_int */
{
FRV_INSN_CKNO, "ckno", "ckno", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ckeq$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKEQ, "ckeq", "ckeq", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ckne$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKNE, "ckne", "ckne", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ckle$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKLE, "ckle", "ckle", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ckgt$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKGT, "ckgt", "ckgt", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cklt$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKLT, "cklt", "cklt", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ckge$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKGE, "ckge", "ckge", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ckls$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKLS, "ckls", "ckls", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ckhi$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKHI, "ckhi", "ckhi", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ckc$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKC, "ckc", "ckc", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cknc$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKNC, "cknc", "cknc", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ckn$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKN, "ckn", "ckn", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ckp$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKP, "ckp", "ckp", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ckv$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKV, "ckv", "ckv", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cknv$pack $ICCi_3,$CRj_int */
{
FRV_INSN_CKNV, "cknv", "cknv", 32,
- { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fckra$pack $CRj_float */
{
FRV_INSN_FCKRA, "fckra", "fckra", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fckno$pack $CRj_float */
{
FRV_INSN_FCKNO, "fckno", "fckno", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fckne$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKNE, "fckne", "fckne", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fckeq$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKEQ, "fckeq", "fckeq", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fcklg$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKLG, "fcklg", "fcklg", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fckue$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKUE, "fckue", "fckue", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fckul$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKUL, "fckul", "fckul", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fckge$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKGE, "fckge", "fckge", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fcklt$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKLT, "fcklt", "fcklt", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fckuge$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKUGE, "fckuge", "fckuge", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fckug$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKUG, "fckug", "fckug", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fckle$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKLE, "fckle", "fckle", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fckgt$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKGT, "fckgt", "fckgt", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fckule$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKULE, "fckule", "fckule", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fcku$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKU, "fcku", "fcku", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* fcko$pack $FCCi_3,$CRj_float */
{
FRV_INSN_FCKO, "fcko", "fcko", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckra$pack $CRj_int,$CCi,$cond */
{
FRV_INSN_CCKRA, "cckra", "cckra", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckno$pack $CRj_int,$CCi,$cond */
{
FRV_INSN_CCKNO, "cckno", "cckno", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckeq$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKEQ, "cckeq", "cckeq", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckne$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKNE, "cckne", "cckne", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckle$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKLE, "cckle", "cckle", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckgt$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKGT, "cckgt", "cckgt", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ccklt$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKLT, "ccklt", "ccklt", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckge$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKGE, "cckge", "cckge", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckls$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKLS, "cckls", "cckls", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckhi$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKHI, "cckhi", "cckhi", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckc$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKC, "cckc", "cckc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ccknc$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKNC, "ccknc", "ccknc", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckn$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKN, "cckn", "cckn", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckp$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKP, "cckp", "cckp", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cckv$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKV, "cckv", "cckv", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* ccknv$pack $ICCi_3,$CRj_int,$CCi,$cond */
{
FRV_INSN_CCKNV, "ccknv", "ccknv", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfckra$pack $CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKRA, "cfckra", "cfckra", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfckno$pack $CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKNO, "cfckno", "cfckno", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfckne$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKNE, "cfckne", "cfckne", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfckeq$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKEQ, "cfckeq", "cfckeq", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfcklg$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKLG, "cfcklg", "cfcklg", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfckue$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKUE, "cfckue", "cfckue", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfckul$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKUL, "cfckul", "cfckul", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfckge$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKGE, "cfckge", "cfckge", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfcklt$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKLT, "cfcklt", "cfcklt", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfckuge$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKUGE, "cfckuge", "cfckuge", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfckug$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKUG, "cfckug", "cfckug", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfckle$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKLE, "cfckle", "cfckle", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfckgt$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKGT, "cfckgt", "cfckgt", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfckule$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKULE, "cfckule", "cfckule", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfcku$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKU, "cfcku", "cfcku", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cfcko$pack $FCCi_3,$CRj_float,$CCi,$cond */
{
FRV_INSN_CFCKO, "cfcko", "cfcko", 32,
- { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5 } }
+ { 0|A(FR_ACCESS)|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_5, FR500_MAJOR_B_5, FR550_MAJOR_B_5 } }
},
/* cjmpl$pack @($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CJMPL, "cjmpl", "cjmpl", 32,
- { 0|A(CONDITIONAL)|A(COND_CTI), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_5, FR500_MAJOR_I_5 } }
+ { 0|A(CONDITIONAL)|A(COND_CTI), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_5, FR500_MAJOR_I_5, FR550_MAJOR_I_6 } }
},
/* ccalll$pack @($GRi,$GRj),$CCi,$cond */
{
FRV_INSN_CCALLL, "ccalll", "ccalll", 32,
- { 0|A(CONDITIONAL)|A(COND_CTI), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_5, FR500_MAJOR_I_5 } }
+ { 0|A(CONDITIONAL)|A(COND_CTI), { (1<<MACH_BASE), UNIT_I0, FR400_MAJOR_I_5, FR500_MAJOR_I_5, FR550_MAJOR_NONE } }
},
/* ici$pack @($GRi,$GRj) */
{
FRV_INSN_ICI, "ici", "ici", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* dci$pack @($GRi,$GRj) */
{
FRV_INSN_DCI, "dci", "dci", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* icei$pack @($GRi,$GRj),$ae */
{
FRV_INSN_ICEI, "icei", "icei", 32,
- { 0, { (1<<MACH_FR400), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_NONE, FR550_MAJOR_C_2 } }
},
/* dcei$pack @($GRi,$GRj),$ae */
{
FRV_INSN_DCEI, "dcei", "dcei", 32,
- { 0, { (1<<MACH_FR400), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_NONE, FR550_MAJOR_C_2 } }
},
/* dcf$pack @($GRi,$GRj) */
{
FRV_INSN_DCF, "dcf", "dcf", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* dcef$pack @($GRi,$GRj),$ae */
{
FRV_INSN_DCEF, "dcef", "dcef", 32,
- { 0, { (1<<MACH_FR400), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_NONE, FR550_MAJOR_C_2 } }
},
/* witlb$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_WITLB, "witlb", "witlb", 32,
- { 0|A(PRIVILEGED), { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_2 } }
+ { 0|A(PRIVILEGED), { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_2, FR550_MAJOR_NONE } }
},
/* wdtlb$pack $GRk,@($GRi,$GRj) */
{
FRV_INSN_WDTLB, "wdtlb", "wdtlb", 32,
- { 0|A(PRIVILEGED), { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_2 } }
+ { 0|A(PRIVILEGED), { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_2, FR550_MAJOR_NONE } }
},
/* itlbi$pack @($GRi,$GRj) */
{
FRV_INSN_ITLBI, "itlbi", "itlbi", 32,
- { 0|A(PRIVILEGED), { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_2 } }
+ { 0|A(PRIVILEGED), { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_2, FR550_MAJOR_NONE } }
},
/* dtlbi$pack @($GRi,$GRj) */
{
FRV_INSN_DTLBI, "dtlbi", "dtlbi", 32,
- { 0|A(PRIVILEGED), { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_2 } }
+ { 0|A(PRIVILEGED), { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_2, FR550_MAJOR_NONE } }
},
/* icpl$pack $GRi,$GRj,$lock */
{
FRV_INSN_ICPL, "icpl", "icpl", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* dcpl$pack $GRi,$GRj,$lock */
{
FRV_INSN_DCPL, "dcpl", "dcpl", 32,
- { 0, { (1<<MACH_BASE), UNIT_DCPL, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_DCPL, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_I_8 } }
},
/* icul$pack $GRi */
{
FRV_INSN_ICUL, "icul", "icul", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* dcul$pack $GRi */
{
FRV_INSN_DCUL, "dcul", "dcul", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* bar$pack */
{
FRV_INSN_BAR, "bar", "bar", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* membar$pack */
{
FRV_INSN_MEMBAR, "membar", "membar", 32,
- { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_C, FR400_MAJOR_C_2, FR500_MAJOR_C_2, FR550_MAJOR_C_2 } }
},
/* cop1$pack $s6_1,$CPRi,$CPRj,$CPRk */
{
FRV_INSN_COP1, "cop1", "cop1", 32,
- { 0, { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_2, FR550_MAJOR_NONE } }
},
/* cop2$pack $s6_1,$CPRi,$CPRj,$CPRk */
{
FRV_INSN_COP2, "cop2", "cop2", 32,
- { 0, { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_C, FR400_MAJOR_NONE, FR500_MAJOR_C_2, FR550_MAJOR_NONE } }
},
/* clrgr$pack $GRk */
{
FRV_INSN_CLRGR, "clrgr", "clrgr", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6, FR550_MAJOR_I_7 } }
},
/* clrfr$pack $FRk */
{
FRV_INSN_CLRFR, "clrfr", "clrfr", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6, FR550_MAJOR_I_7 } }
},
/* clrga$pack */
{
FRV_INSN_CLRGA, "clrga", "clrga", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6, FR550_MAJOR_I_7 } }
},
/* clrfa$pack */
{
FRV_INSN_CLRFA, "clrfa", "clrfa", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6, FR550_MAJOR_I_7 } }
},
/* commitgr$pack $GRk */
{
FRV_INSN_COMMITGR, "commitgr", "commitgr", 32,
- { 0, { (1<<MACH_FRV)|(1<<MACH_FR500), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6 } }
+ { 0, { (1<<MACH_FRV)|(1<<MACH_FR500)|(1<<MACH_FR550), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6, FR550_MAJOR_I_7 } }
},
/* commitfr$pack $FRk */
{
FRV_INSN_COMMITFR, "commitfr", "commitfr", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV)|(1<<MACH_FR500), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV)|(1<<MACH_FR500)|(1<<MACH_FR550), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6, FR550_MAJOR_I_7 } }
},
/* commitga$pack */
{
FRV_INSN_COMMITGA, "commitga", "commitga", 32,
- { 0, { (1<<MACH_FRV)|(1<<MACH_FR500), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6 } }
+ { 0, { (1<<MACH_FRV)|(1<<MACH_FR500)|(1<<MACH_FR550), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6, FR550_MAJOR_I_7 } }
},
/* commitfa$pack */
{
FRV_INSN_COMMITFA, "commitfa", "commitfa", 32,
- { 0|A(FR_ACCESS), { (1<<MACH_FRV)|(1<<MACH_FR500), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6 } }
+ { 0|A(FR_ACCESS), { (1<<MACH_FRV)|(1<<MACH_FR500)|(1<<MACH_FR550), UNIT_I01, FR400_MAJOR_NONE, FR500_MAJOR_I_6, FR550_MAJOR_I_7 } }
},
/* fitos$pack $FRintj,$FRk */
{
FRV_INSN_FITOS, "fitos", "fitos", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* fstoi$pack $FRj,$FRintk */
{
FRV_INSN_FSTOI, "fstoi", "fstoi", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* fitod$pack $FRintj,$FRdoublek */
{
FRV_INSN_FITOD, "fitod", "fitod", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_NONE } }
},
/* fdtoi$pack $FRdoublej,$FRintk */
{
FRV_INSN_FDTOI, "fdtoi", "fdtoi", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_NONE } }
},
/* fditos$pack $FRintj,$FRk */
{
FRV_INSN_FDITOS, "fditos", "fditos", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_NONE } }
},
/* fdstoi$pack $FRj,$FRintk */
{
FRV_INSN_FDSTOI, "fdstoi", "fdstoi", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_NONE } }
},
/* nfditos$pack $FRintj,$FRk */
{
FRV_INSN_NFDITOS, "nfditos", "nfditos", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_NONE } }
},
/* nfdstoi$pack $FRj,$FRintk */
{
FRV_INSN_NFDSTOI, "nfdstoi", "nfdstoi", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_NONE } }
},
/* cfitos$pack $FRintj,$FRk,$CCi,$cond */
{
FRV_INSN_CFITOS, "cfitos", "cfitos", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* cfstoi$pack $FRj,$FRintk,$CCi,$cond */
{
FRV_INSN_CFSTOI, "cfstoi", "cfstoi", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* nfitos$pack $FRintj,$FRk */
{
FRV_INSN_NFITOS, "nfitos", "nfitos", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* nfstoi$pack $FRj,$FRintk */
{
FRV_INSN_NFSTOI, "nfstoi", "nfstoi", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* fmovs$pack $FRj,$FRk */
{
FRV_INSN_FMOVS, "fmovs", "fmovs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* fmovd$pack $FRdoublej,$FRdoublek */
{
FRV_INSN_FMOVD, "fmovd", "fmovd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_NONE } }
},
/* fdmovs$pack $FRj,$FRk */
{
FRV_INSN_FDMOVS, "fdmovs", "fdmovs", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_NONE } }
},
/* 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_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 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, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* fnegs$pack $FRj,$FRk */
{
FRV_INSN_FNEGS, "fnegs", "fnegs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* fnegd$pack $FRdoublej,$FRdoublek */
{
FRV_INSN_FNEGD, "fnegd", "fnegd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_NONE } }
},
/* fdnegs$pack $FRj,$FRk */
{
FRV_INSN_FDNEGS, "fdnegs", "fdnegs", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_NONE } }
},
/* cfnegs$pack $FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFNEGS, "cfnegs", "cfnegs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* fabss$pack $FRj,$FRk */
{
FRV_INSN_FABSS, "fabss", "fabss", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* fabsd$pack $FRdoublej,$FRdoublek */
{
FRV_INSN_FABSD, "fabsd", "fabsd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_NONE } }
},
/* fdabss$pack $FRj,$FRk */
{
FRV_INSN_FDABSS, "fdabss", "fdabss", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_NONE } }
},
/* cfabss$pack $FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFABSS, "cfabss", "cfabss", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_1, FR550_MAJOR_F_2 } }
},
/* fsqrts$pack $FRj,$FRk */
{
FRV_INSN_FSQRTS, "fsqrts", "fsqrts", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4, FR550_MAJOR_F_3 } }
},
/* fdsqrts$pack $FRj,$FRk */
{
FRV_INSN_FDSQRTS, "fdsqrts", "fdsqrts", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4, FR550_MAJOR_NONE } }
},
/* nfdsqrts$pack $FRj,$FRk */
{
FRV_INSN_NFDSQRTS, "nfdsqrts", "nfdsqrts", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4, FR550_MAJOR_NONE } }
},
/* fsqrtd$pack $FRdoublej,$FRdoublek */
{
FRV_INSN_FSQRTD, "fsqrtd", "fsqrtd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4, FR550_MAJOR_NONE } }
},
/* cfsqrts$pack $FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFSQRTS, "cfsqrts", "cfsqrts", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4, FR550_MAJOR_F_3 } }
},
/* nfsqrts$pack $FRj,$FRk */
{
FRV_INSN_NFSQRTS, "nfsqrts", "nfsqrts", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4, FR550_MAJOR_F_3 } }
},
/* fadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FADDS, "fadds", "fadds", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2, FR550_MAJOR_F_2 } }
},
/* fsubs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FSUBS, "fsubs", "fsubs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2, FR550_MAJOR_F_2 } }
},
/* fmuls$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FMULS, "fmuls", "fmuls", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_3 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_3, FR550_MAJOR_F_3 } }
},
/* fdivs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FDIVS, "fdivs", "fdivs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4, FR550_MAJOR_F_3 } }
},
/* faddd$pack $FRdoublei,$FRdoublej,$FRdoublek */
{
FRV_INSN_FADDD, "faddd", "faddd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2, FR550_MAJOR_NONE } }
},
/* fsubd$pack $FRdoublei,$FRdoublej,$FRdoublek */
{
FRV_INSN_FSUBD, "fsubd", "fsubd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2, FR550_MAJOR_NONE } }
},
/* fmuld$pack $FRdoublei,$FRdoublej,$FRdoublek */
{
FRV_INSN_FMULD, "fmuld", "fmuld", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_3 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_3, FR550_MAJOR_NONE } }
},
/* fdivd$pack $FRdoublei,$FRdoublej,$FRdoublek */
{
FRV_INSN_FDIVD, "fdivd", "fdivd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_4 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_4, FR550_MAJOR_NONE } }
},
/* cfadds$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFADDS, "cfadds", "cfadds", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2, FR550_MAJOR_F_2 } }
},
/* cfsubs$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFSUBS, "cfsubs", "cfsubs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2, FR550_MAJOR_F_2 } }
},
/* cfmuls$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFMULS, "cfmuls", "cfmuls", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_3 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_3, FR550_MAJOR_F_3 } }
},
/* cfdivs$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFDIVS, "cfdivs", "cfdivs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4, FR550_MAJOR_F_3 } }
},
/* nfadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFADDS, "nfadds", "nfadds", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2, FR550_MAJOR_F_2 } }
},
/* nfsubs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFSUBS, "nfsubs", "nfsubs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2, FR550_MAJOR_F_2 } }
},
/* nfmuls$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFMULS, "nfmuls", "nfmuls", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_3 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_3, FR550_MAJOR_F_3 } }
},
/* nfdivs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFDIVS, "nfdivs", "nfdivs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_4, FR550_MAJOR_F_3 } }
},
/* fcmps$pack $FRi,$FRj,$FCCi_2 */
{
FRV_INSN_FCMPS, "fcmps", "fcmps", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2, FR550_MAJOR_F_2 } }
},
/* fcmpd$pack $FRdoublei,$FRdoublej,$FCCi_2 */
{
FRV_INSN_FCMPD, "fcmpd", "fcmpd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2, FR550_MAJOR_NONE } }
},
/* cfcmps$pack $FRi,$FRj,$FCCi_2,$CCi,$cond */
{
FRV_INSN_CFCMPS, "cfcmps", "cfcmps", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_2, FR550_MAJOR_F_2 } }
},
/* fdcmps$pack $FRi,$FRj,$FCCi_2 */
{
FRV_INSN_FDCMPS, "fdcmps", "fdcmps", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_6 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_6, FR550_MAJOR_F_4 } }
},
/* fmadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FMADDS, "fmadds", "fmadds", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* fmsubs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FMSUBS, "fmsubs", "fmsubs", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* fmaddd$pack $FRdoublei,$FRdoublej,$FRdoublek */
{
FRV_INSN_FMADDD, "fmaddd", "fmaddd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* fmsubd$pack $FRdoublei,$FRdoublej,$FRdoublek */
{
FRV_INSN_FMSUBD, "fmsubd", "fmsubd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* fdmadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FDMADDS, "fdmadds", "fdmadds", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* nfdmadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFDMADDS, "nfdmadds", "nfdmadds", 32,
- { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* cfmadds$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFMADDS, "cfmadds", "cfmadds", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* cfmsubs$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFMSUBS, "cfmsubs", "cfmsubs", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* nfmadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFMADDS, "nfmadds", "nfmadds", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* nfmsubs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFMSUBS, "nfmsubs", "nfmsubs", 32,
- { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0|A(NON_EXCEPTING), { (1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* fmas$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FMAS, "fmas", "fmas", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_F_4 } }
},
/* fmss$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FMSS, "fmss", "fmss", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_F_4 } }
},
/* fdmas$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FDMAS, "fdmas", "fdmas", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* fdmss$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FDMSS, "fdmss", "fdmss", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* nfdmas$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFDMAS, "nfdmas", "nfdmas", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* nfdmss$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFDMSS, "nfdmss", "nfdmss", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* cfmas$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFMAS, "cfmas", "cfmas", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_F_4 } }
},
/* cfmss$pack $FRi,$FRj,$FRk,$CCi,$cond */
{
FRV_INSN_CFMSS, "cfmss", "cfmss", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_F_4 } }
},
/* fmad$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FMAD, "fmad", "fmad", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* fmsd$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FMSD, "fmsd", "fmsd", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_NONE } }
},
/* nfmas$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFMAS, "nfmas", "nfmas", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_F_4 } }
},
/* nfmss$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFMSS, "nfmss", "nfmss", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_5, FR550_MAJOR_F_4 } }
},
/* fdadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FDADDS, "fdadds", "fdadds", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6, FR550_MAJOR_F_4 } }
},
/* fdsubs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FDSUBS, "fdsubs", "fdsubs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6, FR550_MAJOR_F_4 } }
},
/* fdmuls$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FDMULS, "fdmuls", "fdmuls", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_7 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_7, FR550_MAJOR_F_4 } }
},
/* fddivs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FDDIVS, "fddivs", "fddivs", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_7 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_7, FR550_MAJOR_NONE } }
},
/* fdsads$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FDSADS, "fdsads", "fdsads", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6, FR550_MAJOR_F_4 } }
},
/* fdmulcs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_FDMULCS, "fdmulcs", "fdmulcs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_7 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_7, FR550_MAJOR_F_4 } }
},
/* nfdmulcs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFDMULCS, "nfdmulcs", "nfdmulcs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_7 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_7, FR550_MAJOR_F_4 } }
},
/* nfdadds$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFDADDS, "nfdadds", "nfdadds", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6, FR550_MAJOR_F_4 } }
},
/* nfdsubs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFDSUBS, "nfdsubs", "nfdsubs", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6, FR550_MAJOR_F_4 } }
},
/* nfdmuls$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFDMULS, "nfdmuls", "nfdmuls", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_7 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_7, FR550_MAJOR_F_4 } }
},
/* nfddivs$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFDDIVS, "nfddivs", "nfddivs", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_7 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_7, FR550_MAJOR_NONE } }
},
/* nfdsads$pack $FRi,$FRj,$FRk */
{
FRV_INSN_NFDSADS, "nfdsads", "nfdsads", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6, FR550_MAJOR_F_4 } }
},
/* nfdcmps$pack $FRi,$FRj,$FCCi_2 */
{
FRV_INSN_NFDCMPS, "nfdcmps", "nfdcmps", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_F_6, FR550_MAJOR_NONE } }
},
/* mhsetlos$pack $u12,$FRklo */
{
FRV_INSN_MHSETLOS, "mhsetlos", "mhsetlos", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE, FR550_MAJOR_M_5 } }
},
/* mhsethis$pack $u12,$FRkhi */
{
FRV_INSN_MHSETHIS, "mhsethis", "mhsethis", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE, FR550_MAJOR_M_5 } }
},
/* mhdsets$pack $u12,$FRintk */
{
FRV_INSN_MHDSETS, "mhdsets", "mhdsets", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE, FR550_MAJOR_M_5 } }
},
/* mhsetloh$pack $s5,$FRklo */
{
FRV_INSN_MHSETLOH, "mhsetloh", "mhsetloh", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE, FR550_MAJOR_M_5 } }
},
/* mhsethih$pack $s5,$FRkhi */
{
FRV_INSN_MHSETHIH, "mhsethih", "mhsethih", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE, FR550_MAJOR_M_5 } }
},
/* mhdseth$pack $s5,$FRintk */
{
FRV_INSN_MHDSETH, "mhdseth", "mhdseth", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE, FR550_MAJOR_M_5 } }
},
/* mand$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MAND, "mand", "mand", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* mor$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MOR, "mor", "mor", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* mxor$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MXOR, "mxor", "mxor", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* cmand$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMAND, "cmand", "cmand", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* cmor$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMOR, "cmor", "cmor", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* cmxor$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMXOR, "cmxor", "cmxor", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* mnot$pack $FRintj,$FRintk */
{
FRV_INSN_MNOT, "mnot", "mnot", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* cmnot$pack $FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMNOT, "cmnot", "cmnot", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* mrotli$pack $FRinti,$u6,$FRintk */
{
FRV_INSN_MROTLI, "mrotli", "mrotli", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mrotri$pack $FRinti,$u6,$FRintk */
{
FRV_INSN_MROTRI, "mrotri", "mrotri", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mwcut$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MWCUT, "mwcut", "mwcut", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mwcuti$pack $FRinti,$u6,$FRintk */
{
FRV_INSN_MWCUTI, "mwcuti", "mwcuti", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mcut$pack $ACC40Si,$FRintj,$FRintk */
{
FRV_INSN_MCUT, "mcut", "mcut", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mcuti$pack $ACC40Si,$s6,$FRintk */
{
FRV_INSN_MCUTI, "mcuti", "mcuti", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mcutss$pack $ACC40Si,$FRintj,$FRintk */
{
FRV_INSN_MCUTSS, "mcutss", "mcutss", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mcutssi$pack $ACC40Si,$s6,$FRintk */
{
FRV_INSN_MCUTSSI, "mcutssi", "mcutssi", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mdcutssi$pack $ACC40Si,$s6,$FRintkeven */
{
FRV_INSN_MDCUTSSI, "mdcutssi", "mdcutssi", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMLOW, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMLOW, FR400_MAJOR_M_2, FR500_MAJOR_NONE, FR550_MAJOR_M_3 } }
},
/* maveh$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MAVEH, "maveh", "maveh", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* msllhi$pack $FRinti,$u6,$FRintk */
{
FRV_INSN_MSLLHI, "msllhi", "msllhi", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* msrlhi$pack $FRinti,$u6,$FRintk */
{
FRV_INSN_MSRLHI, "msrlhi", "msrlhi", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* msrahi$pack $FRinti,$u6,$FRintk */
{
FRV_INSN_MSRAHI, "msrahi", "msrahi", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mdrotli$pack $FRintieven,$s6,$FRintkeven */
{
FRV_INSN_MDROTLI, "mdrotli", "mdrotli", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMLOW, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMLOW, FR400_MAJOR_M_2, FR500_MAJOR_NONE, FR550_MAJOR_M_3 } }
},
/* mcplhi$pack $FRinti,$u6,$FRintk */
{
FRV_INSN_MCPLHI, "mcplhi", "mcplhi", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMLOW, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMLOW, FR400_MAJOR_M_2, FR500_MAJOR_NONE, FR550_MAJOR_M_3 } }
},
/* mcpli$pack $FRinti,$u6,$FRintk */
{
FRV_INSN_MCPLI, "mcpli", "mcpli", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMLOW, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMLOW, FR400_MAJOR_M_2, FR500_MAJOR_NONE, FR550_MAJOR_M_3 } }
},
/* msaths$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MSATHS, "msaths", "msaths", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* mqsaths$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQSATHS, "mqsaths", "mqsaths", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE, FR550_MAJOR_M_2 } }
},
/* msathu$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MSATHU, "msathu", "msathu", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* mcmpsh$pack $FRinti,$FRintj,$FCCk */
{
FRV_INSN_MCMPSH, "mcmpsh", "mcmpsh", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* mcmpuh$pack $FRinti,$FRintj,$FCCk */
{
FRV_INSN_MCMPUH, "mcmpuh", "mcmpuh", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* mabshs$pack $FRintj,$FRintk */
{
FRV_INSN_MABSHS, "mabshs", "mabshs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE, FR550_MAJOR_M_2 } }
},
/* maddhss$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MADDHSS, "maddhss", "maddhss", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* maddhus$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MADDHUS, "maddhus", "maddhus", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* msubhss$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MSUBHSS, "msubhss", "msubhss", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* msubhus$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MSUBHUS, "msubhus", "msubhus", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* cmaddhss$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMADDHSS, "cmaddhss", "cmaddhss", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* cmaddhus$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMADDHUS, "cmaddhus", "cmaddhus", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* cmsubhss$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMSUBHSS, "cmsubhss", "cmsubhss", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* cmsubhus$pack $FRinti,$FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMSUBHUS, "cmsubhus", "cmsubhus", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* mqaddhss$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQADDHSS, "mqaddhss", "mqaddhss", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* mqaddhus$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQADDHUS, "mqaddhus", "mqaddhus", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* mqsubhss$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQSUBHSS, "mqsubhss", "mqsubhss", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* mqsubhus$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MQSUBHUS, "mqsubhus", "mqsubhus", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* cmqaddhss$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQADDHSS, "cmqaddhss", "cmqaddhss", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* cmqaddhus$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQADDHUS, "cmqaddhus", "cmqaddhus", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* cmqsubhss$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQSUBHSS, "cmqsubhss", "cmqsubhss", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* cmqsubhus$pack $FRintieven,$FRintjeven,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMQSUBHUS, "cmqsubhus", "cmqsubhus", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_1, FR550_MAJOR_M_2 } }
},
/* maddaccs$pack $ACC40Si,$ACC40Sk */
{
FRV_INSN_MADDACCS, "maddaccs", "maddaccs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE, FR550_MAJOR_M_4 } }
},
/* msubaccs$pack $ACC40Si,$ACC40Sk */
{
FRV_INSN_MSUBACCS, "msubaccs", "msubaccs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE, FR550_MAJOR_M_4 } }
},
/* mdaddaccs$pack $ACC40Si,$ACC40Sk */
{
FRV_INSN_MDADDACCS, "mdaddaccs", "mdaddaccs", 32,
- { 0, { (1<<MACH_FR400), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE, FR550_MAJOR_M_4 } }
},
/* mdsubaccs$pack $ACC40Si,$ACC40Sk */
{
FRV_INSN_MDSUBACCS, "mdsubaccs", "mdsubaccs", 32,
- { 0, { (1<<MACH_FR400), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE, FR550_MAJOR_M_4 } }
},
/* masaccs$pack $ACC40Si,$ACC40Sk */
{
FRV_INSN_MASACCS, "masaccs", "masaccs", 32,
- { 0, { (1<<MACH_FR400), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_NONE, FR550_MAJOR_M_4 } }
},
/* mdasaccs$pack $ACC40Si,$ACC40Sk */
{
FRV_INSN_MDASACCS, "mdasaccs", "mdasaccs", 32,
- { 0, { (1<<MACH_FR400), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE, FR550_MAJOR_M_4 } }
},
/* mmulhs$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MMULHS, "mmulhs", "mmulhs", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mmulhu$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MMULHU, "mmulhu", "mmulhu", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mmulxhs$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MMULXHS, "mmulxhs", "mmulxhs", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mmulxhu$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MMULXHU, "mmulxhu", "mmulxhu", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* cmmulhs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMMULHS, "cmmulhs", "cmmulhs", 32,
- { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* cmmulhu$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMMULHU, "cmmulhu", "cmmulhu", 32,
- { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mqmulhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULHS, "mqmulhs", "mqmulhs", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mqmulhu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULHU, "mqmulhu", "mqmulhu", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mqmulxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULXHS, "mqmulxhs", "mqmulxhs", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mqmulxhu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMULXHU, "mqmulxhu", "mqmulxhu", 32,
- { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* cmqmulhs$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMQMULHS, "cmqmulhs", "cmqmulhs", 32,
- { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* cmqmulhu$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMQMULHU, "cmqmulhu", "cmqmulhu", 32,
- { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL)|A(PRESERVE_OVF), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mmachs$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MMACHS, "mmachs", "mmachs", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mmachu$pack $FRinti,$FRintj,$ACC40Uk */
{
FRV_INSN_MMACHU, "mmachu", "mmachu", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mmrdhs$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MMRDHS, "mmrdhs", "mmrdhs", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mmrdhu$pack $FRinti,$FRintj,$ACC40Uk */
{
FRV_INSN_MMRDHU, "mmrdhu", "mmrdhu", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* cmmachs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMMACHS, "cmmachs", "cmmachs", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* cmmachu$pack $FRinti,$FRintj,$ACC40Uk,$CCi,$cond */
{
FRV_INSN_CMMACHU, "cmmachu", "cmmachu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mqmachs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMACHS, "mqmachs", "mqmachs", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mqmachu$pack $FRintieven,$FRintjeven,$ACC40Uk */
{
FRV_INSN_MQMACHU, "mqmachu", "mqmachu", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* cmqmachs$pack $FRintieven,$FRintjeven,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMQMACHS, "cmqmachs", "cmqmachs", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* cmqmachu$pack $FRintieven,$FRintjeven,$ACC40Uk,$CCi,$cond */
{
FRV_INSN_CMQMACHU, "cmqmachu", "cmqmachu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mqxmachs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQXMACHS, "mqxmachs", "mqxmachs", 32,
- { 0, { (1<<MACH_FR400), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE, FR550_MAJOR_M_4 } }
},
/* mqxmacxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQXMACXHS, "mqxmacxhs", "mqxmacxhs", 32,
- { 0, { (1<<MACH_FR400), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE, FR550_MAJOR_M_4 } }
},
/* mqmacxhs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQMACXHS, "mqmacxhs", "mqmacxhs", 32,
- { 0, { (1<<MACH_FR400), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE } }
+ { 0, { (1<<MACH_FR400)|(1<<MACH_FR550), UNIT_MDUALACC, FR400_MAJOR_M_2, FR500_MAJOR_NONE, FR550_MAJOR_M_4 } }
},
/* mcpxrs$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MCPXRS, "mcpxrs", "mcpxrs", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mcpxru$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MCPXRU, "mcpxru", "mcpxru", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mcpxis$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MCPXIS, "mcpxis", "mcpxis", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mcpxiu$pack $FRinti,$FRintj,$ACC40Sk */
{
FRV_INSN_MCPXIU, "mcpxiu", "mcpxiu", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* cmcpxrs$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMCPXRS, "cmcpxrs", "cmcpxrs", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* cmcpxru$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMCPXRU, "cmcpxru", "cmcpxru", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* cmcpxis$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMCPXIS, "cmcpxis", "cmcpxis", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* cmcpxiu$pack $FRinti,$FRintj,$ACC40Sk,$CCi,$cond */
{
FRV_INSN_CMCPXIU, "cmcpxiu", "cmcpxiu", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mqcpxrs$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXRS, "mqcpxrs", "mqcpxrs", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mqcpxru$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXRU, "mqcpxru", "mqcpxru", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mqcpxis$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXIS, "mqcpxis", "mqcpxis", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mqcpxiu$pack $FRintieven,$FRintjeven,$ACC40Sk */
{
FRV_INSN_MQCPXIU, "mqcpxiu", "mqcpxiu", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_2, FR500_MAJOR_M_4, FR550_MAJOR_M_4 } }
},
/* mexpdhw$pack $FRinti,$u6,$FRintk */
{
FRV_INSN_MEXPDHW, "mexpdhw", "mexpdhw", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* cmexpdhw$pack $FRinti,$u6,$FRintk,$CCi,$cond */
{
FRV_INSN_CMEXPDHW, "cmexpdhw", "cmexpdhw", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mexpdhd$pack $FRinti,$u6,$FRintkeven */
{
FRV_INSN_MEXPDHD, "mexpdhd", "mexpdhd", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* cmexpdhd$pack $FRinti,$u6,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMEXPDHD, "cmexpdhd", "cmexpdhd", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mpackh$pack $FRinti,$FRintj,$FRintk */
{
FRV_INSN_MPACKH, "mpackh", "mpackh", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mdpackh$pack $FRintieven,$FRintjeven,$FRintkeven */
{
FRV_INSN_MDPACKH, "mdpackh", "mdpackh", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_5 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_5, FR550_MAJOR_M_3 } }
},
/* munpackh$pack $FRinti,$FRintkeven */
{
FRV_INSN_MUNPACKH, "munpackh", "munpackh", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mdunpackh$pack $FRintieven,$FRintk */
{
FRV_INSN_MDUNPACKH, "mdunpackh", "mdunpackh", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_7 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_7, FR550_MAJOR_NONE } }
},
/* mbtoh$pack $FRintj,$FRintkeven */
{
FRV_INSN_MBTOH, "mbtoh", "mbtoh", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* cmbtoh$pack $FRintj,$FRintkeven,$CCi,$cond */
{
FRV_INSN_CMBTOH, "cmbtoh", "cmbtoh", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mhtob$pack $FRintjeven,$FRintk */
{
FRV_INSN_MHTOB, "mhtob", "mhtob", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* cmhtob$pack $FRintjeven,$FRintk,$CCi,$cond */
{
FRV_INSN_CMHTOB, "cmhtob", "cmhtob", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_2, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mbtohe$pack $FRintj,$FRintk */
{
FRV_INSN_MBTOHE, "mbtohe", "mbtohe", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_7 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_7, FR550_MAJOR_NONE } }
},
/* cmbtohe$pack $FRintj,$FRintk,$CCi,$cond */
{
FRV_INSN_CMBTOHE, "cmbtohe", "cmbtohe", 32,
- { 0|A(CONDITIONAL), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_7 } }
+ { 0|A(CONDITIONAL), { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_7, FR550_MAJOR_NONE } }
},
/* mnop$pack */
{
FRV_INSN_MNOP, "mnop", "mnop", 32,
- { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_BASE), UNIT_FMALL, FR400_MAJOR_M_1, FR500_MAJOR_M_1, FR550_MAJOR_M_1 } }
},
/* mclracc$pack $ACC40Sk,$A0 */
{
FRV_INSN_MCLRACC_0, "mclracc-0", "mclracc", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_3, FR550_MAJOR_M_3 } }
},
/* mclracc$pack $ACC40Sk,$A1 */
{
FRV_INSN_MCLRACC_1, "mclracc-1", "mclracc", 32,
- { 0, { (1<<MACH_BASE), UNIT_MCLRACC_1, FR400_MAJOR_M_2, FR500_MAJOR_M_6 } }
+ { 0, { (1<<MACH_BASE), UNIT_MCLRACC_1, FR400_MAJOR_M_2, FR500_MAJOR_M_6, FR550_MAJOR_M_3 } }
},
/* mrdacc$pack $ACC40Si,$FRintk */
{
FRV_INSN_MRDACC, "mrdacc", "mrdacc", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mrdaccg$pack $ACCGi,$FRintk */
{
FRV_INSN_MRDACCG, "mrdaccg", "mrdaccg", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_2, FR550_MAJOR_M_3 } }
},
/* mwtacc$pack $FRinti,$ACC40Sk */
{
FRV_INSN_MWTACC, "mwtacc", "mwtacc", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_3, FR550_MAJOR_M_3 } }
},
/* mwtaccg$pack $FRinti,$ACCGk */
{
FRV_INSN_MWTACCG, "mwtaccg", "mwtaccg", 32,
- { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_3 } }
+ { 0, { (1<<MACH_BASE), UNIT_FM01, FR400_MAJOR_M_1, FR500_MAJOR_M_3, FR550_MAJOR_M_3 } }
},
/* mcop1$pack $FRi,$FRj,$FRk */
{
FRV_INSN_MCOP1, "mcop1", "mcop1", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_1, FR550_MAJOR_NONE } }
},
/* mcop2$pack $FRi,$FRj,$FRk */
{
FRV_INSN_MCOP2, "mcop2", "mcop2", 32,
- { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_1 } }
+ { 0, { (1<<MACH_FRV), UNIT_FM01, FR400_MAJOR_NONE, FR500_MAJOR_M_1, FR550_MAJOR_NONE } }
},
/* fnop$pack */
{
FRV_INSN_FNOP, "fnop", "fnop", 32,
- { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_8 } }
+ { 0, { (1<<MACH_SIMPLE)|(1<<MACH_TOMCAT)|(1<<MACH_FR500)|(1<<MACH_FR550)|(1<<MACH_FRV), UNIT_FMALL, FR400_MAJOR_NONE, FR500_MAJOR_F_8, FR550_MAJOR_F_1 } }
},
};
diff --git a/opcodes/frv-desc.h b/opcodes/frv-desc.h
index 5e6b061..5f72800 100644
--- a/opcodes/frv-desc.h
+++ b/opcodes/frv-desc.h
@@ -233,240 +233,240 @@ typedef enum spr_names {
, H_SPR_HSR55 = 71, H_SPR_HSR56 = 72, H_SPR_HSR57 = 73, H_SPR_HSR58 = 74
, H_SPR_HSR59 = 75, H_SPR_HSR60 = 76, H_SPR_HSR61 = 77, H_SPR_HSR62 = 78
, H_SPR_HSR63 = 79, H_SPR_CCR = 256, H_SPR_CCCR = 263, H_SPR_LR = 272
- , H_SPR_LCR = 273, H_SPR_ISR = 288, H_SPR_NEEAR0 = 352, H_SPR_NEEAR1 = 353
- , H_SPR_NEEAR2 = 354, H_SPR_NEEAR3 = 355, H_SPR_NEEAR4 = 356, H_SPR_NEEAR5 = 357
- , H_SPR_NEEAR6 = 358, H_SPR_NEEAR7 = 359, H_SPR_NEEAR8 = 360, H_SPR_NEEAR9 = 361
- , H_SPR_NEEAR10 = 362, H_SPR_NEEAR11 = 363, H_SPR_NEEAR12 = 364, H_SPR_NEEAR13 = 365
- , H_SPR_NEEAR14 = 366, H_SPR_NEEAR15 = 367, H_SPR_NEEAR16 = 368, H_SPR_NEEAR17 = 369
- , H_SPR_NEEAR18 = 370, H_SPR_NEEAR19 = 371, H_SPR_NEEAR20 = 372, H_SPR_NEEAR21 = 373
- , H_SPR_NEEAR22 = 374, H_SPR_NEEAR23 = 375, H_SPR_NEEAR24 = 376, H_SPR_NEEAR25 = 377
- , H_SPR_NEEAR26 = 378, H_SPR_NEEAR27 = 379, H_SPR_NEEAR28 = 380, H_SPR_NEEAR29 = 381
- , H_SPR_NEEAR30 = 382, H_SPR_NEEAR31 = 383, H_SPR_NESR0 = 384, H_SPR_NESR1 = 385
- , H_SPR_NESR2 = 386, H_SPR_NESR3 = 387, H_SPR_NESR4 = 388, H_SPR_NESR5 = 389
- , H_SPR_NESR6 = 390, H_SPR_NESR7 = 391, H_SPR_NESR8 = 392, H_SPR_NESR9 = 393
- , H_SPR_NESR10 = 394, H_SPR_NESR11 = 395, H_SPR_NESR12 = 396, H_SPR_NESR13 = 397
- , H_SPR_NESR14 = 398, H_SPR_NESR15 = 399, H_SPR_NESR16 = 400, H_SPR_NESR17 = 401
- , H_SPR_NESR18 = 402, H_SPR_NESR19 = 403, H_SPR_NESR20 = 404, H_SPR_NESR21 = 405
- , H_SPR_NESR22 = 406, H_SPR_NESR23 = 407, H_SPR_NESR24 = 408, H_SPR_NESR25 = 409
- , H_SPR_NESR26 = 410, H_SPR_NESR27 = 411, H_SPR_NESR28 = 412, H_SPR_NESR29 = 413
- , H_SPR_NESR30 = 414, H_SPR_NESR31 = 415, H_SPR_NECR = 416, H_SPR_GNER0 = 432
- , H_SPR_GNER1 = 433, H_SPR_FNER0 = 434, H_SPR_FNER1 = 435, H_SPR_EPCR0 = 512
- , H_SPR_EPCR1 = 513, H_SPR_EPCR2 = 514, H_SPR_EPCR3 = 515, H_SPR_EPCR4 = 516
- , H_SPR_EPCR5 = 517, H_SPR_EPCR6 = 518, H_SPR_EPCR7 = 519, H_SPR_EPCR8 = 520
- , H_SPR_EPCR9 = 521, H_SPR_EPCR10 = 522, H_SPR_EPCR11 = 523, H_SPR_EPCR12 = 524
- , H_SPR_EPCR13 = 525, H_SPR_EPCR14 = 526, H_SPR_EPCR15 = 527, H_SPR_EPCR16 = 528
- , H_SPR_EPCR17 = 529, H_SPR_EPCR18 = 530, H_SPR_EPCR19 = 531, H_SPR_EPCR20 = 532
- , H_SPR_EPCR21 = 533, H_SPR_EPCR22 = 534, H_SPR_EPCR23 = 535, H_SPR_EPCR24 = 536
- , H_SPR_EPCR25 = 537, H_SPR_EPCR26 = 538, H_SPR_EPCR27 = 539, H_SPR_EPCR28 = 540
- , H_SPR_EPCR29 = 541, H_SPR_EPCR30 = 542, H_SPR_EPCR31 = 543, H_SPR_EPCR32 = 544
- , H_SPR_EPCR33 = 545, H_SPR_EPCR34 = 546, H_SPR_EPCR35 = 547, H_SPR_EPCR36 = 548
- , H_SPR_EPCR37 = 549, H_SPR_EPCR38 = 550, H_SPR_EPCR39 = 551, H_SPR_EPCR40 = 552
- , H_SPR_EPCR41 = 553, H_SPR_EPCR42 = 554, H_SPR_EPCR43 = 555, H_SPR_EPCR44 = 556
- , H_SPR_EPCR45 = 557, H_SPR_EPCR46 = 558, H_SPR_EPCR47 = 559, H_SPR_EPCR48 = 560
- , H_SPR_EPCR49 = 561, H_SPR_EPCR50 = 562, H_SPR_EPCR51 = 563, H_SPR_EPCR52 = 564
- , H_SPR_EPCR53 = 565, H_SPR_EPCR54 = 566, H_SPR_EPCR55 = 567, H_SPR_EPCR56 = 568
- , H_SPR_EPCR57 = 569, H_SPR_EPCR58 = 570, H_SPR_EPCR59 = 571, H_SPR_EPCR60 = 572
- , H_SPR_EPCR61 = 573, H_SPR_EPCR62 = 574, H_SPR_EPCR63 = 575, H_SPR_ESR0 = 576
- , H_SPR_ESR1 = 577, H_SPR_ESR2 = 578, H_SPR_ESR3 = 579, H_SPR_ESR4 = 580
- , H_SPR_ESR5 = 581, H_SPR_ESR6 = 582, H_SPR_ESR7 = 583, H_SPR_ESR8 = 584
- , H_SPR_ESR9 = 585, H_SPR_ESR10 = 586, H_SPR_ESR11 = 587, H_SPR_ESR12 = 588
- , H_SPR_ESR13 = 589, H_SPR_ESR14 = 590, H_SPR_ESR15 = 591, H_SPR_ESR16 = 592
- , H_SPR_ESR17 = 593, H_SPR_ESR18 = 594, H_SPR_ESR19 = 595, H_SPR_ESR20 = 596
- , H_SPR_ESR21 = 597, H_SPR_ESR22 = 598, H_SPR_ESR23 = 599, H_SPR_ESR24 = 600
- , H_SPR_ESR25 = 601, H_SPR_ESR26 = 602, H_SPR_ESR27 = 603, H_SPR_ESR28 = 604
- , H_SPR_ESR29 = 605, H_SPR_ESR30 = 606, H_SPR_ESR31 = 607, H_SPR_ESR32 = 608
- , H_SPR_ESR33 = 609, H_SPR_ESR34 = 610, H_SPR_ESR35 = 611, H_SPR_ESR36 = 612
- , H_SPR_ESR37 = 613, H_SPR_ESR38 = 614, H_SPR_ESR39 = 615, H_SPR_ESR40 = 616
- , H_SPR_ESR41 = 617, H_SPR_ESR42 = 618, H_SPR_ESR43 = 619, H_SPR_ESR44 = 620
- , H_SPR_ESR45 = 621, H_SPR_ESR46 = 622, H_SPR_ESR47 = 623, H_SPR_ESR48 = 624
- , H_SPR_ESR49 = 625, H_SPR_ESR50 = 626, H_SPR_ESR51 = 627, H_SPR_ESR52 = 628
- , H_SPR_ESR53 = 629, H_SPR_ESR54 = 630, H_SPR_ESR55 = 631, H_SPR_ESR56 = 632
- , H_SPR_ESR57 = 633, H_SPR_ESR58 = 634, H_SPR_ESR59 = 635, H_SPR_ESR60 = 636
- , H_SPR_ESR61 = 637, H_SPR_ESR62 = 638, H_SPR_ESR63 = 639, H_SPR_EIR0 = 640
- , H_SPR_EIR1 = 641, H_SPR_EIR2 = 642, H_SPR_EIR3 = 643, H_SPR_EIR4 = 644
- , H_SPR_EIR5 = 645, H_SPR_EIR6 = 646, H_SPR_EIR7 = 647, H_SPR_EIR8 = 648
- , H_SPR_EIR9 = 649, H_SPR_EIR10 = 650, H_SPR_EIR11 = 651, H_SPR_EIR12 = 652
- , H_SPR_EIR13 = 653, H_SPR_EIR14 = 654, H_SPR_EIR15 = 655, H_SPR_EIR16 = 656
- , H_SPR_EIR17 = 657, H_SPR_EIR18 = 658, H_SPR_EIR19 = 659, H_SPR_EIR20 = 660
- , H_SPR_EIR21 = 661, H_SPR_EIR22 = 662, H_SPR_EIR23 = 663, H_SPR_EIR24 = 664
- , H_SPR_EIR25 = 665, H_SPR_EIR26 = 666, H_SPR_EIR27 = 667, H_SPR_EIR28 = 668
- , H_SPR_EIR29 = 669, H_SPR_EIR30 = 670, H_SPR_EIR31 = 671, H_SPR_ESFR0 = 672
- , H_SPR_ESFR1 = 673, H_SPR_SR0 = 768, H_SPR_SR1 = 769, H_SPR_SR2 = 770
- , H_SPR_SR3 = 771, H_SPR_FSR0 = 1024, H_SPR_FSR1 = 1025, H_SPR_FSR2 = 1026
- , H_SPR_FSR3 = 1027, H_SPR_FSR4 = 1028, H_SPR_FSR5 = 1029, H_SPR_FSR6 = 1030
- , H_SPR_FSR7 = 1031, H_SPR_FSR8 = 1032, H_SPR_FSR9 = 1033, H_SPR_FSR10 = 1034
- , H_SPR_FSR11 = 1035, H_SPR_FSR12 = 1036, H_SPR_FSR13 = 1037, H_SPR_FSR14 = 1038
- , H_SPR_FSR15 = 1039, H_SPR_FSR16 = 1040, H_SPR_FSR17 = 1041, H_SPR_FSR18 = 1042
- , H_SPR_FSR19 = 1043, H_SPR_FSR20 = 1044, H_SPR_FSR21 = 1045, H_SPR_FSR22 = 1046
- , H_SPR_FSR23 = 1047, H_SPR_FSR24 = 1048, H_SPR_FSR25 = 1049, H_SPR_FSR26 = 1050
- , H_SPR_FSR27 = 1051, H_SPR_FSR28 = 1052, H_SPR_FSR29 = 1053, H_SPR_FSR30 = 1054
- , H_SPR_FSR31 = 1055, H_SPR_FSR32 = 1056, H_SPR_FSR33 = 1057, H_SPR_FSR34 = 1058
- , H_SPR_FSR35 = 1059, H_SPR_FSR36 = 1060, H_SPR_FSR37 = 1061, H_SPR_FSR38 = 1062
- , H_SPR_FSR39 = 1063, H_SPR_FSR40 = 1064, H_SPR_FSR41 = 1065, H_SPR_FSR42 = 1066
- , H_SPR_FSR43 = 1067, H_SPR_FSR44 = 1068, H_SPR_FSR45 = 1069, H_SPR_FSR46 = 1070
- , H_SPR_FSR47 = 1071, H_SPR_FSR48 = 1072, H_SPR_FSR49 = 1073, H_SPR_FSR50 = 1074
- , H_SPR_FSR51 = 1075, H_SPR_FSR52 = 1076, H_SPR_FSR53 = 1077, H_SPR_FSR54 = 1078
- , H_SPR_FSR55 = 1079, H_SPR_FSR56 = 1080, H_SPR_FSR57 = 1081, H_SPR_FSR58 = 1082
- , H_SPR_FSR59 = 1083, H_SPR_FSR60 = 1084, H_SPR_FSR61 = 1085, H_SPR_FSR62 = 1086
- , H_SPR_FSR63 = 1087, H_SPR_FQOP0 = 1088, H_SPR_FQOP1 = 1090, H_SPR_FQOP2 = 1092
- , H_SPR_FQOP3 = 1094, H_SPR_FQOP4 = 1096, H_SPR_FQOP5 = 1098, H_SPR_FQOP6 = 1100
- , H_SPR_FQOP7 = 1102, H_SPR_FQOP8 = 1104, H_SPR_FQOP9 = 1106, H_SPR_FQOP10 = 1108
- , H_SPR_FQOP11 = 1110, H_SPR_FQOP12 = 1112, H_SPR_FQOP13 = 1114, H_SPR_FQOP14 = 1116
- , H_SPR_FQOP15 = 1118, H_SPR_FQOP16 = 1120, H_SPR_FQOP17 = 1122, H_SPR_FQOP18 = 1124
- , H_SPR_FQOP19 = 1126, H_SPR_FQOP20 = 1128, H_SPR_FQOP21 = 1130, H_SPR_FQOP22 = 1132
- , H_SPR_FQOP23 = 1134, H_SPR_FQOP24 = 1136, H_SPR_FQOP25 = 1138, H_SPR_FQOP26 = 1140
- , H_SPR_FQOP27 = 1142, H_SPR_FQOP28 = 1144, H_SPR_FQOP29 = 1146, H_SPR_FQOP30 = 1148
- , H_SPR_FQOP31 = 1150, H_SPR_FQST0 = 1089, H_SPR_FQST1 = 1091, H_SPR_FQST2 = 1093
- , H_SPR_FQST3 = 1095, H_SPR_FQST4 = 1097, H_SPR_FQST5 = 1099, H_SPR_FQST6 = 1101
- , H_SPR_FQST7 = 1103, H_SPR_FQST8 = 1105, H_SPR_FQST9 = 1107, H_SPR_FQST10 = 1109
- , H_SPR_FQST11 = 1111, H_SPR_FQST12 = 1113, H_SPR_FQST13 = 1115, H_SPR_FQST14 = 1117
- , H_SPR_FQST15 = 1119, H_SPR_FQST16 = 1121, H_SPR_FQST17 = 1123, H_SPR_FQST18 = 1125
- , H_SPR_FQST19 = 1127, H_SPR_FQST20 = 1129, H_SPR_FQST21 = 1131, H_SPR_FQST22 = 1133
- , H_SPR_FQST23 = 1135, H_SPR_FQST24 = 1137, H_SPR_FQST25 = 1139, H_SPR_FQST26 = 1141
- , H_SPR_FQST27 = 1143, H_SPR_FQST28 = 1145, H_SPR_FQST29 = 1147, H_SPR_FQST30 = 1149
- , H_SPR_FQST31 = 1151, H_SPR_MCILR0 = 1272, H_SPR_MCILR1 = 1273, H_SPR_MSR0 = 1280
- , H_SPR_MSR1 = 1281, H_SPR_MSR2 = 1282, H_SPR_MSR3 = 1283, H_SPR_MSR4 = 1284
- , H_SPR_MSR5 = 1285, H_SPR_MSR6 = 1286, H_SPR_MSR7 = 1287, H_SPR_MSR8 = 1288
- , H_SPR_MSR9 = 1289, H_SPR_MSR10 = 1290, H_SPR_MSR11 = 1291, H_SPR_MSR12 = 1292
- , H_SPR_MSR13 = 1293, H_SPR_MSR14 = 1294, H_SPR_MSR15 = 1295, H_SPR_MSR16 = 1296
- , H_SPR_MSR17 = 1297, H_SPR_MSR18 = 1298, H_SPR_MSR19 = 1299, H_SPR_MSR20 = 1300
- , H_SPR_MSR21 = 1301, H_SPR_MSR22 = 1302, H_SPR_MSR23 = 1303, H_SPR_MSR24 = 1304
- , H_SPR_MSR25 = 1305, H_SPR_MSR26 = 1306, H_SPR_MSR27 = 1307, H_SPR_MSR28 = 1308
- , H_SPR_MSR29 = 1309, H_SPR_MSR30 = 1310, H_SPR_MSR31 = 1311, H_SPR_MSR32 = 1312
- , H_SPR_MSR33 = 1313, H_SPR_MSR34 = 1314, H_SPR_MSR35 = 1315, H_SPR_MSR36 = 1316
- , H_SPR_MSR37 = 1317, H_SPR_MSR38 = 1318, H_SPR_MSR39 = 1319, H_SPR_MSR40 = 1320
- , H_SPR_MSR41 = 1321, H_SPR_MSR42 = 1322, H_SPR_MSR43 = 1323, H_SPR_MSR44 = 1324
- , H_SPR_MSR45 = 1325, H_SPR_MSR46 = 1326, H_SPR_MSR47 = 1327, H_SPR_MSR48 = 1328
- , H_SPR_MSR49 = 1329, H_SPR_MSR50 = 1330, H_SPR_MSR51 = 1331, H_SPR_MSR52 = 1332
- , H_SPR_MSR53 = 1333, H_SPR_MSR54 = 1334, H_SPR_MSR55 = 1335, H_SPR_MSR56 = 1336
- , H_SPR_MSR57 = 1337, H_SPR_MSR58 = 1338, H_SPR_MSR59 = 1339, H_SPR_MSR60 = 1340
- , H_SPR_MSR61 = 1341, H_SPR_MSR62 = 1342, H_SPR_MSR63 = 1343, H_SPR_MQOP0 = 1344
- , H_SPR_MQOP1 = 1346, H_SPR_MQOP2 = 1348, H_SPR_MQOP3 = 1350, H_SPR_MQOP4 = 1352
- , H_SPR_MQOP5 = 1354, H_SPR_MQOP6 = 1356, H_SPR_MQOP7 = 1358, H_SPR_MQOP8 = 1360
- , H_SPR_MQOP9 = 1362, H_SPR_MQOP10 = 1364, H_SPR_MQOP11 = 1366, H_SPR_MQOP12 = 1368
- , H_SPR_MQOP13 = 1370, H_SPR_MQOP14 = 1372, H_SPR_MQOP15 = 1374, H_SPR_MQOP16 = 1376
- , H_SPR_MQOP17 = 1378, H_SPR_MQOP18 = 1380, H_SPR_MQOP19 = 1382, H_SPR_MQOP20 = 1384
- , H_SPR_MQOP21 = 1386, H_SPR_MQOP22 = 1388, H_SPR_MQOP23 = 1390, H_SPR_MQOP24 = 1392
- , H_SPR_MQOP25 = 1394, H_SPR_MQOP26 = 1396, H_SPR_MQOP27 = 1398, H_SPR_MQOP28 = 1400
- , H_SPR_MQOP29 = 1402, H_SPR_MQOP30 = 1404, H_SPR_MQOP31 = 1406, H_SPR_MQST0 = 1345
- , H_SPR_MQST1 = 1347, H_SPR_MQST2 = 1349, H_SPR_MQST3 = 1351, H_SPR_MQST4 = 1353
- , H_SPR_MQST5 = 1355, H_SPR_MQST6 = 1357, H_SPR_MQST7 = 1359, H_SPR_MQST8 = 1361
- , H_SPR_MQST9 = 1363, H_SPR_MQST10 = 1365, H_SPR_MQST11 = 1367, H_SPR_MQST12 = 1369
- , H_SPR_MQST13 = 1371, H_SPR_MQST14 = 1373, H_SPR_MQST15 = 1375, H_SPR_MQST16 = 1377
- , H_SPR_MQST17 = 1379, H_SPR_MQST18 = 1381, H_SPR_MQST19 = 1383, H_SPR_MQST20 = 1385
- , H_SPR_MQST21 = 1387, H_SPR_MQST22 = 1389, H_SPR_MQST23 = 1391, H_SPR_MQST24 = 1393
- , H_SPR_MQST25 = 1395, H_SPR_MQST26 = 1397, H_SPR_MQST27 = 1399, H_SPR_MQST28 = 1401
- , H_SPR_MQST29 = 1403, H_SPR_MQST30 = 1405, H_SPR_MQST31 = 1407, H_SPR_EAR0 = 1536
- , H_SPR_EAR1 = 1537, H_SPR_EAR2 = 1538, H_SPR_EAR3 = 1539, H_SPR_EAR4 = 1540
- , H_SPR_EAR5 = 1541, H_SPR_EAR6 = 1542, H_SPR_EAR7 = 1543, H_SPR_EAR8 = 1544
- , H_SPR_EAR9 = 1545, H_SPR_EAR10 = 1546, H_SPR_EAR11 = 1547, H_SPR_EAR12 = 1548
- , H_SPR_EAR13 = 1549, H_SPR_EAR14 = 1550, H_SPR_EAR15 = 1551, H_SPR_EAR16 = 1552
- , H_SPR_EAR17 = 1553, H_SPR_EAR18 = 1554, H_SPR_EAR19 = 1555, H_SPR_EAR20 = 1556
- , H_SPR_EAR21 = 1557, H_SPR_EAR22 = 1558, H_SPR_EAR23 = 1559, H_SPR_EAR24 = 1560
- , H_SPR_EAR25 = 1561, H_SPR_EAR26 = 1562, H_SPR_EAR27 = 1563, H_SPR_EAR28 = 1564
- , H_SPR_EAR29 = 1565, H_SPR_EAR30 = 1566, H_SPR_EAR31 = 1567, H_SPR_EAR32 = 1568
- , H_SPR_EAR33 = 1569, H_SPR_EAR34 = 1570, H_SPR_EAR35 = 1571, H_SPR_EAR36 = 1572
- , H_SPR_EAR37 = 1573, H_SPR_EAR38 = 1574, H_SPR_EAR39 = 1575, H_SPR_EAR40 = 1576
- , H_SPR_EAR41 = 1577, H_SPR_EAR42 = 1578, H_SPR_EAR43 = 1579, H_SPR_EAR44 = 1580
- , H_SPR_EAR45 = 1581, H_SPR_EAR46 = 1582, H_SPR_EAR47 = 1583, H_SPR_EAR48 = 1584
- , H_SPR_EAR49 = 1585, H_SPR_EAR50 = 1586, H_SPR_EAR51 = 1587, H_SPR_EAR52 = 1588
- , H_SPR_EAR53 = 1589, H_SPR_EAR54 = 1590, H_SPR_EAR55 = 1591, H_SPR_EAR56 = 1592
- , H_SPR_EAR57 = 1593, H_SPR_EAR58 = 1594, H_SPR_EAR59 = 1595, H_SPR_EAR60 = 1596
- , H_SPR_EAR61 = 1597, H_SPR_EAR62 = 1598, H_SPR_EAR63 = 1599, H_SPR_EDR0 = 1600
- , H_SPR_EDR1 = 1601, H_SPR_EDR2 = 1602, H_SPR_EDR3 = 1603, H_SPR_EDR4 = 1604
- , H_SPR_EDR5 = 1605, H_SPR_EDR6 = 1606, H_SPR_EDR7 = 1607, H_SPR_EDR8 = 1608
- , H_SPR_EDR9 = 1609, H_SPR_EDR10 = 1610, H_SPR_EDR11 = 1611, H_SPR_EDR12 = 1612
- , H_SPR_EDR13 = 1613, H_SPR_EDR14 = 1614, H_SPR_EDR15 = 1615, H_SPR_EDR16 = 1616
- , H_SPR_EDR17 = 1617, H_SPR_EDR18 = 1618, H_SPR_EDR19 = 1619, H_SPR_EDR20 = 1620
- , H_SPR_EDR21 = 1621, H_SPR_EDR22 = 1622, H_SPR_EDR23 = 1623, H_SPR_EDR24 = 1624
- , H_SPR_EDR25 = 1625, H_SPR_EDR26 = 1626, H_SPR_EDR27 = 1627, H_SPR_EDR28 = 1628
- , H_SPR_EDR29 = 1629, H_SPR_EDR30 = 1630, H_SPR_EDR31 = 1631, H_SPR_EDR32 = 1632
- , H_SPR_EDR33 = 1636, H_SPR_EDR34 = 1634, H_SPR_EDR35 = 1635, H_SPR_EDR36 = 1636
- , H_SPR_EDR37 = 1637, H_SPR_EDR38 = 1638, H_SPR_EDR39 = 1639, H_SPR_EDR40 = 1640
- , H_SPR_EDR41 = 1641, H_SPR_EDR42 = 1642, H_SPR_EDR43 = 1643, H_SPR_EDR44 = 1644
- , H_SPR_EDR45 = 1645, H_SPR_EDR46 = 1646, H_SPR_EDR47 = 1647, H_SPR_EDR48 = 1648
- , H_SPR_EDR49 = 1649, H_SPR_EDR50 = 1650, H_SPR_EDR51 = 1651, H_SPR_EDR52 = 1652
- , H_SPR_EDR53 = 1653, H_SPR_EDR54 = 1654, H_SPR_EDR55 = 1655, H_SPR_EDR56 = 1656
- , H_SPR_EDR57 = 1657, H_SPR_EDR58 = 1658, H_SPR_EDR59 = 1659, H_SPR_EDR60 = 1660
- , H_SPR_EDR61 = 1661, H_SPR_EDR62 = 1662, H_SPR_EDR63 = 1663, H_SPR_IAMLR0 = 1664
- , H_SPR_IAMLR1 = 1665, H_SPR_IAMLR2 = 1666, H_SPR_IAMLR3 = 1667, H_SPR_IAMLR4 = 1668
- , H_SPR_IAMLR5 = 1669, H_SPR_IAMLR6 = 1670, H_SPR_IAMLR7 = 1671, H_SPR_IAMLR8 = 1672
- , H_SPR_IAMLR9 = 1673, H_SPR_IAMLR10 = 1674, H_SPR_IAMLR11 = 1675, H_SPR_IAMLR12 = 1676
- , H_SPR_IAMLR13 = 1677, H_SPR_IAMLR14 = 1678, H_SPR_IAMLR15 = 1679, H_SPR_IAMLR16 = 1680
- , H_SPR_IAMLR17 = 1681, H_SPR_IAMLR18 = 1682, H_SPR_IAMLR19 = 1683, H_SPR_IAMLR20 = 1684
- , H_SPR_IAMLR21 = 1685, H_SPR_IAMLR22 = 1686, H_SPR_IAMLR23 = 1687, H_SPR_IAMLR24 = 1688
- , H_SPR_IAMLR25 = 1689, H_SPR_IAMLR26 = 1690, H_SPR_IAMLR27 = 1691, H_SPR_IAMLR28 = 1692
- , H_SPR_IAMLR29 = 1693, H_SPR_IAMLR30 = 1694, H_SPR_IAMLR31 = 1695, H_SPR_IAMLR32 = 1696
- , H_SPR_IAMLR33 = 1697, H_SPR_IAMLR34 = 1698, H_SPR_IAMLR35 = 1699, H_SPR_IAMLR36 = 1700
- , H_SPR_IAMLR37 = 1701, H_SPR_IAMLR38 = 1702, H_SPR_IAMLR39 = 1703, H_SPR_IAMLR40 = 1704
- , H_SPR_IAMLR41 = 1705, H_SPR_IAMLR42 = 1706, H_SPR_IAMLR43 = 1707, H_SPR_IAMLR44 = 1708
- , H_SPR_IAMLR45 = 1709, H_SPR_IAMLR46 = 1710, H_SPR_IAMLR47 = 1711, H_SPR_IAMLR48 = 1712
- , H_SPR_IAMLR49 = 1713, H_SPR_IAMLR50 = 1714, H_SPR_IAMLR51 = 1715, H_SPR_IAMLR52 = 1716
- , H_SPR_IAMLR53 = 1717, H_SPR_IAMLR54 = 1718, H_SPR_IAMLR55 = 1719, H_SPR_IAMLR56 = 1720
- , H_SPR_IAMLR57 = 1721, H_SPR_IAMLR58 = 1722, H_SPR_IAMLR59 = 1723, H_SPR_IAMLR60 = 1724
- , H_SPR_IAMLR61 = 1725, H_SPR_IAMLR62 = 1726, H_SPR_IAMLR63 = 1727, H_SPR_IAMPR0 = 1728
- , H_SPR_IAMPR1 = 1729, H_SPR_IAMPR2 = 1730, H_SPR_IAMPR3 = 1731, H_SPR_IAMPR4 = 1732
- , H_SPR_IAMPR5 = 1733, H_SPR_IAMPR6 = 1734, H_SPR_IAMPR7 = 1735, H_SPR_IAMPR8 = 1736
- , H_SPR_IAMPR9 = 1737, H_SPR_IAMPR10 = 1738, H_SPR_IAMPR11 = 1739, H_SPR_IAMPR12 = 1740
- , H_SPR_IAMPR13 = 1741, H_SPR_IAMPR14 = 1742, H_SPR_IAMPR15 = 1743, H_SPR_IAMPR16 = 1744
- , H_SPR_IAMPR17 = 1745, H_SPR_IAMPR18 = 1746, H_SPR_IAMPR19 = 1747, H_SPR_IAMPR20 = 1748
- , H_SPR_IAMPR21 = 1749, H_SPR_IAMPR22 = 1750, H_SPR_IAMPR23 = 1751, H_SPR_IAMPR24 = 1752
- , H_SPR_IAMPR25 = 1753, H_SPR_IAMPR26 = 1754, H_SPR_IAMPR27 = 1755, H_SPR_IAMPR28 = 1756
- , H_SPR_IAMPR29 = 1757, H_SPR_IAMPR30 = 1758, H_SPR_IAMPR31 = 1759, H_SPR_IAMPR32 = 1760
- , H_SPR_IAMPR33 = 1761, H_SPR_IAMPR34 = 1762, H_SPR_IAMPR35 = 1763, H_SPR_IAMPR36 = 1764
- , H_SPR_IAMPR37 = 1765, H_SPR_IAMPR38 = 1766, H_SPR_IAMPR39 = 1767, H_SPR_IAMPR40 = 1768
- , H_SPR_IAMPR41 = 1769, H_SPR_IAMPR42 = 1770, H_SPR_IAMPR43 = 1771, H_SPR_IAMPR44 = 1772
- , H_SPR_IAMPR45 = 1773, H_SPR_IAMPR46 = 1774, H_SPR_IAMPR47 = 1775, H_SPR_IAMPR48 = 1776
- , H_SPR_IAMPR49 = 1777, H_SPR_IAMPR50 = 1778, H_SPR_IAMPR51 = 1779, H_SPR_IAMPR52 = 1780
- , H_SPR_IAMPR53 = 1781, H_SPR_IAMPR54 = 1782, H_SPR_IAMPR55 = 1783, H_SPR_IAMPR56 = 1784
- , H_SPR_IAMPR57 = 1785, H_SPR_IAMPR58 = 1786, H_SPR_IAMPR59 = 1787, H_SPR_IAMPR60 = 1788
- , H_SPR_IAMPR61 = 1789, H_SPR_IAMPR62 = 1790, H_SPR_IAMPR63 = 1791, H_SPR_DAMLR0 = 1792
- , H_SPR_DAMLR1 = 1793, H_SPR_DAMLR2 = 1794, H_SPR_DAMLR3 = 1795, H_SPR_DAMLR4 = 1796
- , H_SPR_DAMLR5 = 1797, H_SPR_DAMLR6 = 1798, H_SPR_DAMLR7 = 1799, H_SPR_DAMLR8 = 1800
- , H_SPR_DAMLR9 = 1801, H_SPR_DAMLR10 = 1802, H_SPR_DAMLR11 = 1803, H_SPR_DAMLR12 = 1804
- , H_SPR_DAMLR13 = 1805, H_SPR_DAMLR14 = 1806, H_SPR_DAMLR15 = 1807, H_SPR_DAMLR16 = 1808
- , H_SPR_DAMLR17 = 1809, H_SPR_DAMLR18 = 1810, H_SPR_DAMLR19 = 1811, H_SPR_DAMLR20 = 1812
- , H_SPR_DAMLR21 = 1813, H_SPR_DAMLR22 = 1814, H_SPR_DAMLR23 = 1815, H_SPR_DAMLR24 = 1816
- , H_SPR_DAMLR25 = 1817, H_SPR_DAMLR26 = 1818, H_SPR_DAMLR27 = 1819, H_SPR_DAMLR28 = 1820
- , H_SPR_DAMLR29 = 1821, H_SPR_DAMLR30 = 1822, H_SPR_DAMLR31 = 1823, H_SPR_DAMLR32 = 1824
- , H_SPR_DAMLR33 = 1825, H_SPR_DAMLR34 = 1826, H_SPR_DAMLR35 = 1827, H_SPR_DAMLR36 = 1828
- , H_SPR_DAMLR37 = 1829, H_SPR_DAMLR38 = 1830, H_SPR_DAMLR39 = 1831, H_SPR_DAMLR40 = 1832
- , H_SPR_DAMLR41 = 1833, H_SPR_DAMLR42 = 1834, H_SPR_DAMLR43 = 1835, H_SPR_DAMLR44 = 1836
- , H_SPR_DAMLR45 = 1837, H_SPR_DAMLR46 = 1838, H_SPR_DAMLR47 = 1839, H_SPR_DAMLR48 = 1840
- , H_SPR_DAMLR49 = 1841, H_SPR_DAMLR50 = 1842, H_SPR_DAMLR51 = 1843, H_SPR_DAMLR52 = 1844
- , H_SPR_DAMLR53 = 1845, H_SPR_DAMLR54 = 1846, H_SPR_DAMLR55 = 1847, H_SPR_DAMLR56 = 1848
- , H_SPR_DAMLR57 = 1849, H_SPR_DAMLR58 = 1850, H_SPR_DAMLR59 = 1851, H_SPR_DAMLR60 = 1852
- , H_SPR_DAMLR61 = 1853, H_SPR_DAMLR62 = 1854, H_SPR_DAMLR63 = 1855, H_SPR_DAMPR0 = 1856
- , H_SPR_DAMPR1 = 1857, H_SPR_DAMPR2 = 1858, H_SPR_DAMPR3 = 1859, H_SPR_DAMPR4 = 1860
- , H_SPR_DAMPR5 = 1861, H_SPR_DAMPR6 = 1862, H_SPR_DAMPR7 = 1863, H_SPR_DAMPR8 = 1864
- , H_SPR_DAMPR9 = 1865, H_SPR_DAMPR10 = 1866, H_SPR_DAMPR11 = 1867, H_SPR_DAMPR12 = 1868
- , H_SPR_DAMPR13 = 1869, H_SPR_DAMPR14 = 1870, H_SPR_DAMPR15 = 1871, H_SPR_DAMPR16 = 1872
- , H_SPR_DAMPR17 = 1873, H_SPR_DAMPR18 = 1874, H_SPR_DAMPR19 = 1875, H_SPR_DAMPR20 = 1876
- , H_SPR_DAMPR21 = 1877, H_SPR_DAMPR22 = 1878, H_SPR_DAMPR23 = 1879, H_SPR_DAMPR24 = 1880
- , H_SPR_DAMPR25 = 1881, H_SPR_DAMPR26 = 1882, H_SPR_DAMPR27 = 1883, H_SPR_DAMPR28 = 1884
- , H_SPR_DAMPR29 = 1885, H_SPR_DAMPR30 = 1886, H_SPR_DAMPR31 = 1887, H_SPR_DAMPR32 = 1888
- , H_SPR_DAMPR33 = 1889, H_SPR_DAMPR34 = 1890, H_SPR_DAMPR35 = 1891, H_SPR_DAMPR36 = 1892
- , H_SPR_DAMPR37 = 1893, H_SPR_DAMPR38 = 1894, H_SPR_DAMPR39 = 1895, H_SPR_DAMPR40 = 1896
- , H_SPR_DAMPR41 = 1897, H_SPR_DAMPR42 = 1898, H_SPR_DAMPR43 = 1899, H_SPR_DAMPR44 = 1900
- , H_SPR_DAMPR45 = 1901, H_SPR_DAMPR46 = 1902, H_SPR_DAMPR47 = 1903, H_SPR_DAMPR48 = 1904
- , H_SPR_DAMPR49 = 1905, H_SPR_DAMPR50 = 1906, H_SPR_DAMPR51 = 1907, H_SPR_DAMPR52 = 1908
- , H_SPR_DAMPR53 = 1909, H_SPR_DAMPR54 = 1910, H_SPR_DAMPR55 = 1911, H_SPR_DAMPR56 = 1912
- , H_SPR_DAMPR57 = 1913, H_SPR_DAMPR58 = 1914, H_SPR_DAMPR59 = 1915, H_SPR_DAMPR60 = 1916
- , H_SPR_DAMPR61 = 1917, H_SPR_DAMPR62 = 1918, H_SPR_DAMPR63 = 1919, H_SPR_AMCR = 1920
- , H_SPR_STBAR = 1921, H_SPR_MMCR = 1922, H_SPR_DCR = 2048, H_SPR_BRR = 2049
- , H_SPR_NMAR = 2050, H_SPR_IBAR0 = 2052, H_SPR_IBAR1 = 2053, H_SPR_IBAR2 = 2054
- , H_SPR_IBAR3 = 2055, H_SPR_DBAR0 = 2056, H_SPR_DBAR1 = 2057, H_SPR_DBAR2 = 2058
- , H_SPR_DBAR3 = 2059, H_SPR_DBDR00 = 2060, H_SPR_DBDR01 = 2061, H_SPR_DBDR02 = 2062
- , H_SPR_DBDR03 = 2063, H_SPR_DBDR10 = 2064, H_SPR_DBDR11 = 2065, H_SPR_DBDR12 = 2066
- , H_SPR_DBDR13 = 2067, H_SPR_DBDR20 = 2068, H_SPR_DBDR21 = 2069, H_SPR_DBDR22 = 2070
- , H_SPR_DBDR23 = 2071, H_SPR_DBDR30 = 2072, H_SPR_DBDR31 = 2073, H_SPR_DBDR32 = 2074
- , H_SPR_DBDR33 = 2075, H_SPR_DBMR00 = 2076, H_SPR_DBMR01 = 2077, H_SPR_DBMR02 = 2078
- , H_SPR_DBMR03 = 2079, H_SPR_DBMR10 = 2080, H_SPR_DBMR11 = 2081, H_SPR_DBMR12 = 2082
- , H_SPR_DBMR13 = 2083, H_SPR_DBMR20 = 2084, H_SPR_DBMR21 = 2085, H_SPR_DBMR22 = 2086
- , H_SPR_DBMR23 = 2087, H_SPR_DBMR30 = 2088, H_SPR_DBMR31 = 2089, H_SPR_DBMR32 = 2090
- , H_SPR_DBMR33 = 2091, H_SPR_CPCFR = 2092, H_SPR_CPCR = 2093, H_SPR_CPSR = 2094
- , H_SPR_CPESR0 = 2096, H_SPR_CPESR1 = 2097, H_SPR_CPEMR0 = 2098, H_SPR_CPEMR1 = 2099
- , H_SPR_IHSR8 = 3848
+ , H_SPR_LCR = 273, H_SPR_IACC0H = 280, H_SPR_IACC0L = 281, H_SPR_ISR = 288
+ , H_SPR_NEEAR0 = 352, H_SPR_NEEAR1 = 353, H_SPR_NEEAR2 = 354, H_SPR_NEEAR3 = 355
+ , H_SPR_NEEAR4 = 356, H_SPR_NEEAR5 = 357, H_SPR_NEEAR6 = 358, H_SPR_NEEAR7 = 359
+ , H_SPR_NEEAR8 = 360, H_SPR_NEEAR9 = 361, H_SPR_NEEAR10 = 362, H_SPR_NEEAR11 = 363
+ , H_SPR_NEEAR12 = 364, H_SPR_NEEAR13 = 365, H_SPR_NEEAR14 = 366, H_SPR_NEEAR15 = 367
+ , H_SPR_NEEAR16 = 368, H_SPR_NEEAR17 = 369, H_SPR_NEEAR18 = 370, H_SPR_NEEAR19 = 371
+ , H_SPR_NEEAR20 = 372, H_SPR_NEEAR21 = 373, H_SPR_NEEAR22 = 374, H_SPR_NEEAR23 = 375
+ , H_SPR_NEEAR24 = 376, H_SPR_NEEAR25 = 377, H_SPR_NEEAR26 = 378, H_SPR_NEEAR27 = 379
+ , H_SPR_NEEAR28 = 380, H_SPR_NEEAR29 = 381, H_SPR_NEEAR30 = 382, H_SPR_NEEAR31 = 383
+ , H_SPR_NESR0 = 384, H_SPR_NESR1 = 385, H_SPR_NESR2 = 386, H_SPR_NESR3 = 387
+ , H_SPR_NESR4 = 388, H_SPR_NESR5 = 389, H_SPR_NESR6 = 390, H_SPR_NESR7 = 391
+ , H_SPR_NESR8 = 392, H_SPR_NESR9 = 393, H_SPR_NESR10 = 394, H_SPR_NESR11 = 395
+ , H_SPR_NESR12 = 396, H_SPR_NESR13 = 397, H_SPR_NESR14 = 398, H_SPR_NESR15 = 399
+ , H_SPR_NESR16 = 400, H_SPR_NESR17 = 401, H_SPR_NESR18 = 402, H_SPR_NESR19 = 403
+ , H_SPR_NESR20 = 404, H_SPR_NESR21 = 405, H_SPR_NESR22 = 406, H_SPR_NESR23 = 407
+ , H_SPR_NESR24 = 408, H_SPR_NESR25 = 409, H_SPR_NESR26 = 410, H_SPR_NESR27 = 411
+ , H_SPR_NESR28 = 412, H_SPR_NESR29 = 413, H_SPR_NESR30 = 414, H_SPR_NESR31 = 415
+ , H_SPR_NECR = 416, H_SPR_GNER0 = 432, H_SPR_GNER1 = 433, H_SPR_FNER0 = 434
+ , H_SPR_FNER1 = 435, H_SPR_EPCR0 = 512, H_SPR_EPCR1 = 513, H_SPR_EPCR2 = 514
+ , H_SPR_EPCR3 = 515, H_SPR_EPCR4 = 516, H_SPR_EPCR5 = 517, H_SPR_EPCR6 = 518
+ , H_SPR_EPCR7 = 519, H_SPR_EPCR8 = 520, H_SPR_EPCR9 = 521, H_SPR_EPCR10 = 522
+ , H_SPR_EPCR11 = 523, H_SPR_EPCR12 = 524, H_SPR_EPCR13 = 525, H_SPR_EPCR14 = 526
+ , H_SPR_EPCR15 = 527, H_SPR_EPCR16 = 528, H_SPR_EPCR17 = 529, H_SPR_EPCR18 = 530
+ , H_SPR_EPCR19 = 531, H_SPR_EPCR20 = 532, H_SPR_EPCR21 = 533, H_SPR_EPCR22 = 534
+ , H_SPR_EPCR23 = 535, H_SPR_EPCR24 = 536, H_SPR_EPCR25 = 537, H_SPR_EPCR26 = 538
+ , H_SPR_EPCR27 = 539, H_SPR_EPCR28 = 540, H_SPR_EPCR29 = 541, H_SPR_EPCR30 = 542
+ , H_SPR_EPCR31 = 543, H_SPR_EPCR32 = 544, H_SPR_EPCR33 = 545, H_SPR_EPCR34 = 546
+ , H_SPR_EPCR35 = 547, H_SPR_EPCR36 = 548, H_SPR_EPCR37 = 549, H_SPR_EPCR38 = 550
+ , H_SPR_EPCR39 = 551, H_SPR_EPCR40 = 552, H_SPR_EPCR41 = 553, H_SPR_EPCR42 = 554
+ , H_SPR_EPCR43 = 555, H_SPR_EPCR44 = 556, H_SPR_EPCR45 = 557, H_SPR_EPCR46 = 558
+ , H_SPR_EPCR47 = 559, H_SPR_EPCR48 = 560, H_SPR_EPCR49 = 561, H_SPR_EPCR50 = 562
+ , H_SPR_EPCR51 = 563, H_SPR_EPCR52 = 564, H_SPR_EPCR53 = 565, H_SPR_EPCR54 = 566
+ , H_SPR_EPCR55 = 567, H_SPR_EPCR56 = 568, H_SPR_EPCR57 = 569, H_SPR_EPCR58 = 570
+ , H_SPR_EPCR59 = 571, H_SPR_EPCR60 = 572, H_SPR_EPCR61 = 573, H_SPR_EPCR62 = 574
+ , H_SPR_EPCR63 = 575, H_SPR_ESR0 = 576, H_SPR_ESR1 = 577, H_SPR_ESR2 = 578
+ , H_SPR_ESR3 = 579, H_SPR_ESR4 = 580, H_SPR_ESR5 = 581, H_SPR_ESR6 = 582
+ , H_SPR_ESR7 = 583, H_SPR_ESR8 = 584, H_SPR_ESR9 = 585, H_SPR_ESR10 = 586
+ , H_SPR_ESR11 = 587, H_SPR_ESR12 = 588, H_SPR_ESR13 = 589, H_SPR_ESR14 = 590
+ , H_SPR_ESR15 = 591, H_SPR_ESR16 = 592, H_SPR_ESR17 = 593, H_SPR_ESR18 = 594
+ , H_SPR_ESR19 = 595, H_SPR_ESR20 = 596, H_SPR_ESR21 = 597, H_SPR_ESR22 = 598
+ , H_SPR_ESR23 = 599, H_SPR_ESR24 = 600, H_SPR_ESR25 = 601, H_SPR_ESR26 = 602
+ , H_SPR_ESR27 = 603, H_SPR_ESR28 = 604, H_SPR_ESR29 = 605, H_SPR_ESR30 = 606
+ , H_SPR_ESR31 = 607, H_SPR_ESR32 = 608, H_SPR_ESR33 = 609, H_SPR_ESR34 = 610
+ , H_SPR_ESR35 = 611, H_SPR_ESR36 = 612, H_SPR_ESR37 = 613, H_SPR_ESR38 = 614
+ , H_SPR_ESR39 = 615, H_SPR_ESR40 = 616, H_SPR_ESR41 = 617, H_SPR_ESR42 = 618
+ , H_SPR_ESR43 = 619, H_SPR_ESR44 = 620, H_SPR_ESR45 = 621, H_SPR_ESR46 = 622
+ , H_SPR_ESR47 = 623, H_SPR_ESR48 = 624, H_SPR_ESR49 = 625, H_SPR_ESR50 = 626
+ , H_SPR_ESR51 = 627, H_SPR_ESR52 = 628, H_SPR_ESR53 = 629, H_SPR_ESR54 = 630
+ , H_SPR_ESR55 = 631, H_SPR_ESR56 = 632, H_SPR_ESR57 = 633, H_SPR_ESR58 = 634
+ , H_SPR_ESR59 = 635, H_SPR_ESR60 = 636, H_SPR_ESR61 = 637, H_SPR_ESR62 = 638
+ , H_SPR_ESR63 = 639, H_SPR_EIR0 = 640, H_SPR_EIR1 = 641, H_SPR_EIR2 = 642
+ , H_SPR_EIR3 = 643, H_SPR_EIR4 = 644, H_SPR_EIR5 = 645, H_SPR_EIR6 = 646
+ , H_SPR_EIR7 = 647, H_SPR_EIR8 = 648, H_SPR_EIR9 = 649, H_SPR_EIR10 = 650
+ , H_SPR_EIR11 = 651, H_SPR_EIR12 = 652, H_SPR_EIR13 = 653, H_SPR_EIR14 = 654
+ , H_SPR_EIR15 = 655, H_SPR_EIR16 = 656, H_SPR_EIR17 = 657, H_SPR_EIR18 = 658
+ , H_SPR_EIR19 = 659, H_SPR_EIR20 = 660, H_SPR_EIR21 = 661, H_SPR_EIR22 = 662
+ , H_SPR_EIR23 = 663, H_SPR_EIR24 = 664, H_SPR_EIR25 = 665, H_SPR_EIR26 = 666
+ , H_SPR_EIR27 = 667, H_SPR_EIR28 = 668, H_SPR_EIR29 = 669, H_SPR_EIR30 = 670
+ , H_SPR_EIR31 = 671, H_SPR_ESFR0 = 672, H_SPR_ESFR1 = 673, H_SPR_SR0 = 768
+ , H_SPR_SR1 = 769, H_SPR_SR2 = 770, H_SPR_SR3 = 771, H_SPR_FSR0 = 1024
+ , H_SPR_FSR1 = 1025, H_SPR_FSR2 = 1026, H_SPR_FSR3 = 1027, H_SPR_FSR4 = 1028
+ , H_SPR_FSR5 = 1029, H_SPR_FSR6 = 1030, H_SPR_FSR7 = 1031, H_SPR_FSR8 = 1032
+ , H_SPR_FSR9 = 1033, H_SPR_FSR10 = 1034, H_SPR_FSR11 = 1035, H_SPR_FSR12 = 1036
+ , H_SPR_FSR13 = 1037, H_SPR_FSR14 = 1038, H_SPR_FSR15 = 1039, H_SPR_FSR16 = 1040
+ , H_SPR_FSR17 = 1041, H_SPR_FSR18 = 1042, H_SPR_FSR19 = 1043, H_SPR_FSR20 = 1044
+ , H_SPR_FSR21 = 1045, H_SPR_FSR22 = 1046, H_SPR_FSR23 = 1047, H_SPR_FSR24 = 1048
+ , H_SPR_FSR25 = 1049, H_SPR_FSR26 = 1050, H_SPR_FSR27 = 1051, H_SPR_FSR28 = 1052
+ , H_SPR_FSR29 = 1053, H_SPR_FSR30 = 1054, H_SPR_FSR31 = 1055, H_SPR_FSR32 = 1056
+ , H_SPR_FSR33 = 1057, H_SPR_FSR34 = 1058, H_SPR_FSR35 = 1059, H_SPR_FSR36 = 1060
+ , H_SPR_FSR37 = 1061, H_SPR_FSR38 = 1062, H_SPR_FSR39 = 1063, H_SPR_FSR40 = 1064
+ , H_SPR_FSR41 = 1065, H_SPR_FSR42 = 1066, H_SPR_FSR43 = 1067, H_SPR_FSR44 = 1068
+ , H_SPR_FSR45 = 1069, H_SPR_FSR46 = 1070, H_SPR_FSR47 = 1071, H_SPR_FSR48 = 1072
+ , H_SPR_FSR49 = 1073, H_SPR_FSR50 = 1074, H_SPR_FSR51 = 1075, H_SPR_FSR52 = 1076
+ , H_SPR_FSR53 = 1077, H_SPR_FSR54 = 1078, H_SPR_FSR55 = 1079, H_SPR_FSR56 = 1080
+ , H_SPR_FSR57 = 1081, H_SPR_FSR58 = 1082, H_SPR_FSR59 = 1083, H_SPR_FSR60 = 1084
+ , H_SPR_FSR61 = 1085, H_SPR_FSR62 = 1086, H_SPR_FSR63 = 1087, H_SPR_FQOP0 = 1088
+ , H_SPR_FQOP1 = 1090, H_SPR_FQOP2 = 1092, H_SPR_FQOP3 = 1094, H_SPR_FQOP4 = 1096
+ , H_SPR_FQOP5 = 1098, H_SPR_FQOP6 = 1100, H_SPR_FQOP7 = 1102, H_SPR_FQOP8 = 1104
+ , H_SPR_FQOP9 = 1106, H_SPR_FQOP10 = 1108, H_SPR_FQOP11 = 1110, H_SPR_FQOP12 = 1112
+ , H_SPR_FQOP13 = 1114, H_SPR_FQOP14 = 1116, H_SPR_FQOP15 = 1118, H_SPR_FQOP16 = 1120
+ , H_SPR_FQOP17 = 1122, H_SPR_FQOP18 = 1124, H_SPR_FQOP19 = 1126, H_SPR_FQOP20 = 1128
+ , H_SPR_FQOP21 = 1130, H_SPR_FQOP22 = 1132, H_SPR_FQOP23 = 1134, H_SPR_FQOP24 = 1136
+ , H_SPR_FQOP25 = 1138, H_SPR_FQOP26 = 1140, H_SPR_FQOP27 = 1142, H_SPR_FQOP28 = 1144
+ , H_SPR_FQOP29 = 1146, H_SPR_FQOP30 = 1148, H_SPR_FQOP31 = 1150, H_SPR_FQST0 = 1089
+ , H_SPR_FQST1 = 1091, H_SPR_FQST2 = 1093, H_SPR_FQST3 = 1095, H_SPR_FQST4 = 1097
+ , H_SPR_FQST5 = 1099, H_SPR_FQST6 = 1101, H_SPR_FQST7 = 1103, H_SPR_FQST8 = 1105
+ , H_SPR_FQST9 = 1107, H_SPR_FQST10 = 1109, H_SPR_FQST11 = 1111, H_SPR_FQST12 = 1113
+ , H_SPR_FQST13 = 1115, H_SPR_FQST14 = 1117, H_SPR_FQST15 = 1119, H_SPR_FQST16 = 1121
+ , H_SPR_FQST17 = 1123, H_SPR_FQST18 = 1125, H_SPR_FQST19 = 1127, H_SPR_FQST20 = 1129
+ , H_SPR_FQST21 = 1131, H_SPR_FQST22 = 1133, H_SPR_FQST23 = 1135, H_SPR_FQST24 = 1137
+ , H_SPR_FQST25 = 1139, H_SPR_FQST26 = 1141, H_SPR_FQST27 = 1143, H_SPR_FQST28 = 1145
+ , H_SPR_FQST29 = 1147, H_SPR_FQST30 = 1149, H_SPR_FQST31 = 1151, H_SPR_MCILR0 = 1272
+ , H_SPR_MCILR1 = 1273, H_SPR_MSR0 = 1280, H_SPR_MSR1 = 1281, H_SPR_MSR2 = 1282
+ , H_SPR_MSR3 = 1283, H_SPR_MSR4 = 1284, H_SPR_MSR5 = 1285, H_SPR_MSR6 = 1286
+ , H_SPR_MSR7 = 1287, H_SPR_MSR8 = 1288, H_SPR_MSR9 = 1289, H_SPR_MSR10 = 1290
+ , H_SPR_MSR11 = 1291, H_SPR_MSR12 = 1292, H_SPR_MSR13 = 1293, H_SPR_MSR14 = 1294
+ , H_SPR_MSR15 = 1295, H_SPR_MSR16 = 1296, H_SPR_MSR17 = 1297, H_SPR_MSR18 = 1298
+ , H_SPR_MSR19 = 1299, H_SPR_MSR20 = 1300, H_SPR_MSR21 = 1301, H_SPR_MSR22 = 1302
+ , H_SPR_MSR23 = 1303, H_SPR_MSR24 = 1304, H_SPR_MSR25 = 1305, H_SPR_MSR26 = 1306
+ , H_SPR_MSR27 = 1307, H_SPR_MSR28 = 1308, H_SPR_MSR29 = 1309, H_SPR_MSR30 = 1310
+ , H_SPR_MSR31 = 1311, H_SPR_MSR32 = 1312, H_SPR_MSR33 = 1313, H_SPR_MSR34 = 1314
+ , H_SPR_MSR35 = 1315, H_SPR_MSR36 = 1316, H_SPR_MSR37 = 1317, H_SPR_MSR38 = 1318
+ , H_SPR_MSR39 = 1319, H_SPR_MSR40 = 1320, H_SPR_MSR41 = 1321, H_SPR_MSR42 = 1322
+ , H_SPR_MSR43 = 1323, H_SPR_MSR44 = 1324, H_SPR_MSR45 = 1325, H_SPR_MSR46 = 1326
+ , H_SPR_MSR47 = 1327, H_SPR_MSR48 = 1328, H_SPR_MSR49 = 1329, H_SPR_MSR50 = 1330
+ , H_SPR_MSR51 = 1331, H_SPR_MSR52 = 1332, H_SPR_MSR53 = 1333, H_SPR_MSR54 = 1334
+ , H_SPR_MSR55 = 1335, H_SPR_MSR56 = 1336, H_SPR_MSR57 = 1337, H_SPR_MSR58 = 1338
+ , H_SPR_MSR59 = 1339, H_SPR_MSR60 = 1340, H_SPR_MSR61 = 1341, H_SPR_MSR62 = 1342
+ , H_SPR_MSR63 = 1343, H_SPR_MQOP0 = 1344, H_SPR_MQOP1 = 1346, H_SPR_MQOP2 = 1348
+ , H_SPR_MQOP3 = 1350, H_SPR_MQOP4 = 1352, H_SPR_MQOP5 = 1354, H_SPR_MQOP6 = 1356
+ , H_SPR_MQOP7 = 1358, H_SPR_MQOP8 = 1360, H_SPR_MQOP9 = 1362, H_SPR_MQOP10 = 1364
+ , H_SPR_MQOP11 = 1366, H_SPR_MQOP12 = 1368, H_SPR_MQOP13 = 1370, H_SPR_MQOP14 = 1372
+ , H_SPR_MQOP15 = 1374, H_SPR_MQOP16 = 1376, H_SPR_MQOP17 = 1378, H_SPR_MQOP18 = 1380
+ , H_SPR_MQOP19 = 1382, H_SPR_MQOP20 = 1384, H_SPR_MQOP21 = 1386, H_SPR_MQOP22 = 1388
+ , H_SPR_MQOP23 = 1390, H_SPR_MQOP24 = 1392, H_SPR_MQOP25 = 1394, H_SPR_MQOP26 = 1396
+ , H_SPR_MQOP27 = 1398, H_SPR_MQOP28 = 1400, H_SPR_MQOP29 = 1402, H_SPR_MQOP30 = 1404
+ , H_SPR_MQOP31 = 1406, H_SPR_MQST0 = 1345, H_SPR_MQST1 = 1347, H_SPR_MQST2 = 1349
+ , H_SPR_MQST3 = 1351, H_SPR_MQST4 = 1353, H_SPR_MQST5 = 1355, H_SPR_MQST6 = 1357
+ , H_SPR_MQST7 = 1359, H_SPR_MQST8 = 1361, H_SPR_MQST9 = 1363, H_SPR_MQST10 = 1365
+ , H_SPR_MQST11 = 1367, H_SPR_MQST12 = 1369, H_SPR_MQST13 = 1371, H_SPR_MQST14 = 1373
+ , H_SPR_MQST15 = 1375, H_SPR_MQST16 = 1377, H_SPR_MQST17 = 1379, H_SPR_MQST18 = 1381
+ , H_SPR_MQST19 = 1383, H_SPR_MQST20 = 1385, H_SPR_MQST21 = 1387, H_SPR_MQST22 = 1389
+ , H_SPR_MQST23 = 1391, H_SPR_MQST24 = 1393, H_SPR_MQST25 = 1395, H_SPR_MQST26 = 1397
+ , H_SPR_MQST27 = 1399, H_SPR_MQST28 = 1401, H_SPR_MQST29 = 1403, H_SPR_MQST30 = 1405
+ , H_SPR_MQST31 = 1407, H_SPR_EAR0 = 1536, H_SPR_EAR1 = 1537, H_SPR_EAR2 = 1538
+ , H_SPR_EAR3 = 1539, H_SPR_EAR4 = 1540, H_SPR_EAR5 = 1541, H_SPR_EAR6 = 1542
+ , H_SPR_EAR7 = 1543, H_SPR_EAR8 = 1544, H_SPR_EAR9 = 1545, H_SPR_EAR10 = 1546
+ , H_SPR_EAR11 = 1547, H_SPR_EAR12 = 1548, H_SPR_EAR13 = 1549, H_SPR_EAR14 = 1550
+ , H_SPR_EAR15 = 1551, H_SPR_EAR16 = 1552, H_SPR_EAR17 = 1553, H_SPR_EAR18 = 1554
+ , H_SPR_EAR19 = 1555, H_SPR_EAR20 = 1556, H_SPR_EAR21 = 1557, H_SPR_EAR22 = 1558
+ , H_SPR_EAR23 = 1559, H_SPR_EAR24 = 1560, H_SPR_EAR25 = 1561, H_SPR_EAR26 = 1562
+ , H_SPR_EAR27 = 1563, H_SPR_EAR28 = 1564, H_SPR_EAR29 = 1565, H_SPR_EAR30 = 1566
+ , H_SPR_EAR31 = 1567, H_SPR_EAR32 = 1568, H_SPR_EAR33 = 1569, H_SPR_EAR34 = 1570
+ , H_SPR_EAR35 = 1571, H_SPR_EAR36 = 1572, H_SPR_EAR37 = 1573, H_SPR_EAR38 = 1574
+ , H_SPR_EAR39 = 1575, H_SPR_EAR40 = 1576, H_SPR_EAR41 = 1577, H_SPR_EAR42 = 1578
+ , H_SPR_EAR43 = 1579, H_SPR_EAR44 = 1580, H_SPR_EAR45 = 1581, H_SPR_EAR46 = 1582
+ , H_SPR_EAR47 = 1583, H_SPR_EAR48 = 1584, H_SPR_EAR49 = 1585, H_SPR_EAR50 = 1586
+ , H_SPR_EAR51 = 1587, H_SPR_EAR52 = 1588, H_SPR_EAR53 = 1589, H_SPR_EAR54 = 1590
+ , H_SPR_EAR55 = 1591, H_SPR_EAR56 = 1592, H_SPR_EAR57 = 1593, H_SPR_EAR58 = 1594
+ , H_SPR_EAR59 = 1595, H_SPR_EAR60 = 1596, H_SPR_EAR61 = 1597, H_SPR_EAR62 = 1598
+ , H_SPR_EAR63 = 1599, H_SPR_EDR0 = 1600, H_SPR_EDR1 = 1601, H_SPR_EDR2 = 1602
+ , H_SPR_EDR3 = 1603, H_SPR_EDR4 = 1604, H_SPR_EDR5 = 1605, H_SPR_EDR6 = 1606
+ , H_SPR_EDR7 = 1607, H_SPR_EDR8 = 1608, H_SPR_EDR9 = 1609, H_SPR_EDR10 = 1610
+ , H_SPR_EDR11 = 1611, H_SPR_EDR12 = 1612, H_SPR_EDR13 = 1613, H_SPR_EDR14 = 1614
+ , H_SPR_EDR15 = 1615, H_SPR_EDR16 = 1616, H_SPR_EDR17 = 1617, H_SPR_EDR18 = 1618
+ , H_SPR_EDR19 = 1619, H_SPR_EDR20 = 1620, H_SPR_EDR21 = 1621, H_SPR_EDR22 = 1622
+ , H_SPR_EDR23 = 1623, H_SPR_EDR24 = 1624, H_SPR_EDR25 = 1625, H_SPR_EDR26 = 1626
+ , H_SPR_EDR27 = 1627, H_SPR_EDR28 = 1628, H_SPR_EDR29 = 1629, H_SPR_EDR30 = 1630
+ , H_SPR_EDR31 = 1631, H_SPR_EDR32 = 1632, H_SPR_EDR33 = 1636, H_SPR_EDR34 = 1634
+ , H_SPR_EDR35 = 1635, H_SPR_EDR36 = 1636, H_SPR_EDR37 = 1637, H_SPR_EDR38 = 1638
+ , H_SPR_EDR39 = 1639, H_SPR_EDR40 = 1640, H_SPR_EDR41 = 1641, H_SPR_EDR42 = 1642
+ , H_SPR_EDR43 = 1643, H_SPR_EDR44 = 1644, H_SPR_EDR45 = 1645, H_SPR_EDR46 = 1646
+ , H_SPR_EDR47 = 1647, H_SPR_EDR48 = 1648, H_SPR_EDR49 = 1649, H_SPR_EDR50 = 1650
+ , H_SPR_EDR51 = 1651, H_SPR_EDR52 = 1652, H_SPR_EDR53 = 1653, H_SPR_EDR54 = 1654
+ , H_SPR_EDR55 = 1655, H_SPR_EDR56 = 1656, H_SPR_EDR57 = 1657, H_SPR_EDR58 = 1658
+ , H_SPR_EDR59 = 1659, H_SPR_EDR60 = 1660, H_SPR_EDR61 = 1661, H_SPR_EDR62 = 1662
+ , H_SPR_EDR63 = 1663, H_SPR_IAMLR0 = 1664, H_SPR_IAMLR1 = 1665, H_SPR_IAMLR2 = 1666
+ , H_SPR_IAMLR3 = 1667, H_SPR_IAMLR4 = 1668, H_SPR_IAMLR5 = 1669, H_SPR_IAMLR6 = 1670
+ , H_SPR_IAMLR7 = 1671, H_SPR_IAMLR8 = 1672, H_SPR_IAMLR9 = 1673, H_SPR_IAMLR10 = 1674
+ , H_SPR_IAMLR11 = 1675, H_SPR_IAMLR12 = 1676, H_SPR_IAMLR13 = 1677, H_SPR_IAMLR14 = 1678
+ , H_SPR_IAMLR15 = 1679, H_SPR_IAMLR16 = 1680, H_SPR_IAMLR17 = 1681, H_SPR_IAMLR18 = 1682
+ , H_SPR_IAMLR19 = 1683, H_SPR_IAMLR20 = 1684, H_SPR_IAMLR21 = 1685, H_SPR_IAMLR22 = 1686
+ , H_SPR_IAMLR23 = 1687, H_SPR_IAMLR24 = 1688, H_SPR_IAMLR25 = 1689, H_SPR_IAMLR26 = 1690
+ , H_SPR_IAMLR27 = 1691, H_SPR_IAMLR28 = 1692, H_SPR_IAMLR29 = 1693, H_SPR_IAMLR30 = 1694
+ , H_SPR_IAMLR31 = 1695, H_SPR_IAMLR32 = 1696, H_SPR_IAMLR33 = 1697, H_SPR_IAMLR34 = 1698
+ , H_SPR_IAMLR35 = 1699, H_SPR_IAMLR36 = 1700, H_SPR_IAMLR37 = 1701, H_SPR_IAMLR38 = 1702
+ , H_SPR_IAMLR39 = 1703, H_SPR_IAMLR40 = 1704, H_SPR_IAMLR41 = 1705, H_SPR_IAMLR42 = 1706
+ , H_SPR_IAMLR43 = 1707, H_SPR_IAMLR44 = 1708, H_SPR_IAMLR45 = 1709, H_SPR_IAMLR46 = 1710
+ , H_SPR_IAMLR47 = 1711, H_SPR_IAMLR48 = 1712, H_SPR_IAMLR49 = 1713, H_SPR_IAMLR50 = 1714
+ , H_SPR_IAMLR51 = 1715, H_SPR_IAMLR52 = 1716, H_SPR_IAMLR53 = 1717, H_SPR_IAMLR54 = 1718
+ , H_SPR_IAMLR55 = 1719, H_SPR_IAMLR56 = 1720, H_SPR_IAMLR57 = 1721, H_SPR_IAMLR58 = 1722
+ , H_SPR_IAMLR59 = 1723, H_SPR_IAMLR60 = 1724, H_SPR_IAMLR61 = 1725, H_SPR_IAMLR62 = 1726
+ , H_SPR_IAMLR63 = 1727, H_SPR_IAMPR0 = 1728, H_SPR_IAMPR1 = 1729, H_SPR_IAMPR2 = 1730
+ , H_SPR_IAMPR3 = 1731, H_SPR_IAMPR4 = 1732, H_SPR_IAMPR5 = 1733, H_SPR_IAMPR6 = 1734
+ , H_SPR_IAMPR7 = 1735, H_SPR_IAMPR8 = 1736, H_SPR_IAMPR9 = 1737, H_SPR_IAMPR10 = 1738
+ , H_SPR_IAMPR11 = 1739, H_SPR_IAMPR12 = 1740, H_SPR_IAMPR13 = 1741, H_SPR_IAMPR14 = 1742
+ , H_SPR_IAMPR15 = 1743, H_SPR_IAMPR16 = 1744, H_SPR_IAMPR17 = 1745, H_SPR_IAMPR18 = 1746
+ , H_SPR_IAMPR19 = 1747, H_SPR_IAMPR20 = 1748, H_SPR_IAMPR21 = 1749, H_SPR_IAMPR22 = 1750
+ , H_SPR_IAMPR23 = 1751, H_SPR_IAMPR24 = 1752, H_SPR_IAMPR25 = 1753, H_SPR_IAMPR26 = 1754
+ , H_SPR_IAMPR27 = 1755, H_SPR_IAMPR28 = 1756, H_SPR_IAMPR29 = 1757, H_SPR_IAMPR30 = 1758
+ , H_SPR_IAMPR31 = 1759, H_SPR_IAMPR32 = 1760, H_SPR_IAMPR33 = 1761, H_SPR_IAMPR34 = 1762
+ , H_SPR_IAMPR35 = 1763, H_SPR_IAMPR36 = 1764, H_SPR_IAMPR37 = 1765, H_SPR_IAMPR38 = 1766
+ , H_SPR_IAMPR39 = 1767, H_SPR_IAMPR40 = 1768, H_SPR_IAMPR41 = 1769, H_SPR_IAMPR42 = 1770
+ , H_SPR_IAMPR43 = 1771, H_SPR_IAMPR44 = 1772, H_SPR_IAMPR45 = 1773, H_SPR_IAMPR46 = 1774
+ , H_SPR_IAMPR47 = 1775, H_SPR_IAMPR48 = 1776, H_SPR_IAMPR49 = 1777, H_SPR_IAMPR50 = 1778
+ , H_SPR_IAMPR51 = 1779, H_SPR_IAMPR52 = 1780, H_SPR_IAMPR53 = 1781, H_SPR_IAMPR54 = 1782
+ , H_SPR_IAMPR55 = 1783, H_SPR_IAMPR56 = 1784, H_SPR_IAMPR57 = 1785, H_SPR_IAMPR58 = 1786
+ , H_SPR_IAMPR59 = 1787, H_SPR_IAMPR60 = 1788, H_SPR_IAMPR61 = 1789, H_SPR_IAMPR62 = 1790
+ , H_SPR_IAMPR63 = 1791, H_SPR_DAMLR0 = 1792, H_SPR_DAMLR1 = 1793, H_SPR_DAMLR2 = 1794
+ , H_SPR_DAMLR3 = 1795, H_SPR_DAMLR4 = 1796, H_SPR_DAMLR5 = 1797, H_SPR_DAMLR6 = 1798
+ , H_SPR_DAMLR7 = 1799, H_SPR_DAMLR8 = 1800, H_SPR_DAMLR9 = 1801, H_SPR_DAMLR10 = 1802
+ , H_SPR_DAMLR11 = 1803, H_SPR_DAMLR12 = 1804, H_SPR_DAMLR13 = 1805, H_SPR_DAMLR14 = 1806
+ , H_SPR_DAMLR15 = 1807, H_SPR_DAMLR16 = 1808, H_SPR_DAMLR17 = 1809, H_SPR_DAMLR18 = 1810
+ , H_SPR_DAMLR19 = 1811, H_SPR_DAMLR20 = 1812, H_SPR_DAMLR21 = 1813, H_SPR_DAMLR22 = 1814
+ , H_SPR_DAMLR23 = 1815, H_SPR_DAMLR24 = 1816, H_SPR_DAMLR25 = 1817, H_SPR_DAMLR26 = 1818
+ , H_SPR_DAMLR27 = 1819, H_SPR_DAMLR28 = 1820, H_SPR_DAMLR29 = 1821, H_SPR_DAMLR30 = 1822
+ , H_SPR_DAMLR31 = 1823, H_SPR_DAMLR32 = 1824, H_SPR_DAMLR33 = 1825, H_SPR_DAMLR34 = 1826
+ , H_SPR_DAMLR35 = 1827, H_SPR_DAMLR36 = 1828, H_SPR_DAMLR37 = 1829, H_SPR_DAMLR38 = 1830
+ , H_SPR_DAMLR39 = 1831, H_SPR_DAMLR40 = 1832, H_SPR_DAMLR41 = 1833, H_SPR_DAMLR42 = 1834
+ , H_SPR_DAMLR43 = 1835, H_SPR_DAMLR44 = 1836, H_SPR_DAMLR45 = 1837, H_SPR_DAMLR46 = 1838
+ , H_SPR_DAMLR47 = 1839, H_SPR_DAMLR48 = 1840, H_SPR_DAMLR49 = 1841, H_SPR_DAMLR50 = 1842
+ , H_SPR_DAMLR51 = 1843, H_SPR_DAMLR52 = 1844, H_SPR_DAMLR53 = 1845, H_SPR_DAMLR54 = 1846
+ , H_SPR_DAMLR55 = 1847, H_SPR_DAMLR56 = 1848, H_SPR_DAMLR57 = 1849, H_SPR_DAMLR58 = 1850
+ , H_SPR_DAMLR59 = 1851, H_SPR_DAMLR60 = 1852, H_SPR_DAMLR61 = 1853, H_SPR_DAMLR62 = 1854
+ , H_SPR_DAMLR63 = 1855, H_SPR_DAMPR0 = 1856, H_SPR_DAMPR1 = 1857, H_SPR_DAMPR2 = 1858
+ , H_SPR_DAMPR3 = 1859, H_SPR_DAMPR4 = 1860, H_SPR_DAMPR5 = 1861, H_SPR_DAMPR6 = 1862
+ , H_SPR_DAMPR7 = 1863, H_SPR_DAMPR8 = 1864, H_SPR_DAMPR9 = 1865, H_SPR_DAMPR10 = 1866
+ , H_SPR_DAMPR11 = 1867, H_SPR_DAMPR12 = 1868, H_SPR_DAMPR13 = 1869, H_SPR_DAMPR14 = 1870
+ , H_SPR_DAMPR15 = 1871, H_SPR_DAMPR16 = 1872, H_SPR_DAMPR17 = 1873, H_SPR_DAMPR18 = 1874
+ , H_SPR_DAMPR19 = 1875, H_SPR_DAMPR20 = 1876, H_SPR_DAMPR21 = 1877, H_SPR_DAMPR22 = 1878
+ , H_SPR_DAMPR23 = 1879, H_SPR_DAMPR24 = 1880, H_SPR_DAMPR25 = 1881, H_SPR_DAMPR26 = 1882
+ , H_SPR_DAMPR27 = 1883, H_SPR_DAMPR28 = 1884, H_SPR_DAMPR29 = 1885, H_SPR_DAMPR30 = 1886
+ , H_SPR_DAMPR31 = 1887, H_SPR_DAMPR32 = 1888, H_SPR_DAMPR33 = 1889, H_SPR_DAMPR34 = 1890
+ , H_SPR_DAMPR35 = 1891, H_SPR_DAMPR36 = 1892, H_SPR_DAMPR37 = 1893, H_SPR_DAMPR38 = 1894
+ , H_SPR_DAMPR39 = 1895, H_SPR_DAMPR40 = 1896, H_SPR_DAMPR41 = 1897, H_SPR_DAMPR42 = 1898
+ , H_SPR_DAMPR43 = 1899, H_SPR_DAMPR44 = 1900, H_SPR_DAMPR45 = 1901, H_SPR_DAMPR46 = 1902
+ , H_SPR_DAMPR47 = 1903, H_SPR_DAMPR48 = 1904, H_SPR_DAMPR49 = 1905, H_SPR_DAMPR50 = 1906
+ , H_SPR_DAMPR51 = 1907, H_SPR_DAMPR52 = 1908, H_SPR_DAMPR53 = 1909, H_SPR_DAMPR54 = 1910
+ , H_SPR_DAMPR55 = 1911, H_SPR_DAMPR56 = 1912, H_SPR_DAMPR57 = 1913, H_SPR_DAMPR58 = 1914
+ , H_SPR_DAMPR59 = 1915, H_SPR_DAMPR60 = 1916, H_SPR_DAMPR61 = 1917, H_SPR_DAMPR62 = 1918
+ , H_SPR_DAMPR63 = 1919, H_SPR_AMCR = 1920, H_SPR_STBAR = 1921, H_SPR_MMCR = 1922
+ , H_SPR_DCR = 2048, H_SPR_BRR = 2049, H_SPR_NMAR = 2050, H_SPR_IBAR0 = 2052
+ , H_SPR_IBAR1 = 2053, H_SPR_IBAR2 = 2054, H_SPR_IBAR3 = 2055, H_SPR_DBAR0 = 2056
+ , H_SPR_DBAR1 = 2057, H_SPR_DBAR2 = 2058, H_SPR_DBAR3 = 2059, H_SPR_DBDR00 = 2060
+ , H_SPR_DBDR01 = 2061, H_SPR_DBDR02 = 2062, H_SPR_DBDR03 = 2063, H_SPR_DBDR10 = 2064
+ , H_SPR_DBDR11 = 2065, H_SPR_DBDR12 = 2066, H_SPR_DBDR13 = 2067, H_SPR_DBDR20 = 2068
+ , H_SPR_DBDR21 = 2069, H_SPR_DBDR22 = 2070, H_SPR_DBDR23 = 2071, H_SPR_DBDR30 = 2072
+ , H_SPR_DBDR31 = 2073, H_SPR_DBDR32 = 2074, H_SPR_DBDR33 = 2075, H_SPR_DBMR00 = 2076
+ , H_SPR_DBMR01 = 2077, H_SPR_DBMR02 = 2078, H_SPR_DBMR03 = 2079, H_SPR_DBMR10 = 2080
+ , H_SPR_DBMR11 = 2081, H_SPR_DBMR12 = 2082, H_SPR_DBMR13 = 2083, H_SPR_DBMR20 = 2084
+ , H_SPR_DBMR21 = 2085, H_SPR_DBMR22 = 2086, H_SPR_DBMR23 = 2087, H_SPR_DBMR30 = 2088
+ , H_SPR_DBMR31 = 2089, H_SPR_DBMR32 = 2090, H_SPR_DBMR33 = 2091, H_SPR_CPCFR = 2092
+ , H_SPR_CPCR = 2093, H_SPR_CPSR = 2094, H_SPR_CPESR0 = 2096, H_SPR_CPESR1 = 2097
+ , H_SPR_CPEMR0 = 2098, H_SPR_CPEMR1 = 2099, H_SPR_IHSR8 = 3848
} SPR_NAMES;
/* Enum declaration for . */
@@ -510,6 +510,11 @@ typedef enum acc_names {
} ACC_NAMES;
/* Enum declaration for . */
+typedef enum iacc0_names {
+ H_IACC0_IACC0
+} IACC0_NAMES;
+
+/* Enum declaration for . */
typedef enum iccr_names {
H_ICCR_ICC0, H_ICCR_ICC1, H_ICCR_ICC2, H_ICCR_ICC3
} ICCR_NAMES;
@@ -529,8 +534,8 @@ typedef enum cccr_names {
/* Enum declaration for machine type selection. */
typedef enum mach_attr {
- MACH_BASE, MACH_FRV, MACH_FR500, MACH_FR400
- , MACH_TOMCAT, MACH_SIMPLE, MACH_MAX
+ MACH_BASE, MACH_FRV, MACH_FR550, MACH_FR500
+ , MACH_FR400, MACH_TOMCAT, MACH_SIMPLE, MACH_MAX
} MACH_ATTR;
/* Enum declaration for instruction set selection. */
@@ -541,7 +546,8 @@ typedef enum isa_attr {
/* Enum declaration for parallel execution pipeline selection. */
typedef enum unit_attr {
UNIT_NIL, UNIT_I0, UNIT_I1, UNIT_I01
- , UNIT_IALL, UNIT_FM0, UNIT_FM1, UNIT_FM01
+ , UNIT_I2, UNIT_I3, UNIT_IALL, UNIT_FM0
+ , UNIT_FM1, UNIT_FM01, UNIT_FM2, UNIT_FM3
, UNIT_FMALL, UNIT_FMLOW, UNIT_B0, UNIT_B1
, UNIT_B01, UNIT_C, UNIT_MULT_DIV, UNIT_LOAD
, UNIT_STORE, UNIT_SCAN, UNIT_DCPL, UNIT_MDUALACC
@@ -568,6 +574,17 @@ typedef enum fr500_major_attr {
, FR500_MAJOR_M_6, FR500_MAJOR_M_7, FR500_MAJOR_M_8
} FR500_MAJOR_ATTR;
+/* Enum declaration for fr550 major insn categories. */
+typedef enum fr550_major_attr {
+ FR550_MAJOR_NONE, FR550_MAJOR_I_1, FR550_MAJOR_I_2, FR550_MAJOR_I_3
+ , FR550_MAJOR_I_4, FR550_MAJOR_I_5, FR550_MAJOR_I_6, FR550_MAJOR_I_7
+ , FR550_MAJOR_I_8, FR550_MAJOR_B_1, FR550_MAJOR_B_2, FR550_MAJOR_B_3
+ , FR550_MAJOR_B_4, FR550_MAJOR_B_5, FR550_MAJOR_B_6, FR550_MAJOR_C_1
+ , FR550_MAJOR_C_2, FR550_MAJOR_F_1, FR550_MAJOR_F_2, FR550_MAJOR_F_3
+ , FR550_MAJOR_F_4, FR550_MAJOR_M_1, FR550_MAJOR_M_2, FR550_MAJOR_M_3
+ , FR550_MAJOR_M_4, FR550_MAJOR_M_5
+} FR550_MAJOR_ATTR;
+
/* Number of architecture variants. */
#define MAX_ISAS 1
#define MAX_MACHS ((int) MACH_MAX)
@@ -642,9 +659,9 @@ typedef enum cgen_hw_type {
, HW_H_FR_DOUBLE, HW_H_FR_INT, HW_H_FR_HI, HW_H_FR_LO
, HW_H_FR_0, HW_H_FR_1, HW_H_FR_2, HW_H_FR_3
, HW_H_CPR, HW_H_CPR_DOUBLE, HW_H_SPR, HW_H_ACCG
- , HW_H_ACC40S, HW_H_ACC40U, HW_H_ICCR, HW_H_FCCR
- , HW_H_CCCR, HW_H_PACK, HW_H_HINT_TAKEN, HW_H_HINT_NOT_TAKEN
- , HW_MAX
+ , HW_H_ACC40S, HW_H_ACC40U, HW_H_IACC0, HW_H_ICCR
+ , HW_H_FCCR, HW_H_CCCR, HW_H_PACK, HW_H_HINT_TAKEN
+ , HW_H_HINT_NOT_TAKEN, HW_MAX
} CGEN_HW_TYPE;
#define MAX_HW ((int) HW_MAX)
@@ -702,7 +719,7 @@ typedef enum cgen_insn_attr {
, CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_PRIVILEGED, CGEN_INSN_NON_EXCEPTING
, CGEN_INSN_CONDITIONAL, CGEN_INSN_FR_ACCESS, CGEN_INSN_PRESERVE_OVF, CGEN_INSN_END_BOOLS
, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_UNIT, CGEN_INSN_FR400_MAJOR
- , CGEN_INSN_FR500_MAJOR, CGEN_INSN_END_NBOOLS
+ , CGEN_INSN_FR500_MAJOR, CGEN_INSN_FR550_MAJOR, CGEN_INSN_END_NBOOLS
} CGEN_INSN_ATTR;
/* Number of non-boolean elements in cgen_insn_attr. */
@@ -738,6 +755,7 @@ extern CGEN_KEYWORD frv_cgen_opval_spr_names;
extern CGEN_KEYWORD frv_cgen_opval_accg_names;
extern CGEN_KEYWORD frv_cgen_opval_acc_names;
extern CGEN_KEYWORD frv_cgen_opval_acc_names;
+extern CGEN_KEYWORD frv_cgen_opval_iacc0_names;
extern CGEN_KEYWORD frv_cgen_opval_iccr_names;
extern CGEN_KEYWORD frv_cgen_opval_fccr_names;
extern CGEN_KEYWORD frv_cgen_opval_cccr_names;
@@ -745,6 +763,7 @@ extern CGEN_KEYWORD frv_cgen_opval_h_pack;
extern CGEN_KEYWORD frv_cgen_opval_h_hint_taken;
extern CGEN_KEYWORD frv_cgen_opval_h_hint_not_taken;
+extern const CGEN_HW_ENTRY frv_cgen_hw_table[];
diff --git a/opcodes/frv-opc.c b/opcodes/frv-opc.c
index 7143a0e..61bdb45 100644
--- a/opcodes/frv-opc.c
+++ b/opcodes/frv-opc.c
@@ -32,6 +32,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/* -- opc.c */
#include "elf/frv.h"
+#include <stdio.h>
static int match_unit
PARAMS ((FRV_VLIW *, CGEN_ATTR_VALUE_TYPE, CGEN_ATTR_VALUE_TYPE));
@@ -45,8 +46,10 @@ static int fr400_check_insn_major_constraints
PARAMS ((FRV_VLIW *, CGEN_ATTR_VALUE_TYPE));
static int fr500_check_insn_major_constraints
PARAMS ((FRV_VLIW *, CGEN_ATTR_VALUE_TYPE));
+static int fr550_check_insn_major_constraints
+ PARAMS ((FRV_VLIW *, CGEN_ATTR_VALUE_TYPE, const CGEN_INSN *));
static int check_insn_major_constraints
- PARAMS ((FRV_VLIW *, CGEN_ATTR_VALUE_TYPE));
+ PARAMS ((FRV_VLIW *, CGEN_ATTR_VALUE_TYPE, const CGEN_INSN *));
int
frv_is_branch_major (CGEN_ATTR_VALUE_TYPE major, unsigned long mach)
@@ -146,32 +149,69 @@ frv_is_media_insn (const CGEN_INSN *insn)
static VLIW_COMBO fr400_allowed_vliw[] =
{
/* slot0 slot1 slot2 slot3 */
- { UNIT_I0, UNIT_I1, UNIT_NIL, UNIT_NIL },
- { UNIT_I0, UNIT_FM0, UNIT_NIL, UNIT_NIL },
- { UNIT_I0, UNIT_B0, UNIT_NIL, UNIT_NIL },
- { UNIT_FM0, UNIT_FM1, UNIT_NIL, UNIT_NIL },
- { UNIT_FM0, UNIT_B0, UNIT_NIL, UNIT_NIL },
- { UNIT_B0, UNIT_NIL, UNIT_NIL, UNIT_NIL },
- { UNIT_C, UNIT_NIL, UNIT_NIL, UNIT_NIL },
- { UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL }
+ { UNIT_I0, UNIT_I1, UNIT_NIL, UNIT_NIL PAD_VLIW_COMBO },
+ { UNIT_I0, UNIT_FM0, UNIT_NIL, UNIT_NIL PAD_VLIW_COMBO },
+ { UNIT_I0, UNIT_B0, UNIT_NIL, UNIT_NIL PAD_VLIW_COMBO },
+ { UNIT_FM0, UNIT_FM1, UNIT_NIL, UNIT_NIL PAD_VLIW_COMBO },
+ { UNIT_FM0, UNIT_B0, UNIT_NIL, UNIT_NIL PAD_VLIW_COMBO },
+ { UNIT_B0, UNIT_NIL, UNIT_NIL, UNIT_NIL PAD_VLIW_COMBO },
+ { UNIT_C, UNIT_NIL, UNIT_NIL, UNIT_NIL PAD_VLIW_COMBO },
+ { UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL PAD_VLIW_COMBO }
};
/* This table represents the allowable packing for vliw insns for the fr500.
+ The fr500 has only 4 vliw slots. Represent this by not allowing any insns
+ in the extra slots.
Subsets of any given row are also allowed. */
static VLIW_COMBO fr500_allowed_vliw[] =
{
/* slot0 slot1 slot2 slot3 */
- { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1 },
- { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_B0 },
- { UNIT_I0, UNIT_FM0, UNIT_FM1, UNIT_B0 },
- { UNIT_I0, UNIT_FM0, UNIT_B0, UNIT_B1 },
- { UNIT_I0, UNIT_I1, UNIT_B0, UNIT_B1 },
- { UNIT_I0, UNIT_B0, UNIT_B1, UNIT_NIL },
- { UNIT_FM0, UNIT_FM1, UNIT_B0, UNIT_B1 },
- { UNIT_FM0, UNIT_B0, UNIT_B1, UNIT_NIL },
- { UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL },
- { UNIT_C, UNIT_NIL, UNIT_NIL, UNIT_NIL },
- { UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL }
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1 PAD_VLIW_COMBO },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_B0 PAD_VLIW_COMBO },
+ { UNIT_I0, UNIT_FM0, UNIT_FM1, UNIT_B0 PAD_VLIW_COMBO },
+ { UNIT_I0, UNIT_FM0, UNIT_B0, UNIT_B1 PAD_VLIW_COMBO },
+ { UNIT_I0, UNIT_I1, UNIT_B0, UNIT_B1 PAD_VLIW_COMBO },
+ { UNIT_I0, UNIT_B0, UNIT_B1, UNIT_NIL PAD_VLIW_COMBO },
+ { UNIT_FM0, UNIT_FM1, UNIT_B0, UNIT_B1 PAD_VLIW_COMBO },
+ { UNIT_FM0, UNIT_B0, UNIT_B1, UNIT_NIL PAD_VLIW_COMBO },
+ { UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL PAD_VLIW_COMBO },
+ { UNIT_C, UNIT_NIL, UNIT_NIL, UNIT_NIL PAD_VLIW_COMBO },
+ { UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL PAD_VLIW_COMBO }
+};
+
+/* This table represents the allowable packing for vliw insns for the fr550.
+ Subsets of any given row are also allowed. */
+static VLIW_COMBO fr550_allowed_vliw[] =
+{
+ /* slot0 slot1 slot2 slot3 slot4 slot5 slot6 slot7 */
+ { UNIT_I0, UNIT_I1, UNIT_I2, UNIT_I3, UNIT_B0, UNIT_B1 , UNIT_NIL, UNIT_NIL },
+ { UNIT_I0, UNIT_I1, UNIT_I2, UNIT_B0, UNIT_B1 , UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_I0, UNIT_I1, UNIT_B0, UNIT_B1 , UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_I0, UNIT_B0, UNIT_B1 , UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1, UNIT_I2, UNIT_FM2, UNIT_I3, UNIT_FM3 },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1, UNIT_I2, UNIT_FM2, UNIT_I3, UNIT_B0 },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1, UNIT_I2, UNIT_FM2, UNIT_FM3, UNIT_B0 },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1, UNIT_I2, UNIT_FM2, UNIT_B0, UNIT_B1 },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1, UNIT_I2, UNIT_I3, UNIT_B0, UNIT_B1 },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1, UNIT_I2, UNIT_B0, UNIT_B1, UNIT_NIL },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1, UNIT_FM2, UNIT_FM3, UNIT_B0, UNIT_B1 },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1, UNIT_FM2, UNIT_FM3, UNIT_B0, UNIT_B1 },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1, UNIT_FM2, UNIT_B0, UNIT_B1, UNIT_NIL },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_FM1, UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_I2, UNIT_I3, UNIT_B0, UNIT_B1, UNIT_NIL },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_I2, UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL },
+ { UNIT_I0, UNIT_FM0, UNIT_I1, UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_I0, UNIT_FM0, UNIT_FM1, UNIT_FM2, UNIT_FM3, UNIT_B0, UNIT_B1, UNIT_NIL },
+ { UNIT_I0, UNIT_FM0, UNIT_FM1, UNIT_FM2, UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL },
+ { UNIT_I0, UNIT_FM0, UNIT_FM1, UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_I0, UNIT_FM0, UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_C, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_FM0, UNIT_FM1, UNIT_FM2, UNIT_FM3, UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL },
+ { UNIT_FM0, UNIT_FM1, UNIT_FM2, UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_FM0, UNIT_FM1, UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_FM0, UNIT_B0, UNIT_B1, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL },
+ { UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL, UNIT_NIL }
};
/* Some insns are assigned specialized implementation units which map to
@@ -184,10 +224,14 @@ static CGEN_ATTR_VALUE_TYPE fr400_unit_mapping[] =
/* I0 */ UNIT_I0,
/* I1 */ UNIT_I1,
/* I01 */ UNIT_I01,
+/* I2 */ UNIT_NIL, /* no I2 or I3 unit */
+/* I3 */ UNIT_NIL,
/* IALL */ UNIT_I01, /* only I0 and I1 units */
/* FM0 */ UNIT_FM0,
/* FM1 */ UNIT_FM1,
/* FM01 */ UNIT_FM01,
+/* FM2 */ UNIT_NIL, /* no F2 or M2 units */
+/* FM3 */ UNIT_NIL, /* no F3 or M3 units */
/* FMALL */ UNIT_FM01,/* Only F0,F1,M0,M1 units */
/* FMLOW */ UNIT_FM0, /* Only F0,M0 units */
/* B0 */ UNIT_B0, /* branches only in B0 unit. */
@@ -210,10 +254,14 @@ static CGEN_ATTR_VALUE_TYPE fr500_unit_mapping[] =
/* I0 */ UNIT_I0,
/* I1 */ UNIT_I1,
/* I01 */ UNIT_I01,
+/* I2 */ UNIT_NIL, /* no I2 or I3 unit */
+/* I3 */ UNIT_NIL,
/* IALL */ UNIT_I01, /* only I0 and I1 units */
/* FM0 */ UNIT_FM0,
/* FM1 */ UNIT_FM1,
/* FM01 */ UNIT_FM01,
+/* FM2 */ UNIT_NIL, /* no F2 or M2 units */
+/* FM3 */ UNIT_NIL, /* no F3 or M2 units */
/* FMALL */ UNIT_FM01,/* Only F0,F1,M0,M1 units */
/* FMLOW */ UNIT_FM0, /* Only F0,M0 units */
/* B0 */ UNIT_B0,
@@ -229,6 +277,36 @@ static CGEN_ATTR_VALUE_TYPE fr500_unit_mapping[] =
/* MCLRACC-1*/ UNIT_FM01 /* mclracc,A==1 in FM0 or FM1 unit. */
};
+static CGEN_ATTR_VALUE_TYPE fr550_unit_mapping[] =
+{
+/* unit in insn actual unit */
+/* NIL */ UNIT_NIL,
+/* I0 */ UNIT_I0,
+/* I1 */ UNIT_I1,
+/* I01 */ UNIT_I01,
+/* I2 */ UNIT_I2,
+/* I3 */ UNIT_I3,
+/* IALL */ UNIT_IALL,
+/* FM0 */ UNIT_FM0,
+/* FM1 */ UNIT_FM1,
+/* FM01 */ UNIT_FM01,
+/* FM2 */ UNIT_FM2,
+/* FM3 */ UNIT_FM3,
+/* FMALL */ UNIT_FMALL,
+/* FMLOW */ UNIT_FM01, /* Only F0,F1,M0,M1 units */
+/* B0 */ UNIT_B0,
+/* B1 */ UNIT_B1,
+/* B01 */ UNIT_B01,
+/* C */ UNIT_C,
+/* MULT-DIV */ UNIT_I01, /* multiply and divide in I0 or I1 unit. */
+/* LOAD */ UNIT_I01, /* load in I0 or I1 unit. */
+/* STORE */ UNIT_I01, /* store in I0 or I1 unit. */
+/* SCAN */ UNIT_IALL, /* scan in any integer unit. */
+/* DCPL */ UNIT_I0, /* dcpl only in I0 unit. */
+/* MDUALACC */ UNIT_FMALL,/* media dual acc insn in all media units */
+/* MCLRACC-1*/ UNIT_FM01 /* mclracc,A==1 in FM0 or FM1 unit. */
+};
+
void
frv_vliw_reset (FRV_VLIW *vliw, unsigned long mach, unsigned long elf_flags)
{
@@ -243,6 +321,10 @@ frv_vliw_reset (FRV_VLIW *vliw, unsigned long mach, unsigned long elf_flags)
vliw->current_vliw = fr400_allowed_vliw;
vliw->unit_mapping = fr400_unit_mapping;
break;
+ case bfd_mach_fr550:
+ vliw->current_vliw = fr550_allowed_vliw;
+ vliw->unit_mapping = fr550_unit_mapping;
+ break;
default:
vliw->current_vliw = fr500_allowed_vliw;
vliw->unit_mapping = fr500_unit_mapping;
@@ -275,6 +357,13 @@ match_unit (FRV_VLIW *vliw,
if (unit1 - unit2 <= 2)
return 1;
break;
+ case UNIT_IALL:
+ case UNIT_FMALL:
+ /* The ALL versions of these units are within 5 enums of the 0, 1, 2 or 3
+ versions. */
+ if (unit1 - unit2 <= 5)
+ return 1;
+ break;
default:
break;
}
@@ -309,7 +398,11 @@ add_next_to_vliw (FRV_VLIW *vliw, CGEN_ATTR_VALUE_TYPE unit)
VLIW_COMBO *potential;
if (next <= 0)
- abort (); /* Should never happen */
+ {
+ fprintf (stderr, "frv-opc.c line %d: bad vliw->next_slot value.\n",
+ __LINE__);
+ abort (); /* Should never happen */
+ }
/* The table is sorted by units allowed within slots, so vliws with
identical starting sequences are together. */
@@ -364,6 +457,123 @@ fr400_check_insn_major_constraints (
}
static int
+find_unit_in_vliw (
+ FRV_VLIW *vliw, CGEN_ATTR_VALUE_TYPE unit
+)
+{
+ int i;
+ for (i = 0; i < vliw->next_slot; ++i)
+ if (CGEN_INSN_ATTR_VALUE (vliw->insn[i], CGEN_INSN_UNIT) == unit)
+ return 1;
+
+ return 0; /* not found */
+}
+
+static int
+find_major_in_slot (
+ FRV_VLIW *vliw, CGEN_ATTR_VALUE_TYPE major, CGEN_ATTR_VALUE_TYPE slot
+)
+{
+ int i;
+
+ for (i = 0; i < vliw->next_slot; ++i)
+ if (vliw->major[i] == major && (*vliw->current_vliw)[i] == slot)
+ return 1;
+
+ return 0;
+}
+
+static int
+fr550_find_media_in_vliw (FRV_VLIW *vliw)
+{
+ int i;
+
+ for (i = 0; i < vliw->next_slot; ++i)
+ {
+ if (vliw->major[i] < FR550_MAJOR_M_1 || vliw->major[i] > FR550_MAJOR_M_5)
+ continue;
+
+ /* Found a media insn, however, MNOP and MCLRACC don't count. */
+ if (CGEN_INSN_NUM (vliw->insn[i]) == FRV_INSN_MNOP
+ || CGEN_INSN_NUM (vliw->insn[i]) == FRV_INSN_MCLRACC_0
+ || CGEN_INSN_NUM (vliw->insn[i]) == FRV_INSN_MCLRACC_1)
+ continue;
+
+ return 1; /* found one */
+ }
+
+ return 0;
+}
+
+static int
+fr550_find_float_in_vliw (FRV_VLIW *vliw)
+{
+ int i;
+
+ for (i = 0; i < vliw->next_slot; ++i)
+ {
+ if (vliw->major[i] < FR550_MAJOR_F_1 || vliw->major[i] > FR550_MAJOR_F_4)
+ continue;
+
+ /* Found a floating point insn, however, FNOP doesn't count. */
+ if (CGEN_INSN_NUM (vliw->insn[i]) == FRV_INSN_FNOP)
+ continue;
+
+ return 1; /* found one */
+ }
+
+ return 0;
+}
+
+static int
+fr550_check_insn_major_constraints (
+ FRV_VLIW *vliw, CGEN_ATTR_VALUE_TYPE major, const CGEN_INSN *insn
+)
+{
+ CGEN_ATTR_VALUE_TYPE unit;
+ CGEN_ATTR_VALUE_TYPE slot = (*vliw->current_vliw)[vliw->next_slot];
+ switch (slot)
+ {
+ case UNIT_I2:
+ /* If it's a store, then there must be another store in I1 */
+ unit = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_UNIT);
+ if (unit == UNIT_STORE)
+ return find_unit_in_vliw (vliw, UNIT_STORE);
+ break;
+ case UNIT_FM2:
+ case UNIT_FM3:
+ /* Floating point insns other than FNOP in slot f2 or f3 cannot coexist with
+ media insns. */
+ if (major >= FR550_MAJOR_F_1 && major <= FR550_MAJOR_F_4
+ && CGEN_INSN_NUM (insn) != FRV_INSN_FNOP)
+ return ! fr550_find_media_in_vliw (vliw);
+ /* Media insns other than MNOP in slot m2 or m3 cannot coexist with
+ floating point insns. */
+ if (major >= FR550_MAJOR_M_1 && major <= FR550_MAJOR_M_5
+ && CGEN_INSN_NUM (insn) != FRV_INSN_MNOP)
+ return ! fr550_find_float_in_vliw (vliw);
+ /* F-2 in slot f2 or f3 cannot coexist with F-2 or F-4 in slot f1 or f2
+ respectively.
+ */
+ if (major == FR550_MAJOR_F_2)
+ return ! find_major_in_slot (vliw, FR550_MAJOR_F_2, slot - (UNIT_FM2 - UNIT_FM0))
+ && ! find_major_in_slot (vliw, FR550_MAJOR_F_4, slot - (UNIT_FM2 - UNIT_FM0));
+ /* M-2 or M-5 in slot m2 or m3 cannot coexist with M-2 in slot m1 or m2
+ respectively. */
+ if (major == FR550_MAJOR_M_2 || major == FR550_MAJOR_M_5)
+ return ! find_major_in_slot (vliw, FR550_MAJOR_M_2, slot - (UNIT_FM2 - UNIT_FM0));
+ /* M-4 in slot m2 or m3 cannot coexist with M-4 in slot m1 or m2
+ respectively. */
+ if (major == FR550_MAJOR_M_4)
+ return ! find_major_in_slot (vliw, FR550_MAJOR_M_4, slot - (UNIT_FM2 - UNIT_FM0));
+ break;
+ default:
+ break;
+ }
+ return 1; /* all ok */
+}
+
+static int
fr500_check_insn_major_constraints (
FRV_VLIW *vliw, CGEN_ATTR_VALUE_TYPE major
)
@@ -464,6 +674,8 @@ fr500_check_insn_major_constraints (
&& ! find_major_in_vliw (vliw, FR500_MAJOR_F_6)
&& ! find_major_in_vliw (vliw, FR500_MAJOR_F_7);
default:
+ fprintf (stderr, "frv-opc.c, line %d: bad major code, aborting.\n",
+ __LINE__);
abort ();
break;
}
@@ -472,7 +684,7 @@ fr500_check_insn_major_constraints (
static int
check_insn_major_constraints (
- FRV_VLIW *vliw, CGEN_ATTR_VALUE_TYPE major
+ FRV_VLIW *vliw, CGEN_ATTR_VALUE_TYPE major, const CGEN_INSN *insn
)
{
int rc;
@@ -481,6 +693,9 @@ check_insn_major_constraints (
case bfd_mach_fr400:
rc = fr400_check_insn_major_constraints (vliw, major);
break;
+ case bfd_mach_fr550:
+ rc = fr550_check_insn_major_constraints (vliw, major, insn);
+ break;
default:
rc = fr500_check_insn_major_constraints (vliw, major);
break;
@@ -507,13 +722,20 @@ frv_vliw_add_insn (FRV_VLIW *vliw, const CGEN_INSN *insn)
unit = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_UNIT);
if (unit == UNIT_NIL)
- abort (); /* no UNIT specified for this insn in frv.cpu */
+ {
+ fprintf (stderr, "frv-opc.c line %d: bad insn unit.\n",
+ __LINE__);
+ abort (); /* no UNIT specified for this insn in frv.cpu */
+ }
switch (vliw->mach)
{
case bfd_mach_fr400:
major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR400_MAJOR);
break;
+ case bfd_mach_fr550:
+ major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR550_MAJOR);
+ break;
default:
major = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_FR500_MAJOR);
break;
@@ -525,6 +747,7 @@ frv_vliw_add_insn (FRV_VLIW *vliw, const CGEN_INSN *insn)
while (! match_unit (vliw, unit, (*vliw->current_vliw)[0]))
++vliw->current_vliw;
vliw->major[0] = major;
+ vliw->insn[0] = insn;
vliw->next_slot = 1;
return 0;
}
@@ -535,10 +758,11 @@ frv_vliw_add_insn (FRV_VLIW *vliw, const CGEN_INSN *insn)
if (! (vliw->elf_flags & EF_FRV_NOPACK))
{
new_vliw = add_next_to_vliw (vliw, unit);
- if (new_vliw && check_insn_major_constraints (vliw, major))
+ if (new_vliw && check_insn_major_constraints (vliw, major, insn))
{
vliw->current_vliw = new_vliw;
vliw->major[index] = major;
+ vliw->insn[index] = insn;
vliw->next_slot++;
return 0;
}
@@ -594,6 +818,18 @@ static const CGEN_IFMT ifmt_smul = {
32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_GRK) }, { F (F_OP) }, { F (F_GRI) }, { F (F_ICCI_1_NULL) }, { F (F_OPE2) }, { F (F_GRJ) }, { 0 } }
};
+static const CGEN_IFMT ifmt_smu = {
+ 32, 32, 0x7ffc0fc0, { { F (F_PACK) }, { F (F_RD_NULL) }, { F (F_OP) }, { F (F_GRI) }, { F (F_OPE1) }, { F (F_GRJ) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_slass = {
+ 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_GRK) }, { F (F_OP) }, { F (F_GRI) }, { F (F_OPE1) }, { F (F_GRJ) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_scutss = {
+ 32, 32, 0x1ffffc0, { { F (F_PACK) }, { F (F_GRK) }, { F (F_OP) }, { F (F_RS_NULL) }, { F (F_OPE1) }, { F (F_GRJ) }, { 0 } }
+};
+
static const CGEN_IFMT ifmt_cadd = {
32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_GRK) }, { F (F_OP) }, { F (F_GRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_GRJ) }, { 0 } }
};
@@ -646,10 +882,6 @@ static const CGEN_IFMT ifmt_setlos = {
32, 32, 0x1ff0000, { { F (F_PACK) }, { F (F_GRK) }, { F (F_OP) }, { F (F_MISC_NULL_4) }, { F (F_S16) }, { 0 } }
};
-static const CGEN_IFMT ifmt_ldsb = {
- 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_GRK) }, { F (F_OP) }, { F (F_GRI) }, { F (F_OPE1) }, { F (F_GRJ) }, { 0 } }
-};
-
static const CGEN_IFMT ifmt_ldbf = {
32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_GRI) }, { F (F_OPE1) }, { F (F_GRJ) }, { 0 } }
};
@@ -686,10 +918,6 @@ static const CGEN_IFMT ifmt_lddfi = {
32, 32, 0x1fc0000, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_GRI) }, { F (F_D12) }, { 0 } }
};
-static const CGEN_IFMT ifmt_stdf = {
- 32, 32, 0x1fc0fc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_GRI) }, { F (F_OPE1) }, { F (F_GRJ) }, { 0 } }
-};
-
static const CGEN_IFMT ifmt_cldbf = {
32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_GRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_GRJ) }, { 0 } }
};
@@ -698,14 +926,6 @@ static const CGEN_IFMT ifmt_clddf = {
32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_GRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_GRJ) }, { 0 } }
};
-static const CGEN_IFMT ifmt_cstdf = {
- 32, 32, 0x1fc00c0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_GRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_GRJ) }, { 0 } }
-};
-
-static const CGEN_IFMT ifmt_stdfi = {
- 32, 32, 0x1fc0000, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_GRI) }, { F (F_D12) }, { 0 } }
-};
-
static const CGEN_IFMT ifmt_movgf = {
32, 32, 0x1ffffc0, { { F (F_PACK) }, { F (F_FRK) }, { F (F_OP) }, { F (F_RS_NULL) }, { F (F_OPE1) }, { F (F_GRJ) }, { 0 } }
};
@@ -910,10 +1130,6 @@ static const CGEN_IFMT ifmt_ccalll = {
32, 32, 0x7ffc00c0, { { F (F_PACK) }, { F (F_MISC_NULL_1) }, { F (F_LI_ON) }, { F (F_OP) }, { F (F_GRI) }, { F (F_CCI) }, { F (F_COND) }, { F (F_OPE4) }, { F (F_GRJ) }, { 0 } }
};
-static const CGEN_IFMT ifmt_ici = {
- 32, 32, 0x7ffc0fc0, { { F (F_PACK) }, { F (F_RD_NULL) }, { F (F_OP) }, { F (F_GRI) }, { F (F_OPE1) }, { F (F_GRJ) }, { 0 } }
-};
-
static const CGEN_IFMT ifmt_icei = {
32, 32, 0x7dfc0fc0, { { F (F_PACK) }, { F (F_MISC_NULL_1) }, { F (F_AE) }, { F (F_OP) }, { F (F_GRI) }, { F (F_OPE1) }, { F (F_GRJ) }, { 0 } }
};
@@ -1277,6 +1493,24 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (GRI), ',', OP (GRJ), ',', OP (GRDOUBLEK), 0 } },
& ifmt_smul, { 0x280 }
},
+/* smu$pack $GRi,$GRj */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, OP (PACK), ' ', OP (GRI), ',', OP (GRJ), 0 } },
+ & ifmt_smu, { 0x1180140 }
+ },
+/* smass$pack $GRi,$GRj */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, OP (PACK), ' ', OP (GRI), ',', OP (GRJ), 0 } },
+ & ifmt_smu, { 0x1180180 }
+ },
+/* smsss$pack $GRi,$GRj */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, OP (PACK), ' ', OP (GRI), ',', OP (GRJ), 0 } },
+ & ifmt_smu, { 0x11801c0 }
+ },
/* sll$pack $GRi,$GRj,$GRk */
{
{ 0, 0, 0, 0 },
@@ -1295,6 +1529,18 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (GRI), ',', OP (GRJ), ',', OP (GRK), 0 } },
& ifmt_add, { 0x40300 }
},
+/* slass$pack $GRi,$GRj,$GRk */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, OP (PACK), ' ', OP (GRI), ',', OP (GRJ), ',', OP (GRK), 0 } },
+ & ifmt_slass, { 0x1180080 }
+ },
+/* scutss$pack $GRj,$GRk */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, OP (PACK), ' ', OP (GRJ), ',', OP (GRK), 0 } },
+ & ifmt_scutss, { 0x1180100 }
+ },
/* scan$pack $GRi,$GRj,$GRk */
{
{ 0, 0, 0, 0 },
@@ -1517,6 +1763,18 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (GRI), ',', OP (GRJ), ',', OP (GRK), ',', OP (ICCI_1), 0 } },
& ifmt_addcc, { 0x1c0 }
},
+/* addss$pack $GRi,$GRj,$GRk */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, OP (PACK), ' ', OP (GRI), ',', OP (GRJ), ',', OP (GRK), 0 } },
+ & ifmt_slass, { 0x1180000 }
+ },
+/* subss$pack $GRi,$GRj,$GRk */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, OP (PACK), ' ', OP (GRI), ',', OP (GRJ), ',', OP (GRK), 0 } },
+ & ifmt_slass, { 0x1180040 }
+ },
/* addi$pack $GRi,$s12,$GRk */
{
{ 0, 0, 0, 0 },
@@ -1725,31 +1983,31 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80000 }
+ & ifmt_slass, { 0x80000 }
},
/* ldub$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80040 }
+ & ifmt_slass, { 0x80040 }
},
/* ldsh$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80080 }
+ & ifmt_slass, { 0x80080 }
},
/* lduh$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x800c0 }
+ & ifmt_slass, { 0x800c0 }
},
/* ld$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80100 }
+ & ifmt_slass, { 0x80100 }
},
/* ldbf$pack @($GRi,$GRj),$FRintk */
{
@@ -1779,31 +2037,31 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80800 }
+ & ifmt_slass, { 0x80800 }
},
/* nldub$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80840 }
+ & ifmt_slass, { 0x80840 }
},
/* nldsh$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80880 }
+ & ifmt_slass, { 0x80880 }
},
/* nlduh$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x808c0 }
+ & ifmt_slass, { 0x808c0 }
},
/* nld$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80900 }
+ & ifmt_slass, { 0x80900 }
},
/* nldbf$pack @($GRi,$GRj),$FRintk */
{
@@ -1857,7 +2115,7 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80180 }
+ & ifmt_slass, { 0x80180 }
},
/* ldqf$pack @($GRi,$GRj),$FRintk */
{
@@ -1875,7 +2133,7 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80980 }
+ & ifmt_slass, { 0x80980 }
},
/* nldqf$pack @($GRi,$GRj),$FRintk */
{
@@ -1887,61 +2145,61 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80400 }
+ & ifmt_slass, { 0x80400 }
},
/* ldubu$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80440 }
+ & ifmt_slass, { 0x80440 }
},
/* ldshu$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80480 }
+ & ifmt_slass, { 0x80480 }
},
/* lduhu$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x804c0 }
+ & ifmt_slass, { 0x804c0 }
},
/* ldu$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80500 }
+ & ifmt_slass, { 0x80500 }
},
/* nldsbu$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80c00 }
+ & ifmt_slass, { 0x80c00 }
},
/* nldubu$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80c40 }
+ & ifmt_slass, { 0x80c40 }
},
/* nldshu$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80c80 }
+ & ifmt_slass, { 0x80c80 }
},
/* nlduhu$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80cc0 }
+ & ifmt_slass, { 0x80cc0 }
},
/* nldu$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80d00 }
+ & ifmt_slass, { 0x80d00 }
},
/* ldbfu$pack @($GRi,$GRj),$FRintk */
{
@@ -2019,13 +2277,13 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80580 }
+ & ifmt_slass, { 0x80580 }
},
/* nldqu$pack @($GRi,$GRj),$GRk */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0x80d80 }
+ & ifmt_slass, { 0x80d80 }
},
/* ldqfu$pack @($GRi,$GRj),$FRintk */
{
@@ -2177,12 +2435,6 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (D12), ')', ',', OP (FRINTK), 0 } },
& ifmt_ldbfi, { 0xf00000 }
},
-/* nldqi$pack @($GRi,$d12),$GRk */
- {
- { 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (D12), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsbi, { 0x1180000 }
- },
/* nldqfi$pack @($GRi,$d12),$FRintk */
{
{ 0, 0, 0, 0 },
@@ -2193,19 +2445,19 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0000 }
+ & ifmt_slass, { 0xc0000 }
},
/* sth$pack $GRk,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0040 }
+ & ifmt_slass, { 0xc0040 }
},
/* st$pack $GRk,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0080 }
+ & ifmt_slass, { 0xc0080 }
},
/* stbf$pack $FRintk,@($GRi,$GRj) */
{
@@ -2235,19 +2487,19 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0800 }
+ & ifmt_slass, { 0xc0800 }
},
/* rsth$pack $GRk,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0840 }
+ & ifmt_slass, { 0xc0840 }
},
/* rst$pack $GRk,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0880 }
+ & ifmt_slass, { 0xc0880 }
},
/* rstbf$pack $FRintk,@($GRi,$GRj) */
{
@@ -2267,41 +2519,41 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
& ifmt_ldbf, { 0xc0a80 }
},
-/* std$pack $GRk,@($GRi,$GRj) */
+/* std$pack $GRdoublek,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc00c0 }
+ { { MNEM, OP (PACK), ' ', OP (GRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
+ & ifmt_ldd, { 0xc00c0 }
},
-/* stdf$pack $FRk,@($GRi,$GRj) */
+/* stdf$pack $FRdoublek,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_stdf, { 0xc02c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
+ & ifmt_lddf, { 0xc02c0 }
},
-/* stdc$pack $CPRk,@($GRi,$GRj) */
+/* stdc$pack $CPRdoublek,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (CPRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldc, { 0xc0980 }
+ { { MNEM, OP (PACK), ' ', OP (CPRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
+ & ifmt_lddc, { 0xc0980 }
},
-/* rstd$pack $GRk,@($GRi,$GRj) */
+/* rstd$pack $GRdoublek,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc08c0 }
+ { { MNEM, OP (PACK), ' ', OP (GRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
+ & ifmt_ldd, { 0xc08c0 }
},
-/* rstdf$pack $FRk,@($GRi,$GRj) */
+/* rstdf$pack $FRdoublek,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_stdf, { 0xc0ac0 }
+ { { MNEM, OP (PACK), ' ', OP (FRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
+ & ifmt_lddf, { 0xc0ac0 }
},
/* stq$pack $GRk,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0100 }
+ & ifmt_slass, { 0xc0100 }
},
/* stqf$pack $FRintk,@($GRi,$GRj) */
{
@@ -2319,7 +2571,7 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0900 }
+ & ifmt_slass, { 0xc0900 }
},
/* rstqf$pack $FRintk,@($GRi,$GRj) */
{
@@ -2331,19 +2583,19 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0400 }
+ & ifmt_slass, { 0xc0400 }
},
/* sthu$pack $GRk,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0440 }
+ & ifmt_slass, { 0xc0440 }
},
/* stu$pack $GRk,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0480 }
+ & ifmt_slass, { 0xc0480 }
},
/* stbfu$pack $FRintk,@($GRi,$GRj) */
{
@@ -2369,29 +2621,29 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (CPRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
& ifmt_ldc, { 0xc0b40 }
},
-/* stdu$pack $GRk,@($GRi,$GRj) */
+/* stdu$pack $GRdoublek,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc04c0 }
+ { { MNEM, OP (PACK), ' ', OP (GRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
+ & ifmt_ldd, { 0xc04c0 }
},
-/* stdfu$pack $FRk,@($GRi,$GRj) */
+/* stdfu$pack $FRdoublek,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_stdf, { 0xc06c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
+ & ifmt_lddf, { 0xc06c0 }
},
-/* stdcu$pack $CPRk,@($GRi,$GRj) */
+/* stdcu$pack $CPRdoublek,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (CPRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldc, { 0xc0b80 }
+ { { MNEM, OP (PACK), ' ', OP (CPRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
+ & ifmt_lddc, { 0xc0b80 }
},
/* stqu$pack $GRk,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0500 }
+ & ifmt_slass, { 0xc0500 }
},
/* stqfu$pack $FRintk,@($GRi,$GRj) */
{
@@ -2573,17 +2825,17 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cldbf, { 0x1980080 }
},
-/* cstd$pack $GRk,@($GRi,$GRj),$CCi,$cond */
+/* cstd$pack $GRdoublek,@($GRi,$GRj),$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cadd, { 0x19000c0 }
+ { { MNEM, OP (PACK), ' ', OP (GRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_csmul, { 0x19000c0 }
},
-/* cstdf$pack $FRk,@($GRi,$GRj),$CCi,$cond */
+/* cstdf$pack $FRdoublek,@($GRi,$GRj),$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cstdf, { 0x19800c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_clddf, { 0x19800c0 }
},
/* cstq$pack $GRk,@($GRi,$GRj),$CCi,$cond */
{
@@ -2627,17 +2879,17 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (CCI), ',', OP (COND), 0 } },
& ifmt_cldbf, { 0x1a00080 }
},
-/* cstdu$pack $GRk,@($GRi,$GRj),$CCi,$cond */
+/* cstdu$pack $GRdoublek,@($GRi,$GRj),$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cadd, { 0x19c00c0 }
+ { { MNEM, OP (PACK), ' ', OP (GRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_csmul, { 0x19c00c0 }
},
-/* cstdfu$pack $FRk,@($GRi,$GRj),$CCi,$cond */
+/* cstdfu$pack $FRdoublek,@($GRi,$GRj),$CCi,$cond */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (CCI), ',', OP (COND), 0 } },
- & ifmt_cstdf, { 0x1a000c0 }
+ { { MNEM, OP (PACK), ' ', OP (FRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (CCI), ',', OP (COND), 0 } },
+ & ifmt_clddf, { 0x1a000c0 }
},
/* stbi$pack $GRk,@($GRi,$d12) */
{
@@ -2675,17 +2927,17 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, OP (PACK), ' ', OP (FRINTK), ',', '@', '(', OP (GRI), ',', OP (D12), ')', 0 } },
& ifmt_ldbfi, { 0x1540000 }
},
-/* stdi$pack $GRk,@($GRi,$d12) */
+/* stdi$pack $GRdoublek,@($GRi,$d12) */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (D12), ')', 0 } },
- & ifmt_ldsbi, { 0x14c0000 }
+ { { MNEM, OP (PACK), ' ', OP (GRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (D12), ')', 0 } },
+ & ifmt_lddi, { 0x14c0000 }
},
-/* stdfi$pack $FRk,@($GRi,$d12) */
+/* stdfi$pack $FRdoublek,@($GRi,$d12) */
{
{ 0, 0, 0, 0 },
- { { MNEM, OP (PACK), ' ', OP (FRK), ',', '@', '(', OP (GRI), ',', OP (D12), ')', 0 } },
- & ifmt_stdfi, { 0x1580000 }
+ { { MNEM, OP (PACK), ' ', OP (FRDOUBLEK), ',', '@', '(', OP (GRI), ',', OP (D12), ')', 0 } },
+ & ifmt_lddfi, { 0x1580000 }
},
/* stqi$pack $GRk,@($GRi,$d12) */
{
@@ -2703,7 +2955,7 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', ',', OP (GRK), 0 } },
- & ifmt_ldsb, { 0xc0140 }
+ & ifmt_slass, { 0xc0140 }
},
/* swapi$pack @($GRi,$d12),$GRk */
{
@@ -4269,13 +4521,13 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ici, { 0xc0e00 }
+ & ifmt_smu, { 0xc0e00 }
},
/* dci$pack @($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ici, { 0xc0f00 }
+ & ifmt_smu, { 0xc0f00 }
},
/* icei$pack @($GRi,$GRj),$ae */
{
@@ -4293,7 +4545,7 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ici, { 0xc0f40 }
+ & ifmt_smu, { 0xc0f40 }
},
/* dcef$pack @($GRi,$GRj),$ae */
{
@@ -4305,25 +4557,25 @@ static const CGEN_OPCODE frv_cgen_insn_opcode_table[MAX_INSNS] =
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0c80 }
+ & ifmt_slass, { 0xc0c80 }
},
/* wdtlb$pack $GRk,@($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', OP (GRK), ',', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ldsb, { 0xc0d80 }
+ & ifmt_slass, { 0xc0d80 }
},
/* itlbi$pack @($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ici, { 0xc0cc0 }
+ & ifmt_smu, { 0xc0cc0 }
},
/* dtlbi$pack @($GRi,$GRj) */
{
{ 0, 0, 0, 0 },
{ { MNEM, OP (PACK), ' ', '@', '(', OP (GRI), ',', OP (GRJ), ')', 0 } },
- & ifmt_ici, { 0xc0dc0 }
+ & ifmt_smu, { 0xc0dc0 }
},
/* icpl$pack $GRi,$GRj,$lock */
{
@@ -5711,37 +5963,37 @@ static const CGEN_IBASE frv_cgen_macro_insn_table[] =
/* nop$pack */
{
-1, "nop", "nop", 32,
- { 0|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_NONE } }
},
/* ret$pack */
{
-1, "ret", "ret", 32,
- { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3 } }
+ { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_B01, FR400_MAJOR_B_3, FR500_MAJOR_B_3, FR550_MAJOR_NONE } }
},
/* cmp$pack $GRi,$GRj,$ICCi_1 */
{
-1, "cmp", "cmp", 32,
- { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_NONE } }
},
/* cmpi$pack $GRi,$s10,$ICCi_1 */
{
-1, "cmpi", "cmpi", 32,
- { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_NONE } }
},
/* ccmp$pack $GRi,$GRj,$CCi,$cond */
{
-1, "ccmp", "ccmp", 32,
- { 0|A(CONDITIONAL)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_NONE } }
},
/* mov$pack $GRi,$GRk */
{
-1, "mov", "mov", 32,
- { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_NONE } }
},
/* cmov$pack $GRi,$GRk,$CCi,$cond */
{
-1, "cmov", "cmov", 32,
- { 0|A(CONDITIONAL)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1 } }
+ { 0|A(CONDITIONAL)|A(NO_DIS)|A(ALIAS), { (1<<MACH_BASE), UNIT_IALL, FR400_MAJOR_I_1, FR500_MAJOR_I_1, FR550_MAJOR_NONE } }
},
};
diff --git a/opcodes/frv-opc.h b/opcodes/frv-opc.h
index eb0b902..e166fa2 100644
--- a/opcodes/frv-opc.h
+++ b/opcodes/frv-opc.h
@@ -36,7 +36,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#define CGEN_VERBOSE_ASSEMBLER_ERRORS
/* Vliw support. */
-#define FRV_VLIW_SIZE 4 /* fr500 has largest vliw size of 4. */
+#define FRV_VLIW_SIZE 8 /* fr550 has largest vliw size of 8. */
+#define PAD_VLIW_COMBO ,UNIT_NIL,UNIT_NIL,UNIT_NIL,UNIT_NIL
typedef CGEN_ATTR_VALUE_TYPE VLIW_COMBO[FRV_VLIW_SIZE];
typedef struct
@@ -48,6 +49,7 @@ typedef struct
CGEN_ATTR_VALUE_TYPE *unit_mapping;
VLIW_COMBO *current_vliw;
CGEN_ATTR_VALUE_TYPE major[FRV_VLIW_SIZE];
+ const CGEN_INSN* insn[FRV_VLIW_SIZE];
} FRV_VLIW;
int frv_is_branch_major PARAMS ((CGEN_ATTR_VALUE_TYPE, unsigned long));
@@ -65,189 +67,190 @@ typedef enum cgen_insn_type {
FRV_INSN_INVALID, FRV_INSN_ADD, FRV_INSN_SUB, FRV_INSN_AND
, FRV_INSN_OR, FRV_INSN_XOR, FRV_INSN_NOT, FRV_INSN_SDIV
, FRV_INSN_NSDIV, FRV_INSN_UDIV, FRV_INSN_NUDIV, FRV_INSN_SMUL
- , FRV_INSN_UMUL, FRV_INSN_SLL, FRV_INSN_SRL, FRV_INSN_SRA
- , FRV_INSN_SCAN, FRV_INSN_CADD, FRV_INSN_CSUB, FRV_INSN_CAND
- , FRV_INSN_COR, FRV_INSN_CXOR, FRV_INSN_CNOT, FRV_INSN_CSMUL
- , FRV_INSN_CSDIV, FRV_INSN_CUDIV, FRV_INSN_CSLL, FRV_INSN_CSRL
- , FRV_INSN_CSRA, FRV_INSN_CSCAN, FRV_INSN_ADDCC, FRV_INSN_SUBCC
- , FRV_INSN_ANDCC, FRV_INSN_ORCC, FRV_INSN_XORCC, FRV_INSN_SLLCC
- , FRV_INSN_SRLCC, FRV_INSN_SRACC, FRV_INSN_SMULCC, FRV_INSN_UMULCC
- , FRV_INSN_CADDCC, FRV_INSN_CSUBCC, FRV_INSN_CSMULCC, FRV_INSN_CANDCC
- , FRV_INSN_CORCC, FRV_INSN_CXORCC, FRV_INSN_CSLLCC, FRV_INSN_CSRLCC
- , FRV_INSN_CSRACC, FRV_INSN_ADDX, FRV_INSN_SUBX, FRV_INSN_ADDXCC
- , FRV_INSN_SUBXCC, FRV_INSN_ADDI, FRV_INSN_SUBI, FRV_INSN_ANDI
- , FRV_INSN_ORI, FRV_INSN_XORI, FRV_INSN_SDIVI, FRV_INSN_NSDIVI
- , FRV_INSN_UDIVI, FRV_INSN_NUDIVI, FRV_INSN_SMULI, FRV_INSN_UMULI
- , FRV_INSN_SLLI, FRV_INSN_SRLI, FRV_INSN_SRAI, FRV_INSN_SCANI
- , FRV_INSN_ADDICC, FRV_INSN_SUBICC, FRV_INSN_ANDICC, FRV_INSN_ORICC
- , FRV_INSN_XORICC, FRV_INSN_SMULICC, FRV_INSN_UMULICC, FRV_INSN_SLLICC
- , FRV_INSN_SRLICC, FRV_INSN_SRAICC, FRV_INSN_ADDXI, FRV_INSN_SUBXI
- , FRV_INSN_ADDXICC, FRV_INSN_SUBXICC, FRV_INSN_CMPB, FRV_INSN_CMPBA
- , FRV_INSN_SETLO, FRV_INSN_SETHI, FRV_INSN_SETLOS, FRV_INSN_LDSB
- , FRV_INSN_LDUB, FRV_INSN_LDSH, FRV_INSN_LDUH, FRV_INSN_LD
- , FRV_INSN_LDBF, FRV_INSN_LDHF, FRV_INSN_LDF, FRV_INSN_LDC
- , FRV_INSN_NLDSB, FRV_INSN_NLDUB, FRV_INSN_NLDSH, FRV_INSN_NLDUH
- , FRV_INSN_NLD, FRV_INSN_NLDBF, FRV_INSN_NLDHF, FRV_INSN_NLDF
- , FRV_INSN_LDD, FRV_INSN_LDDF, FRV_INSN_LDDC, FRV_INSN_NLDD
- , FRV_INSN_NLDDF, FRV_INSN_LDQ, FRV_INSN_LDQF, FRV_INSN_LDQC
- , FRV_INSN_NLDQ, FRV_INSN_NLDQF, FRV_INSN_LDSBU, FRV_INSN_LDUBU
- , FRV_INSN_LDSHU, FRV_INSN_LDUHU, FRV_INSN_LDU, FRV_INSN_NLDSBU
- , FRV_INSN_NLDUBU, FRV_INSN_NLDSHU, FRV_INSN_NLDUHU, FRV_INSN_NLDU
- , FRV_INSN_LDBFU, FRV_INSN_LDHFU, FRV_INSN_LDFU, FRV_INSN_LDCU
- , FRV_INSN_NLDBFU, FRV_INSN_NLDHFU, FRV_INSN_NLDFU, FRV_INSN_LDDU
- , FRV_INSN_NLDDU, FRV_INSN_LDDFU, FRV_INSN_LDDCU, FRV_INSN_NLDDFU
- , FRV_INSN_LDQU, FRV_INSN_NLDQU, FRV_INSN_LDQFU, FRV_INSN_LDQCU
- , FRV_INSN_NLDQFU, FRV_INSN_LDSBI, FRV_INSN_LDSHI, FRV_INSN_LDI
- , FRV_INSN_LDUBI, FRV_INSN_LDUHI, FRV_INSN_LDBFI, FRV_INSN_LDHFI
- , FRV_INSN_LDFI, FRV_INSN_NLDSBI, FRV_INSN_NLDUBI, FRV_INSN_NLDSHI
- , FRV_INSN_NLDUHI, FRV_INSN_NLDI, FRV_INSN_NLDBFI, FRV_INSN_NLDHFI
- , FRV_INSN_NLDFI, FRV_INSN_LDDI, FRV_INSN_LDDFI, FRV_INSN_NLDDI
- , FRV_INSN_NLDDFI, FRV_INSN_LDQI, FRV_INSN_LDQFI, FRV_INSN_NLDQI
- , FRV_INSN_NLDQFI, FRV_INSN_STB, FRV_INSN_STH, FRV_INSN_ST
- , FRV_INSN_STBF, FRV_INSN_STHF, FRV_INSN_STF, FRV_INSN_STC
- , FRV_INSN_RSTB, FRV_INSN_RSTH, FRV_INSN_RST, FRV_INSN_RSTBF
- , FRV_INSN_RSTHF, FRV_INSN_RSTF, FRV_INSN_STD, FRV_INSN_STDF
- , FRV_INSN_STDC, FRV_INSN_RSTD, FRV_INSN_RSTDF, FRV_INSN_STQ
- , FRV_INSN_STQF, FRV_INSN_STQC, FRV_INSN_RSTQ, FRV_INSN_RSTQF
- , FRV_INSN_STBU, FRV_INSN_STHU, FRV_INSN_STU, FRV_INSN_STBFU
- , FRV_INSN_STHFU, FRV_INSN_STFU, FRV_INSN_STCU, FRV_INSN_STDU
- , FRV_INSN_STDFU, FRV_INSN_STDCU, FRV_INSN_STQU, FRV_INSN_STQFU
- , FRV_INSN_STQCU, FRV_INSN_CLDSB, FRV_INSN_CLDUB, FRV_INSN_CLDSH
- , FRV_INSN_CLDUH, FRV_INSN_CLD, FRV_INSN_CLDBF, FRV_INSN_CLDHF
- , FRV_INSN_CLDF, FRV_INSN_CLDD, FRV_INSN_CLDDF, FRV_INSN_CLDQ
- , FRV_INSN_CLDSBU, FRV_INSN_CLDUBU, FRV_INSN_CLDSHU, FRV_INSN_CLDUHU
- , FRV_INSN_CLDU, FRV_INSN_CLDBFU, FRV_INSN_CLDHFU, FRV_INSN_CLDFU
- , FRV_INSN_CLDDU, FRV_INSN_CLDDFU, FRV_INSN_CLDQU, FRV_INSN_CSTB
- , FRV_INSN_CSTH, FRV_INSN_CST, FRV_INSN_CSTBF, FRV_INSN_CSTHF
- , FRV_INSN_CSTF, FRV_INSN_CSTD, FRV_INSN_CSTDF, FRV_INSN_CSTQ
- , FRV_INSN_CSTBU, FRV_INSN_CSTHU, FRV_INSN_CSTU, FRV_INSN_CSTBFU
- , FRV_INSN_CSTHFU, FRV_INSN_CSTFU, FRV_INSN_CSTDU, FRV_INSN_CSTDFU
- , FRV_INSN_STBI, FRV_INSN_STHI, FRV_INSN_STI, FRV_INSN_STBFI
- , FRV_INSN_STHFI, FRV_INSN_STFI, FRV_INSN_STDI, FRV_INSN_STDFI
- , FRV_INSN_STQI, FRV_INSN_STQFI, FRV_INSN_SWAP, FRV_INSN_SWAPI
- , FRV_INSN_CSWAP, FRV_INSN_MOVGF, FRV_INSN_MOVFG, FRV_INSN_MOVGFD
- , FRV_INSN_MOVFGD, FRV_INSN_MOVGFQ, FRV_INSN_MOVFGQ, FRV_INSN_CMOVGF
- , FRV_INSN_CMOVFG, FRV_INSN_CMOVGFD, FRV_INSN_CMOVFGD, FRV_INSN_MOVGS
- , FRV_INSN_MOVSG, FRV_INSN_BRA, FRV_INSN_BNO, FRV_INSN_BEQ
- , FRV_INSN_BNE, FRV_INSN_BLE, FRV_INSN_BGT, FRV_INSN_BLT
- , FRV_INSN_BGE, FRV_INSN_BLS, FRV_INSN_BHI, FRV_INSN_BC
- , FRV_INSN_BNC, FRV_INSN_BN, FRV_INSN_BP, FRV_INSN_BV
- , FRV_INSN_BNV, FRV_INSN_FBRA, FRV_INSN_FBNO, FRV_INSN_FBNE
- , FRV_INSN_FBEQ, FRV_INSN_FBLG, FRV_INSN_FBUE, FRV_INSN_FBUL
- , FRV_INSN_FBGE, FRV_INSN_FBLT, FRV_INSN_FBUGE, FRV_INSN_FBUG
- , FRV_INSN_FBLE, FRV_INSN_FBGT, FRV_INSN_FBULE, FRV_INSN_FBU
- , FRV_INSN_FBO, FRV_INSN_BCTRLR, FRV_INSN_BRALR, FRV_INSN_BNOLR
- , FRV_INSN_BEQLR, FRV_INSN_BNELR, FRV_INSN_BLELR, FRV_INSN_BGTLR
- , FRV_INSN_BLTLR, FRV_INSN_BGELR, FRV_INSN_BLSLR, FRV_INSN_BHILR
- , FRV_INSN_BCLR, FRV_INSN_BNCLR, FRV_INSN_BNLR, FRV_INSN_BPLR
- , FRV_INSN_BVLR, FRV_INSN_BNVLR, FRV_INSN_FBRALR, FRV_INSN_FBNOLR
- , FRV_INSN_FBEQLR, FRV_INSN_FBNELR, FRV_INSN_FBLGLR, FRV_INSN_FBUELR
- , FRV_INSN_FBULLR, FRV_INSN_FBGELR, FRV_INSN_FBLTLR, FRV_INSN_FBUGELR
- , FRV_INSN_FBUGLR, FRV_INSN_FBLELR, FRV_INSN_FBGTLR, FRV_INSN_FBULELR
- , FRV_INSN_FBULR, FRV_INSN_FBOLR, FRV_INSN_BCRALR, FRV_INSN_BCNOLR
- , FRV_INSN_BCEQLR, FRV_INSN_BCNELR, FRV_INSN_BCLELR, FRV_INSN_BCGTLR
- , FRV_INSN_BCLTLR, FRV_INSN_BCGELR, FRV_INSN_BCLSLR, FRV_INSN_BCHILR
- , FRV_INSN_BCCLR, FRV_INSN_BCNCLR, FRV_INSN_BCNLR, FRV_INSN_BCPLR
- , FRV_INSN_BCVLR, FRV_INSN_BCNVLR, FRV_INSN_FCBRALR, FRV_INSN_FCBNOLR
- , FRV_INSN_FCBEQLR, FRV_INSN_FCBNELR, FRV_INSN_FCBLGLR, FRV_INSN_FCBUELR
- , FRV_INSN_FCBULLR, FRV_INSN_FCBGELR, FRV_INSN_FCBLTLR, FRV_INSN_FCBUGELR
- , FRV_INSN_FCBUGLR, FRV_INSN_FCBLELR, FRV_INSN_FCBGTLR, FRV_INSN_FCBULELR
- , FRV_INSN_FCBULR, FRV_INSN_FCBOLR, FRV_INSN_JMPL, FRV_INSN_CALLL
- , FRV_INSN_JMPIL, FRV_INSN_CALLIL, FRV_INSN_CALL, FRV_INSN_RETT
- , FRV_INSN_REI, FRV_INSN_TRA, FRV_INSN_TNO, FRV_INSN_TEQ
- , FRV_INSN_TNE, FRV_INSN_TLE, FRV_INSN_TGT, FRV_INSN_TLT
- , FRV_INSN_TGE, FRV_INSN_TLS, FRV_INSN_THI, FRV_INSN_TC
- , FRV_INSN_TNC, FRV_INSN_TN, FRV_INSN_TP, FRV_INSN_TV
- , FRV_INSN_TNV, FRV_INSN_FTRA, FRV_INSN_FTNO, FRV_INSN_FTNE
- , FRV_INSN_FTEQ, FRV_INSN_FTLG, FRV_INSN_FTUE, FRV_INSN_FTUL
- , FRV_INSN_FTGE, FRV_INSN_FTLT, FRV_INSN_FTUGE, FRV_INSN_FTUG
- , FRV_INSN_FTLE, FRV_INSN_FTGT, FRV_INSN_FTULE, FRV_INSN_FTU
- , FRV_INSN_FTO, FRV_INSN_TIRA, FRV_INSN_TINO, FRV_INSN_TIEQ
- , FRV_INSN_TINE, FRV_INSN_TILE, FRV_INSN_TIGT, FRV_INSN_TILT
- , FRV_INSN_TIGE, FRV_INSN_TILS, FRV_INSN_TIHI, FRV_INSN_TIC
- , FRV_INSN_TINC, FRV_INSN_TIN, FRV_INSN_TIP, FRV_INSN_TIV
- , FRV_INSN_TINV, FRV_INSN_FTIRA, FRV_INSN_FTINO, FRV_INSN_FTINE
- , FRV_INSN_FTIEQ, FRV_INSN_FTILG, FRV_INSN_FTIUE, FRV_INSN_FTIUL
- , FRV_INSN_FTIGE, FRV_INSN_FTILT, FRV_INSN_FTIUGE, FRV_INSN_FTIUG
- , FRV_INSN_FTILE, FRV_INSN_FTIGT, FRV_INSN_FTIULE, FRV_INSN_FTIU
- , FRV_INSN_FTIO, FRV_INSN_BREAK, FRV_INSN_MTRAP, FRV_INSN_ANDCR
- , FRV_INSN_ORCR, FRV_INSN_XORCR, FRV_INSN_NANDCR, FRV_INSN_NORCR
- , FRV_INSN_ANDNCR, FRV_INSN_ORNCR, FRV_INSN_NANDNCR, FRV_INSN_NORNCR
- , FRV_INSN_NOTCR, FRV_INSN_CKRA, FRV_INSN_CKNO, FRV_INSN_CKEQ
- , FRV_INSN_CKNE, FRV_INSN_CKLE, FRV_INSN_CKGT, FRV_INSN_CKLT
- , FRV_INSN_CKGE, FRV_INSN_CKLS, FRV_INSN_CKHI, FRV_INSN_CKC
- , FRV_INSN_CKNC, FRV_INSN_CKN, FRV_INSN_CKP, FRV_INSN_CKV
- , FRV_INSN_CKNV, FRV_INSN_FCKRA, FRV_INSN_FCKNO, FRV_INSN_FCKNE
- , FRV_INSN_FCKEQ, FRV_INSN_FCKLG, FRV_INSN_FCKUE, FRV_INSN_FCKUL
- , FRV_INSN_FCKGE, FRV_INSN_FCKLT, FRV_INSN_FCKUGE, FRV_INSN_FCKUG
- , FRV_INSN_FCKLE, FRV_INSN_FCKGT, FRV_INSN_FCKULE, FRV_INSN_FCKU
- , FRV_INSN_FCKO, FRV_INSN_CCKRA, FRV_INSN_CCKNO, FRV_INSN_CCKEQ
- , FRV_INSN_CCKNE, FRV_INSN_CCKLE, FRV_INSN_CCKGT, FRV_INSN_CCKLT
- , FRV_INSN_CCKGE, FRV_INSN_CCKLS, FRV_INSN_CCKHI, FRV_INSN_CCKC
- , FRV_INSN_CCKNC, FRV_INSN_CCKN, FRV_INSN_CCKP, FRV_INSN_CCKV
- , FRV_INSN_CCKNV, FRV_INSN_CFCKRA, FRV_INSN_CFCKNO, FRV_INSN_CFCKNE
- , FRV_INSN_CFCKEQ, FRV_INSN_CFCKLG, FRV_INSN_CFCKUE, FRV_INSN_CFCKUL
- , FRV_INSN_CFCKGE, FRV_INSN_CFCKLT, FRV_INSN_CFCKUGE, FRV_INSN_CFCKUG
- , FRV_INSN_CFCKLE, FRV_INSN_CFCKGT, FRV_INSN_CFCKULE, FRV_INSN_CFCKU
- , FRV_INSN_CFCKO, FRV_INSN_CJMPL, FRV_INSN_CCALLL, FRV_INSN_ICI
- , FRV_INSN_DCI, FRV_INSN_ICEI, FRV_INSN_DCEI, FRV_INSN_DCF
- , FRV_INSN_DCEF, FRV_INSN_WITLB, FRV_INSN_WDTLB, FRV_INSN_ITLBI
- , FRV_INSN_DTLBI, FRV_INSN_ICPL, FRV_INSN_DCPL, FRV_INSN_ICUL
- , FRV_INSN_DCUL, FRV_INSN_BAR, FRV_INSN_MEMBAR, FRV_INSN_COP1
- , FRV_INSN_COP2, FRV_INSN_CLRGR, FRV_INSN_CLRFR, FRV_INSN_CLRGA
- , FRV_INSN_CLRFA, FRV_INSN_COMMITGR, FRV_INSN_COMMITFR, FRV_INSN_COMMITGA
- , FRV_INSN_COMMITFA, FRV_INSN_FITOS, FRV_INSN_FSTOI, FRV_INSN_FITOD
- , FRV_INSN_FDTOI, FRV_INSN_FDITOS, FRV_INSN_FDSTOI, FRV_INSN_NFDITOS
- , FRV_INSN_NFDSTOI, FRV_INSN_CFITOS, FRV_INSN_CFSTOI, FRV_INSN_NFITOS
- , FRV_INSN_NFSTOI, FRV_INSN_FMOVS, FRV_INSN_FMOVD, FRV_INSN_FDMOVS
- , FRV_INSN_CFMOVS, FRV_INSN_FNEGS, FRV_INSN_FNEGD, FRV_INSN_FDNEGS
- , FRV_INSN_CFNEGS, FRV_INSN_FABSS, FRV_INSN_FABSD, FRV_INSN_FDABSS
- , FRV_INSN_CFABSS, FRV_INSN_FSQRTS, FRV_INSN_FDSQRTS, FRV_INSN_NFDSQRTS
- , FRV_INSN_FSQRTD, FRV_INSN_CFSQRTS, FRV_INSN_NFSQRTS, FRV_INSN_FADDS
- , FRV_INSN_FSUBS, FRV_INSN_FMULS, FRV_INSN_FDIVS, FRV_INSN_FADDD
- , FRV_INSN_FSUBD, FRV_INSN_FMULD, FRV_INSN_FDIVD, FRV_INSN_CFADDS
- , FRV_INSN_CFSUBS, FRV_INSN_CFMULS, FRV_INSN_CFDIVS, FRV_INSN_NFADDS
- , FRV_INSN_NFSUBS, FRV_INSN_NFMULS, FRV_INSN_NFDIVS, FRV_INSN_FCMPS
- , FRV_INSN_FCMPD, FRV_INSN_CFCMPS, FRV_INSN_FDCMPS, FRV_INSN_FMADDS
- , FRV_INSN_FMSUBS, FRV_INSN_FMADDD, FRV_INSN_FMSUBD, FRV_INSN_FDMADDS
- , FRV_INSN_NFDMADDS, FRV_INSN_CFMADDS, FRV_INSN_CFMSUBS, FRV_INSN_NFMADDS
- , FRV_INSN_NFMSUBS, FRV_INSN_FMAS, FRV_INSN_FMSS, FRV_INSN_FDMAS
- , FRV_INSN_FDMSS, FRV_INSN_NFDMAS, FRV_INSN_NFDMSS, FRV_INSN_CFMAS
- , FRV_INSN_CFMSS, FRV_INSN_FMAD, FRV_INSN_FMSD, FRV_INSN_NFMAS
- , FRV_INSN_NFMSS, FRV_INSN_FDADDS, FRV_INSN_FDSUBS, FRV_INSN_FDMULS
- , FRV_INSN_FDDIVS, FRV_INSN_FDSADS, FRV_INSN_FDMULCS, FRV_INSN_NFDMULCS
- , FRV_INSN_NFDADDS, FRV_INSN_NFDSUBS, FRV_INSN_NFDMULS, FRV_INSN_NFDDIVS
- , FRV_INSN_NFDSADS, FRV_INSN_NFDCMPS, FRV_INSN_MHSETLOS, FRV_INSN_MHSETHIS
- , FRV_INSN_MHDSETS, FRV_INSN_MHSETLOH, FRV_INSN_MHSETHIH, FRV_INSN_MHDSETH
- , FRV_INSN_MAND, FRV_INSN_MOR, FRV_INSN_MXOR, FRV_INSN_CMAND
- , FRV_INSN_CMOR, FRV_INSN_CMXOR, FRV_INSN_MNOT, FRV_INSN_CMNOT
- , FRV_INSN_MROTLI, FRV_INSN_MROTRI, FRV_INSN_MWCUT, FRV_INSN_MWCUTI
- , FRV_INSN_MCUT, FRV_INSN_MCUTI, FRV_INSN_MCUTSS, FRV_INSN_MCUTSSI
- , FRV_INSN_MDCUTSSI, FRV_INSN_MAVEH, FRV_INSN_MSLLHI, FRV_INSN_MSRLHI
- , FRV_INSN_MSRAHI, FRV_INSN_MDROTLI, FRV_INSN_MCPLHI, FRV_INSN_MCPLI
- , FRV_INSN_MSATHS, FRV_INSN_MQSATHS, FRV_INSN_MSATHU, FRV_INSN_MCMPSH
- , FRV_INSN_MCMPUH, FRV_INSN_MABSHS, FRV_INSN_MADDHSS, FRV_INSN_MADDHUS
- , FRV_INSN_MSUBHSS, FRV_INSN_MSUBHUS, FRV_INSN_CMADDHSS, FRV_INSN_CMADDHUS
- , FRV_INSN_CMSUBHSS, FRV_INSN_CMSUBHUS, FRV_INSN_MQADDHSS, FRV_INSN_MQADDHUS
- , FRV_INSN_MQSUBHSS, FRV_INSN_MQSUBHUS, FRV_INSN_CMQADDHSS, FRV_INSN_CMQADDHUS
- , FRV_INSN_CMQSUBHSS, FRV_INSN_CMQSUBHUS, FRV_INSN_MADDACCS, FRV_INSN_MSUBACCS
- , FRV_INSN_MDADDACCS, FRV_INSN_MDSUBACCS, FRV_INSN_MASACCS, FRV_INSN_MDASACCS
- , FRV_INSN_MMULHS, FRV_INSN_MMULHU, FRV_INSN_MMULXHS, FRV_INSN_MMULXHU
- , FRV_INSN_CMMULHS, FRV_INSN_CMMULHU, FRV_INSN_MQMULHS, FRV_INSN_MQMULHU
- , FRV_INSN_MQMULXHS, FRV_INSN_MQMULXHU, FRV_INSN_CMQMULHS, FRV_INSN_CMQMULHU
- , FRV_INSN_MMACHS, FRV_INSN_MMACHU, FRV_INSN_MMRDHS, FRV_INSN_MMRDHU
- , FRV_INSN_CMMACHS, FRV_INSN_CMMACHU, FRV_INSN_MQMACHS, FRV_INSN_MQMACHU
- , FRV_INSN_CMQMACHS, FRV_INSN_CMQMACHU, FRV_INSN_MQXMACHS, FRV_INSN_MQXMACXHS
- , FRV_INSN_MQMACXHS, FRV_INSN_MCPXRS, FRV_INSN_MCPXRU, FRV_INSN_MCPXIS
- , FRV_INSN_MCPXIU, FRV_INSN_CMCPXRS, FRV_INSN_CMCPXRU, FRV_INSN_CMCPXIS
- , FRV_INSN_CMCPXIU, FRV_INSN_MQCPXRS, FRV_INSN_MQCPXRU, FRV_INSN_MQCPXIS
- , FRV_INSN_MQCPXIU, FRV_INSN_MEXPDHW, FRV_INSN_CMEXPDHW, FRV_INSN_MEXPDHD
- , FRV_INSN_CMEXPDHD, FRV_INSN_MPACKH, FRV_INSN_MDPACKH, FRV_INSN_MUNPACKH
- , FRV_INSN_MDUNPACKH, FRV_INSN_MBTOH, FRV_INSN_CMBTOH, FRV_INSN_MHTOB
- , FRV_INSN_CMHTOB, FRV_INSN_MBTOHE, FRV_INSN_CMBTOHE, FRV_INSN_MNOP
- , FRV_INSN_MCLRACC_0, FRV_INSN_MCLRACC_1, FRV_INSN_MRDACC, FRV_INSN_MRDACCG
- , FRV_INSN_MWTACC, FRV_INSN_MWTACCG, FRV_INSN_MCOP1, FRV_INSN_MCOP2
- , FRV_INSN_FNOP
+ , FRV_INSN_UMUL, FRV_INSN_SMU, FRV_INSN_SMASS, FRV_INSN_SMSSS
+ , FRV_INSN_SLL, FRV_INSN_SRL, FRV_INSN_SRA, FRV_INSN_SLASS
+ , FRV_INSN_SCUTSS, FRV_INSN_SCAN, FRV_INSN_CADD, FRV_INSN_CSUB
+ , FRV_INSN_CAND, FRV_INSN_COR, FRV_INSN_CXOR, FRV_INSN_CNOT
+ , FRV_INSN_CSMUL, FRV_INSN_CSDIV, FRV_INSN_CUDIV, FRV_INSN_CSLL
+ , FRV_INSN_CSRL, FRV_INSN_CSRA, FRV_INSN_CSCAN, FRV_INSN_ADDCC
+ , FRV_INSN_SUBCC, FRV_INSN_ANDCC, FRV_INSN_ORCC, FRV_INSN_XORCC
+ , FRV_INSN_SLLCC, FRV_INSN_SRLCC, FRV_INSN_SRACC, FRV_INSN_SMULCC
+ , FRV_INSN_UMULCC, FRV_INSN_CADDCC, FRV_INSN_CSUBCC, FRV_INSN_CSMULCC
+ , FRV_INSN_CANDCC, FRV_INSN_CORCC, FRV_INSN_CXORCC, FRV_INSN_CSLLCC
+ , FRV_INSN_CSRLCC, FRV_INSN_CSRACC, FRV_INSN_ADDX, FRV_INSN_SUBX
+ , FRV_INSN_ADDXCC, FRV_INSN_SUBXCC, FRV_INSN_ADDSS, FRV_INSN_SUBSS
+ , FRV_INSN_ADDI, FRV_INSN_SUBI, FRV_INSN_ANDI, FRV_INSN_ORI
+ , FRV_INSN_XORI, FRV_INSN_SDIVI, FRV_INSN_NSDIVI, FRV_INSN_UDIVI
+ , FRV_INSN_NUDIVI, FRV_INSN_SMULI, FRV_INSN_UMULI, FRV_INSN_SLLI
+ , FRV_INSN_SRLI, FRV_INSN_SRAI, FRV_INSN_SCANI, FRV_INSN_ADDICC
+ , FRV_INSN_SUBICC, FRV_INSN_ANDICC, FRV_INSN_ORICC, FRV_INSN_XORICC
+ , FRV_INSN_SMULICC, FRV_INSN_UMULICC, FRV_INSN_SLLICC, FRV_INSN_SRLICC
+ , FRV_INSN_SRAICC, FRV_INSN_ADDXI, FRV_INSN_SUBXI, FRV_INSN_ADDXICC
+ , FRV_INSN_SUBXICC, FRV_INSN_CMPB, FRV_INSN_CMPBA, FRV_INSN_SETLO
+ , FRV_INSN_SETHI, FRV_INSN_SETLOS, FRV_INSN_LDSB, FRV_INSN_LDUB
+ , FRV_INSN_LDSH, FRV_INSN_LDUH, FRV_INSN_LD, FRV_INSN_LDBF
+ , FRV_INSN_LDHF, FRV_INSN_LDF, FRV_INSN_LDC, FRV_INSN_NLDSB
+ , FRV_INSN_NLDUB, FRV_INSN_NLDSH, FRV_INSN_NLDUH, FRV_INSN_NLD
+ , FRV_INSN_NLDBF, FRV_INSN_NLDHF, FRV_INSN_NLDF, FRV_INSN_LDD
+ , FRV_INSN_LDDF, FRV_INSN_LDDC, FRV_INSN_NLDD, FRV_INSN_NLDDF
+ , FRV_INSN_LDQ, FRV_INSN_LDQF, FRV_INSN_LDQC, FRV_INSN_NLDQ
+ , FRV_INSN_NLDQF, FRV_INSN_LDSBU, FRV_INSN_LDUBU, FRV_INSN_LDSHU
+ , FRV_INSN_LDUHU, FRV_INSN_LDU, FRV_INSN_NLDSBU, FRV_INSN_NLDUBU
+ , FRV_INSN_NLDSHU, FRV_INSN_NLDUHU, FRV_INSN_NLDU, FRV_INSN_LDBFU
+ , FRV_INSN_LDHFU, FRV_INSN_LDFU, FRV_INSN_LDCU, FRV_INSN_NLDBFU
+ , FRV_INSN_NLDHFU, FRV_INSN_NLDFU, FRV_INSN_LDDU, FRV_INSN_NLDDU
+ , FRV_INSN_LDDFU, FRV_INSN_LDDCU, FRV_INSN_NLDDFU, FRV_INSN_LDQU
+ , FRV_INSN_NLDQU, FRV_INSN_LDQFU, FRV_INSN_LDQCU, FRV_INSN_NLDQFU
+ , FRV_INSN_LDSBI, FRV_INSN_LDSHI, FRV_INSN_LDI, FRV_INSN_LDUBI
+ , FRV_INSN_LDUHI, FRV_INSN_LDBFI, FRV_INSN_LDHFI, FRV_INSN_LDFI
+ , FRV_INSN_NLDSBI, FRV_INSN_NLDUBI, FRV_INSN_NLDSHI, FRV_INSN_NLDUHI
+ , FRV_INSN_NLDI, FRV_INSN_NLDBFI, FRV_INSN_NLDHFI, FRV_INSN_NLDFI
+ , FRV_INSN_LDDI, FRV_INSN_LDDFI, FRV_INSN_NLDDI, FRV_INSN_NLDDFI
+ , FRV_INSN_LDQI, FRV_INSN_LDQFI, FRV_INSN_NLDQFI, FRV_INSN_STB
+ , FRV_INSN_STH, FRV_INSN_ST, FRV_INSN_STBF, FRV_INSN_STHF
+ , FRV_INSN_STF, FRV_INSN_STC, FRV_INSN_RSTB, FRV_INSN_RSTH
+ , FRV_INSN_RST, FRV_INSN_RSTBF, FRV_INSN_RSTHF, FRV_INSN_RSTF
+ , FRV_INSN_STD, FRV_INSN_STDF, FRV_INSN_STDC, FRV_INSN_RSTD
+ , FRV_INSN_RSTDF, FRV_INSN_STQ, FRV_INSN_STQF, FRV_INSN_STQC
+ , FRV_INSN_RSTQ, FRV_INSN_RSTQF, FRV_INSN_STBU, FRV_INSN_STHU
+ , FRV_INSN_STU, FRV_INSN_STBFU, FRV_INSN_STHFU, FRV_INSN_STFU
+ , FRV_INSN_STCU, FRV_INSN_STDU, FRV_INSN_STDFU, FRV_INSN_STDCU
+ , FRV_INSN_STQU, FRV_INSN_STQFU, FRV_INSN_STQCU, FRV_INSN_CLDSB
+ , FRV_INSN_CLDUB, FRV_INSN_CLDSH, FRV_INSN_CLDUH, FRV_INSN_CLD
+ , FRV_INSN_CLDBF, FRV_INSN_CLDHF, FRV_INSN_CLDF, FRV_INSN_CLDD
+ , FRV_INSN_CLDDF, FRV_INSN_CLDQ, FRV_INSN_CLDSBU, FRV_INSN_CLDUBU
+ , FRV_INSN_CLDSHU, FRV_INSN_CLDUHU, FRV_INSN_CLDU, FRV_INSN_CLDBFU
+ , FRV_INSN_CLDHFU, FRV_INSN_CLDFU, FRV_INSN_CLDDU, FRV_INSN_CLDDFU
+ , FRV_INSN_CLDQU, FRV_INSN_CSTB, FRV_INSN_CSTH, FRV_INSN_CST
+ , FRV_INSN_CSTBF, FRV_INSN_CSTHF, FRV_INSN_CSTF, FRV_INSN_CSTD
+ , FRV_INSN_CSTDF, FRV_INSN_CSTQ, FRV_INSN_CSTBU, FRV_INSN_CSTHU
+ , FRV_INSN_CSTU, FRV_INSN_CSTBFU, FRV_INSN_CSTHFU, FRV_INSN_CSTFU
+ , FRV_INSN_CSTDU, FRV_INSN_CSTDFU, FRV_INSN_STBI, FRV_INSN_STHI
+ , FRV_INSN_STI, FRV_INSN_STBFI, FRV_INSN_STHFI, FRV_INSN_STFI
+ , FRV_INSN_STDI, FRV_INSN_STDFI, FRV_INSN_STQI, FRV_INSN_STQFI
+ , FRV_INSN_SWAP, FRV_INSN_SWAPI, FRV_INSN_CSWAP, FRV_INSN_MOVGF
+ , FRV_INSN_MOVFG, FRV_INSN_MOVGFD, FRV_INSN_MOVFGD, FRV_INSN_MOVGFQ
+ , FRV_INSN_MOVFGQ, FRV_INSN_CMOVGF, FRV_INSN_CMOVFG, FRV_INSN_CMOVGFD
+ , FRV_INSN_CMOVFGD, FRV_INSN_MOVGS, FRV_INSN_MOVSG, FRV_INSN_BRA
+ , FRV_INSN_BNO, FRV_INSN_BEQ, FRV_INSN_BNE, FRV_INSN_BLE
+ , FRV_INSN_BGT, FRV_INSN_BLT, FRV_INSN_BGE, FRV_INSN_BLS
+ , FRV_INSN_BHI, FRV_INSN_BC, FRV_INSN_BNC, FRV_INSN_BN
+ , FRV_INSN_BP, FRV_INSN_BV, FRV_INSN_BNV, FRV_INSN_FBRA
+ , FRV_INSN_FBNO, FRV_INSN_FBNE, FRV_INSN_FBEQ, FRV_INSN_FBLG
+ , FRV_INSN_FBUE, FRV_INSN_FBUL, FRV_INSN_FBGE, FRV_INSN_FBLT
+ , FRV_INSN_FBUGE, FRV_INSN_FBUG, FRV_INSN_FBLE, FRV_INSN_FBGT
+ , FRV_INSN_FBULE, FRV_INSN_FBU, FRV_INSN_FBO, FRV_INSN_BCTRLR
+ , FRV_INSN_BRALR, FRV_INSN_BNOLR, FRV_INSN_BEQLR, FRV_INSN_BNELR
+ , FRV_INSN_BLELR, FRV_INSN_BGTLR, FRV_INSN_BLTLR, FRV_INSN_BGELR
+ , FRV_INSN_BLSLR, FRV_INSN_BHILR, FRV_INSN_BCLR, FRV_INSN_BNCLR
+ , FRV_INSN_BNLR, FRV_INSN_BPLR, FRV_INSN_BVLR, FRV_INSN_BNVLR
+ , FRV_INSN_FBRALR, FRV_INSN_FBNOLR, FRV_INSN_FBEQLR, FRV_INSN_FBNELR
+ , FRV_INSN_FBLGLR, FRV_INSN_FBUELR, FRV_INSN_FBULLR, FRV_INSN_FBGELR
+ , FRV_INSN_FBLTLR, FRV_INSN_FBUGELR, FRV_INSN_FBUGLR, FRV_INSN_FBLELR
+ , FRV_INSN_FBGTLR, FRV_INSN_FBULELR, FRV_INSN_FBULR, FRV_INSN_FBOLR
+ , FRV_INSN_BCRALR, FRV_INSN_BCNOLR, FRV_INSN_BCEQLR, FRV_INSN_BCNELR
+ , FRV_INSN_BCLELR, FRV_INSN_BCGTLR, FRV_INSN_BCLTLR, FRV_INSN_BCGELR
+ , FRV_INSN_BCLSLR, FRV_INSN_BCHILR, FRV_INSN_BCCLR, FRV_INSN_BCNCLR
+ , FRV_INSN_BCNLR, FRV_INSN_BCPLR, FRV_INSN_BCVLR, FRV_INSN_BCNVLR
+ , FRV_INSN_FCBRALR, FRV_INSN_FCBNOLR, FRV_INSN_FCBEQLR, FRV_INSN_FCBNELR
+ , FRV_INSN_FCBLGLR, FRV_INSN_FCBUELR, FRV_INSN_FCBULLR, FRV_INSN_FCBGELR
+ , FRV_INSN_FCBLTLR, FRV_INSN_FCBUGELR, FRV_INSN_FCBUGLR, FRV_INSN_FCBLELR
+ , FRV_INSN_FCBGTLR, FRV_INSN_FCBULELR, FRV_INSN_FCBULR, FRV_INSN_FCBOLR
+ , FRV_INSN_JMPL, FRV_INSN_CALLL, FRV_INSN_JMPIL, FRV_INSN_CALLIL
+ , FRV_INSN_CALL, FRV_INSN_RETT, FRV_INSN_REI, FRV_INSN_TRA
+ , FRV_INSN_TNO, FRV_INSN_TEQ, FRV_INSN_TNE, FRV_INSN_TLE
+ , FRV_INSN_TGT, FRV_INSN_TLT, FRV_INSN_TGE, FRV_INSN_TLS
+ , FRV_INSN_THI, FRV_INSN_TC, FRV_INSN_TNC, FRV_INSN_TN
+ , FRV_INSN_TP, FRV_INSN_TV, FRV_INSN_TNV, FRV_INSN_FTRA
+ , FRV_INSN_FTNO, FRV_INSN_FTNE, FRV_INSN_FTEQ, FRV_INSN_FTLG
+ , FRV_INSN_FTUE, FRV_INSN_FTUL, FRV_INSN_FTGE, FRV_INSN_FTLT
+ , FRV_INSN_FTUGE, FRV_INSN_FTUG, FRV_INSN_FTLE, FRV_INSN_FTGT
+ , FRV_INSN_FTULE, FRV_INSN_FTU, FRV_INSN_FTO, FRV_INSN_TIRA
+ , FRV_INSN_TINO, FRV_INSN_TIEQ, FRV_INSN_TINE, FRV_INSN_TILE
+ , FRV_INSN_TIGT, FRV_INSN_TILT, FRV_INSN_TIGE, FRV_INSN_TILS
+ , FRV_INSN_TIHI, FRV_INSN_TIC, FRV_INSN_TINC, FRV_INSN_TIN
+ , FRV_INSN_TIP, FRV_INSN_TIV, FRV_INSN_TINV, FRV_INSN_FTIRA
+ , FRV_INSN_FTINO, FRV_INSN_FTINE, FRV_INSN_FTIEQ, FRV_INSN_FTILG
+ , FRV_INSN_FTIUE, FRV_INSN_FTIUL, FRV_INSN_FTIGE, FRV_INSN_FTILT
+ , FRV_INSN_FTIUGE, FRV_INSN_FTIUG, FRV_INSN_FTILE, FRV_INSN_FTIGT
+ , FRV_INSN_FTIULE, FRV_INSN_FTIU, FRV_INSN_FTIO, FRV_INSN_BREAK
+ , FRV_INSN_MTRAP, FRV_INSN_ANDCR, FRV_INSN_ORCR, FRV_INSN_XORCR
+ , FRV_INSN_NANDCR, FRV_INSN_NORCR, FRV_INSN_ANDNCR, FRV_INSN_ORNCR
+ , FRV_INSN_NANDNCR, FRV_INSN_NORNCR, FRV_INSN_NOTCR, FRV_INSN_CKRA
+ , FRV_INSN_CKNO, FRV_INSN_CKEQ, FRV_INSN_CKNE, FRV_INSN_CKLE
+ , FRV_INSN_CKGT, FRV_INSN_CKLT, FRV_INSN_CKGE, FRV_INSN_CKLS
+ , FRV_INSN_CKHI, FRV_INSN_CKC, FRV_INSN_CKNC, FRV_INSN_CKN
+ , FRV_INSN_CKP, FRV_INSN_CKV, FRV_INSN_CKNV, FRV_INSN_FCKRA
+ , FRV_INSN_FCKNO, FRV_INSN_FCKNE, FRV_INSN_FCKEQ, FRV_INSN_FCKLG
+ , FRV_INSN_FCKUE, FRV_INSN_FCKUL, FRV_INSN_FCKGE, FRV_INSN_FCKLT
+ , FRV_INSN_FCKUGE, FRV_INSN_FCKUG, FRV_INSN_FCKLE, FRV_INSN_FCKGT
+ , FRV_INSN_FCKULE, FRV_INSN_FCKU, FRV_INSN_FCKO, FRV_INSN_CCKRA
+ , FRV_INSN_CCKNO, FRV_INSN_CCKEQ, FRV_INSN_CCKNE, FRV_INSN_CCKLE
+ , FRV_INSN_CCKGT, FRV_INSN_CCKLT, FRV_INSN_CCKGE, FRV_INSN_CCKLS
+ , FRV_INSN_CCKHI, FRV_INSN_CCKC, FRV_INSN_CCKNC, FRV_INSN_CCKN
+ , FRV_INSN_CCKP, FRV_INSN_CCKV, FRV_INSN_CCKNV, FRV_INSN_CFCKRA
+ , FRV_INSN_CFCKNO, FRV_INSN_CFCKNE, FRV_INSN_CFCKEQ, FRV_INSN_CFCKLG
+ , FRV_INSN_CFCKUE, FRV_INSN_CFCKUL, FRV_INSN_CFCKGE, FRV_INSN_CFCKLT
+ , FRV_INSN_CFCKUGE, FRV_INSN_CFCKUG, FRV_INSN_CFCKLE, FRV_INSN_CFCKGT
+ , FRV_INSN_CFCKULE, FRV_INSN_CFCKU, FRV_INSN_CFCKO, FRV_INSN_CJMPL
+ , FRV_INSN_CCALLL, FRV_INSN_ICI, FRV_INSN_DCI, FRV_INSN_ICEI
+ , FRV_INSN_DCEI, FRV_INSN_DCF, FRV_INSN_DCEF, FRV_INSN_WITLB
+ , FRV_INSN_WDTLB, FRV_INSN_ITLBI, FRV_INSN_DTLBI, FRV_INSN_ICPL
+ , FRV_INSN_DCPL, FRV_INSN_ICUL, FRV_INSN_DCUL, FRV_INSN_BAR
+ , FRV_INSN_MEMBAR, FRV_INSN_COP1, FRV_INSN_COP2, FRV_INSN_CLRGR
+ , FRV_INSN_CLRFR, FRV_INSN_CLRGA, FRV_INSN_CLRFA, FRV_INSN_COMMITGR
+ , FRV_INSN_COMMITFR, FRV_INSN_COMMITGA, FRV_INSN_COMMITFA, FRV_INSN_FITOS
+ , FRV_INSN_FSTOI, FRV_INSN_FITOD, FRV_INSN_FDTOI, FRV_INSN_FDITOS
+ , FRV_INSN_FDSTOI, FRV_INSN_NFDITOS, FRV_INSN_NFDSTOI, FRV_INSN_CFITOS
+ , FRV_INSN_CFSTOI, FRV_INSN_NFITOS, FRV_INSN_NFSTOI, FRV_INSN_FMOVS
+ , FRV_INSN_FMOVD, FRV_INSN_FDMOVS, FRV_INSN_CFMOVS, FRV_INSN_FNEGS
+ , FRV_INSN_FNEGD, FRV_INSN_FDNEGS, FRV_INSN_CFNEGS, FRV_INSN_FABSS
+ , FRV_INSN_FABSD, FRV_INSN_FDABSS, FRV_INSN_CFABSS, FRV_INSN_FSQRTS
+ , FRV_INSN_FDSQRTS, FRV_INSN_NFDSQRTS, FRV_INSN_FSQRTD, FRV_INSN_CFSQRTS
+ , FRV_INSN_NFSQRTS, FRV_INSN_FADDS, FRV_INSN_FSUBS, FRV_INSN_FMULS
+ , FRV_INSN_FDIVS, FRV_INSN_FADDD, FRV_INSN_FSUBD, FRV_INSN_FMULD
+ , FRV_INSN_FDIVD, FRV_INSN_CFADDS, FRV_INSN_CFSUBS, FRV_INSN_CFMULS
+ , FRV_INSN_CFDIVS, FRV_INSN_NFADDS, FRV_INSN_NFSUBS, FRV_INSN_NFMULS
+ , FRV_INSN_NFDIVS, FRV_INSN_FCMPS, FRV_INSN_FCMPD, FRV_INSN_CFCMPS
+ , FRV_INSN_FDCMPS, FRV_INSN_FMADDS, FRV_INSN_FMSUBS, FRV_INSN_FMADDD
+ , FRV_INSN_FMSUBD, FRV_INSN_FDMADDS, FRV_INSN_NFDMADDS, FRV_INSN_CFMADDS
+ , FRV_INSN_CFMSUBS, FRV_INSN_NFMADDS, FRV_INSN_NFMSUBS, FRV_INSN_FMAS
+ , FRV_INSN_FMSS, FRV_INSN_FDMAS, FRV_INSN_FDMSS, FRV_INSN_NFDMAS
+ , FRV_INSN_NFDMSS, FRV_INSN_CFMAS, FRV_INSN_CFMSS, FRV_INSN_FMAD
+ , FRV_INSN_FMSD, FRV_INSN_NFMAS, FRV_INSN_NFMSS, FRV_INSN_FDADDS
+ , FRV_INSN_FDSUBS, FRV_INSN_FDMULS, FRV_INSN_FDDIVS, FRV_INSN_FDSADS
+ , FRV_INSN_FDMULCS, FRV_INSN_NFDMULCS, FRV_INSN_NFDADDS, FRV_INSN_NFDSUBS
+ , FRV_INSN_NFDMULS, FRV_INSN_NFDDIVS, FRV_INSN_NFDSADS, FRV_INSN_NFDCMPS
+ , FRV_INSN_MHSETLOS, FRV_INSN_MHSETHIS, FRV_INSN_MHDSETS, FRV_INSN_MHSETLOH
+ , FRV_INSN_MHSETHIH, FRV_INSN_MHDSETH, FRV_INSN_MAND, FRV_INSN_MOR
+ , FRV_INSN_MXOR, FRV_INSN_CMAND, FRV_INSN_CMOR, FRV_INSN_CMXOR
+ , FRV_INSN_MNOT, FRV_INSN_CMNOT, FRV_INSN_MROTLI, FRV_INSN_MROTRI
+ , FRV_INSN_MWCUT, FRV_INSN_MWCUTI, FRV_INSN_MCUT, FRV_INSN_MCUTI
+ , FRV_INSN_MCUTSS, FRV_INSN_MCUTSSI, FRV_INSN_MDCUTSSI, FRV_INSN_MAVEH
+ , FRV_INSN_MSLLHI, FRV_INSN_MSRLHI, FRV_INSN_MSRAHI, FRV_INSN_MDROTLI
+ , FRV_INSN_MCPLHI, FRV_INSN_MCPLI, FRV_INSN_MSATHS, FRV_INSN_MQSATHS
+ , FRV_INSN_MSATHU, FRV_INSN_MCMPSH, FRV_INSN_MCMPUH, FRV_INSN_MABSHS
+ , FRV_INSN_MADDHSS, FRV_INSN_MADDHUS, FRV_INSN_MSUBHSS, FRV_INSN_MSUBHUS
+ , FRV_INSN_CMADDHSS, FRV_INSN_CMADDHUS, FRV_INSN_CMSUBHSS, FRV_INSN_CMSUBHUS
+ , FRV_INSN_MQADDHSS, FRV_INSN_MQADDHUS, FRV_INSN_MQSUBHSS, FRV_INSN_MQSUBHUS
+ , FRV_INSN_CMQADDHSS, FRV_INSN_CMQADDHUS, FRV_INSN_CMQSUBHSS, FRV_INSN_CMQSUBHUS
+ , FRV_INSN_MADDACCS, FRV_INSN_MSUBACCS, FRV_INSN_MDADDACCS, FRV_INSN_MDSUBACCS
+ , FRV_INSN_MASACCS, FRV_INSN_MDASACCS, FRV_INSN_MMULHS, FRV_INSN_MMULHU
+ , FRV_INSN_MMULXHS, FRV_INSN_MMULXHU, FRV_INSN_CMMULHS, FRV_INSN_CMMULHU
+ , FRV_INSN_MQMULHS, FRV_INSN_MQMULHU, FRV_INSN_MQMULXHS, FRV_INSN_MQMULXHU
+ , FRV_INSN_CMQMULHS, FRV_INSN_CMQMULHU, FRV_INSN_MMACHS, FRV_INSN_MMACHU
+ , FRV_INSN_MMRDHS, FRV_INSN_MMRDHU, FRV_INSN_CMMACHS, FRV_INSN_CMMACHU
+ , FRV_INSN_MQMACHS, FRV_INSN_MQMACHU, FRV_INSN_CMQMACHS, FRV_INSN_CMQMACHU
+ , FRV_INSN_MQXMACHS, FRV_INSN_MQXMACXHS, FRV_INSN_MQMACXHS, FRV_INSN_MCPXRS
+ , FRV_INSN_MCPXRU, FRV_INSN_MCPXIS, FRV_INSN_MCPXIU, FRV_INSN_CMCPXRS
+ , FRV_INSN_CMCPXRU, FRV_INSN_CMCPXIS, FRV_INSN_CMCPXIU, FRV_INSN_MQCPXRS
+ , FRV_INSN_MQCPXRU, FRV_INSN_MQCPXIS, FRV_INSN_MQCPXIU, FRV_INSN_MEXPDHW
+ , FRV_INSN_CMEXPDHW, FRV_INSN_MEXPDHD, FRV_INSN_CMEXPDHD, FRV_INSN_MPACKH
+ , FRV_INSN_MDPACKH, FRV_INSN_MUNPACKH, FRV_INSN_MDUNPACKH, FRV_INSN_MBTOH
+ , FRV_INSN_CMBTOH, FRV_INSN_MHTOB, FRV_INSN_CMHTOB, FRV_INSN_MBTOHE
+ , FRV_INSN_CMBTOHE, FRV_INSN_MNOP, FRV_INSN_MCLRACC_0, FRV_INSN_MCLRACC_1
+ , FRV_INSN_MRDACC, FRV_INSN_MRDACCG, FRV_INSN_MWTACC, FRV_INSN_MWTACCG
+ , FRV_INSN_MCOP1, FRV_INSN_MCOP2, FRV_INSN_FNOP
} CGEN_INSN_TYPE;
/* Index of `invalid' insn place holder. */
diff --git a/opcodes/m68hc11-dis.c b/opcodes/m68hc11-dis.c
index cf42b64..e2373cf 100644
--- a/opcodes/m68hc11-dis.c
+++ b/opcodes/m68hc11-dis.c
@@ -1,5 +1,5 @@
/* m68hc11-dis.c -- Motorola 68HC11 & 68HC12 disassembly
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Written by Stephane Carrez (stcarrez@nerim.fr)
This program is free software; you can redistribute it and/or modify
@@ -39,19 +39,14 @@ static const char *const reg_dst_table[] = {
#define OP_PAGE_MASK (M6811_OP_PAGE2|M6811_OP_PAGE3|M6811_OP_PAGE4)
/* Prototypes for local functions. */
-static int read_memory
- PARAMS ((bfd_vma, bfd_byte *, int, struct disassemble_info *));
-static int print_indexed_operand
- PARAMS ((bfd_vma, struct disassemble_info *, int*, int, int, bfd_vma));
-static int print_insn
- PARAMS ((bfd_vma, struct disassemble_info *, int));
+static int read_memory (bfd_vma, bfd_byte *, int, struct disassemble_info *);
+static int print_indexed_operand (bfd_vma, struct disassemble_info *,
+ int*, int, int, bfd_vma);
+static int print_insn (bfd_vma, struct disassemble_info *, int);
static int
-read_memory (memaddr, buffer, size, info)
- bfd_vma memaddr;
- bfd_byte *buffer;
- int size;
- struct disassemble_info *info;
+read_memory (bfd_vma memaddr, bfd_byte* buffer, int size,
+ struct disassemble_info* info)
{
int status;
@@ -70,13 +65,9 @@ read_memory (memaddr, buffer, size, info)
/* Read the 68HC12 indexed operand byte and print the corresponding mode.
Returns the number of bytes read or -1 if failure. */
static int
-print_indexed_operand (memaddr, info, indirect, mov_insn, pc_offset, endaddr)
- bfd_vma memaddr;
- struct disassemble_info *info;
- int *indirect;
- int mov_insn;
- int pc_offset;
- bfd_vma endaddr;
+print_indexed_operand (bfd_vma memaddr, struct disassemble_info* info,
+ int* indirect, int mov_insn, int pc_offset,
+ bfd_vma endaddr)
{
bfd_byte buffer[4];
int reg;
@@ -231,10 +222,7 @@ print_indexed_operand (memaddr, info, indirect, mov_insn, pc_offset, endaddr)
/* Disassemble one instruction at address 'memaddr'. Returns the number
of bytes used by that instruction. */
static int
-print_insn (memaddr, info, arch)
- bfd_vma memaddr;
- struct disassemble_info *info;
- int arch;
+print_insn (bfd_vma memaddr, struct disassemble_info* info, int arch)
{
int status;
bfd_byte buffer[4];
@@ -324,7 +312,7 @@ print_insn (memaddr, info, arch)
{
int offset;
int pc_src_offset;
- int pc_dst_offset;
+ int pc_dst_offset = 0;
if ((opcode->arch & arch) == 0)
continue;
@@ -717,7 +705,7 @@ print_insn (memaddr, info, arch)
/* Opcode not recognized. */
if (format == M6811_OP_PAGE2 && arch & cpu6812
- && ((code >= 0x30 && code <= 0x39) || (code >= 0x40 && code <= 0xff)))
+ && ((code >= 0x30 && code <= 0x39) || (code >= 0x40)))
(*info->fprintf_func) (info->stream, "trap\t#%d", code & 0x0ff);
else if (format == M6811_OP_PAGE2)
@@ -738,17 +726,13 @@ print_insn (memaddr, info, arch)
/* Disassemble one instruction at address 'memaddr'. Returns the number
of bytes used by that instruction. */
int
-print_insn_m68hc11 (memaddr, info)
- bfd_vma memaddr;
- struct disassemble_info *info;
+print_insn_m68hc11 (bfd_vma memaddr, struct disassemble_info* info)
{
return print_insn (memaddr, info, cpu6811);
}
int
-print_insn_m68hc12 (memaddr, info)
- bfd_vma memaddr;
- struct disassemble_info *info;
+print_insn_m68hc12 (bfd_vma memaddr, struct disassemble_info* info)
{
return print_insn (memaddr, info, cpu6812);
}
diff --git a/opcodes/m68k-dis.c b/opcodes/m68k-dis.c
index 12c0b94..bfd8c89 100644
--- a/opcodes/m68k-dis.c
+++ b/opcodes/m68k-dis.c
@@ -1,21 +1,21 @@
/* Print Motorola 68k instructions.
Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002
+ 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
-This file is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This file is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT 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 "sysdep.h"
#include "dis-asm.h"
@@ -263,6 +263,9 @@ print_insn_m68k (memaddr, info)
case bfd_mach_mcf5200:
arch_mask = mcf5200;
break;
+ case bfd_mach_mcf528x:
+ arch_mask = mcf528x;
+ break;
case bfd_mach_mcf5206e:
arch_mask = mcf5206e;
break;
@@ -342,7 +345,7 @@ print_insn_m68k (memaddr, info)
/* 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
@@ -406,10 +409,10 @@ print_insn_m68k (memaddr, info)
}
FETCH_DATA (info, p);
-
+
d = best->args;
- /* We can the operands twice. The first time we don't print anything,
+ /* We scan the operands twice. The first time we don't print anything,
but look for errors. */
save_p = p;
@@ -537,12 +540,16 @@ print_insn_arg (d, buffer, p0, addr, info)
case 'J':
{
+ /* FIXME: There's a problem here, different m68k processors call the
+ same address different names. This table can't get it right
+ because it doesn't know which processor it's disassembling for. */
static const struct { char *name; int value; } names[]
= {{"%sfc", 0x000}, {"%dfc", 0x001}, {"%cacr", 0x002},
{"%tc", 0x003}, {"%itt0",0x004}, {"%itt1", 0x005},
{"%dtt0",0x006}, {"%dtt1",0x007}, {"%buscr",0x008},
{"%usp", 0x800}, {"%vbr", 0x801}, {"%caar", 0x802},
{"%msp", 0x803}, {"%isp", 0x804},
+ {"%flashbar", 0xc04}, {"%rambar", 0xc05}, /* mcf528x added these. */
/* Should we be calling this psr like we do in case 'Y'? */
{"%mmusr",0x805},
@@ -569,6 +576,14 @@ print_insn_arg (d, buffer, p0, addr, info)
(*info->fprintf_func) (info->stream, "#%d", val);
break;
+ case 'x':
+ val = fetch_arg (buffer, place, 3, info);
+ /* 0 means -1. */
+ if (val == 0)
+ val = -1;
+ (*info->fprintf_func) (info->stream, "#%d", val);
+ break;
+
case 'M':
if (place == 'h')
{
@@ -724,7 +739,7 @@ print_insn_arg (d, buffer, p0, addr, info)
case 'I':
/* Get coprocessor ID... */
val = fetch_arg (buffer, 'd', 3, info);
-
+
if (val != 1) /* Unusual coprocessor ID? */
(*info->fprintf_func) (info->stream, "(cpid=%d) ", val);
break;
@@ -748,7 +763,10 @@ print_insn_arg (d, buffer, p0, addr, info)
case 'p':
case 'q':
case 'v':
-
+ case 'b':
+ case 'w':
+ case 'y':
+ case 'z':
if (place == 'd')
{
val = fetch_arg (buffer, 'x', 6, info);
@@ -1023,7 +1041,7 @@ print_insn_arg (d, buffer, p0, addr, info)
{
short is_upper = 0;
int reg = fetch_arg (buffer, place, 5, info);
-
+
if (reg & 0x10)
{
is_upper = 1;
@@ -1034,7 +1052,7 @@ print_insn_arg (d, buffer, p0, addr, info)
is_upper ? "u" : "l");
}
break;
-
+
default:
return -2;
}
@@ -1121,7 +1139,7 @@ fetch_arg (buffer, code, bits, info)
val = (buffer[2] << 8) + buffer[3];
val >>= 7;
break;
-
+
case '8':
FETCH_DATA (info, buffer + 3);
val = (buffer[2] << 8) + buffer[3];
@@ -1138,13 +1156,13 @@ fetch_arg (buffer, code, bits, info)
val = (buffer[1] >> 6);
break;
- case 'm':
+ case 'm':
val = (buffer[1] & 0x40 ? 0x8 : 0)
| ((buffer[0] >> 1) & 0x7)
| (buffer[3] & 0x80 ? 0x10 : 0);
break;
- case 'n':
+ case 'n':
val = (buffer[1] & 0x40 ? 0x8 : 0) | ((buffer[0] >> 1) & 0x7);
break;
diff --git a/opcodes/m68k-opc.c b/opcodes/m68k-opc.c
index 79d7db0..8fa6c0e 100644
--- a/opcodes/m68k-opc.c
+++ b/opcodes/m68k-opc.c
@@ -1,24 +1,24 @@
/* Opcode table for m680[012346]0/m6888[12]/m68851/mcf5200.
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001
+ 2000, 2001, 2003
Free Software Foundation, Inc.
-This file is part of GDB, GAS, and the GNU binutils.
+ This file is part of GDB, GAS, and the GNU binutils.
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them 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, GAS, and the GNU binutils are free software; you can redistribute
+ them and/or modify them 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, GAS, and the 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.
+ GDB, GAS, and the 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 file; see the file COPYING. If not, write to the Free
-Software Foundation, 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 file; see the file COPYING. If not, write to the Free
+ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
#include "sysdep.h"
#include "opcode/m68k.h"
@@ -131,20 +131,20 @@ const struct m68k_opcode m68k_opcodes[] =
{"bgtw", one(0067000), one(0177777), "BW", m68000up | mcf },
{"blew", one(0067400), one(0177777), "BW", m68000up | mcf },
-{"bhil", one(0061377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"blsl", one(0061777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"bccl", one(0062377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"bcsl", one(0062777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"bnel", one(0063377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"beql", one(0063777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"bvcl", one(0064377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"bvsl", one(0064777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"bpll", one(0065377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"bmil", one(0065777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"bgel", one(0066377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"bltl", one(0066777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"bgtl", one(0067377), one(0177777), "BL", m68020up | cpu32 | mcf5407},
-{"blel", one(0067777), one(0177777), "BL", m68020up | cpu32 | mcf5407},
+{"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 },
@@ -180,8 +180,7 @@ const struct m68k_opcode m68k_opcodes[] =
{"bchg", one(0004100), one(0177700), "#b$s", m68000up },
{"bchg", one(0004100), one(0177700), "#bqs", mcf },
-{"bclr", one(0000600), one(0170700), "Dd$s", m68000up },
-{"bclr", one(0000600), one(0170700), "Ddvs", 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 },
@@ -194,28 +193,32 @@ const struct m68k_opcode m68k_opcodes[] =
{"bfset", two(0167300, 0), two(0177700, 0170000), "?sO2O3", m68020up },
{"bftst", two(0164300, 0), two(0177700, 0170000), "/sO2O3", m68020up },
-{"bgnd", one(0045372), one(0177777), "", cpu32 },
+{"bgnd", one(0045372), one(0177777), "", cpu32 },
-{"bkpt", one(0044110), one(0177770), "ts", m68010up },
+{"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 | mcf5407},
+{"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 },
+{"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 | mcf5407},
+{"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 },
-{"callm", one(0003300), one(0177700), "#b!s", m68020 },
+{"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 },
@@ -261,9 +264,9 @@ const struct m68k_opcode m68k_opcodes[] =
{"cmpal", one(0130700), one(0170700), "*lAd", m68000up | mcf },
{"cmpib", one(0006000), one(0177700), "#b@s", m68000up },
-{"cmpib", one(0006000), one(0177700), "#bDs", mcf5407 },
+{"cmpib", one(0006000), one(0177700), "#bDs", mcfv4up },
{"cmpiw", one(0006100), one(0177700), "#w@s", m68000up },
-{"cmpiw", one(0006100), one(0177700), "#wDs", mcf5407 },
+{"cmpiw", one(0006100), one(0177700), "#wDs", mcfv4up },
{"cmpil", one(0006200), one(0177700), "#l@s", m68000up },
{"cmpil", one(0006200), one(0177700), "#lDs", mcf },
@@ -273,15 +276,15 @@ const struct m68k_opcode m68k_opcodes[] =
/* 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", mcf5407 },
+{"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", mcf5407 },
+{"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", mcf5407 },
+{"cmpw", one(0006100), one(0177700), "#wDs", mcfv4up },
{"cmpw", one(0130510), one(0170770), "+s+d", m68000up },
-{"cmpw", one(0130100), one(0170700), "*wDd", m68000up | mcf5407 },
+{"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 },
@@ -305,20 +308,20 @@ const struct m68k_opcode m68k_opcodes[] =
{"dbvc", one(0054310), one(0177770), "DsBw", m68000up },
{"dbvs", one(0054710), one(0177770), "DsBw", m68000up },
-{"divsw", one(0100700), one(0170700), ";wDd", m68000up | mcf5307up | mcf5206e },
+{"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", mcf5307up | mcf5206e },
+{"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 | mcf5307up | mcf5206e },
+{"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", mcf5307up | mcf5206e },
+{"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 },
@@ -357,33 +360,56 @@ const struct m68k_opcode m68k_opcodes[] =
{"extl", one(0044300), one(0177770), "Ds", m68000up|mcf },
{"extbl", one(0044700), one(0177770), "Ds", m68020up|cpu32|mcf },
+{"ff1", one(0002300), one(0177770), "Ds", mcf528x},
+
/* 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},
@@ -400,28 +426,47 @@ const struct m68k_opcode m68k_opcodes[] =
{"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 },
@@ -456,111 +501,117 @@ const struct m68k_opcode m68k_opcodes[] =
{"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 },
-{"fbf", one(0xF080), one(0xF1FF), "IdBW", mfloat },
-{"fbge", one(0xF093), one(0xF1FF), "IdBW", mfloat },
-{"fbgl", one(0xF096), one(0xF1FF), "IdBW", mfloat },
-{"fbgle", one(0xF097), one(0xF1FF), "IdBW", mfloat },
-{"fbgt", one(0xF092), one(0xF1FF), "IdBW", mfloat },
-{"fble", one(0xF095), one(0xF1FF), "IdBW", mfloat },
-{"fblt", one(0xF094), one(0xF1FF), "IdBW", mfloat },
-{"fbne", one(0xF08E), one(0xF1FF), "IdBW", mfloat },
-{"fbnge", one(0xF09C), one(0xF1FF), "IdBW", mfloat },
-{"fbngl", one(0xF099), one(0xF1FF), "IdBW", mfloat },
-{"fbngle", one(0xF098), one(0xF1FF), "IdBW", mfloat },
-{"fbngt", one(0xF09D), one(0xF1FF), "IdBW", mfloat },
-{"fbnle", one(0xF09A), one(0xF1FF), "IdBW", mfloat },
-{"fbnlt", one(0xF09B), one(0xF1FF), "IdBW", mfloat },
-{"fboge", one(0xF083), one(0xF1FF), "IdBW", mfloat },
-{"fbogl", one(0xF086), one(0xF1FF), "IdBW", mfloat },
-{"fbogt", one(0xF082), one(0xF1FF), "IdBW", mfloat },
-{"fbole", one(0xF085), one(0xF1FF), "IdBW", mfloat },
-{"fbolt", one(0xF084), one(0xF1FF), "IdBW", mfloat },
-{"fbor", one(0xF087), one(0xF1FF), "IdBW", mfloat },
-{"fbseq", one(0xF091), one(0xF1FF), "IdBW", mfloat },
-{"fbsf", one(0xF090), one(0xF1FF), "IdBW", mfloat },
-{"fbsne", one(0xF09E), one(0xF1FF), "IdBW", mfloat },
-{"fbst", one(0xF09F), one(0xF1FF), "IdBW", mfloat },
-{"fbt", one(0xF08F), one(0xF1FF), "IdBW", mfloat },
-{"fbueq", one(0xF089), one(0xF1FF), "IdBW", mfloat },
-{"fbuge", one(0xF08B), one(0xF1FF), "IdBW", mfloat },
-{"fbugt", one(0xF08A), one(0xF1FF), "IdBW", mfloat },
-{"fbule", one(0xF08D), one(0xF1FF), "IdBW", mfloat },
-{"fbult", one(0xF08C), one(0xF1FF), "IdBW", mfloat },
-{"fbun", one(0xF088), one(0xF1FF), "IdBW", mfloat },
-
-{"fbeql", one(0xF0C1), one(0xF1FF), "IdBC", mfloat },
-{"fbfl", one(0xF0C0), one(0xF1FF), "IdBC", mfloat },
-{"fbgel", one(0xF0D3), one(0xF1FF), "IdBC", mfloat },
-{"fbgll", one(0xF0D6), one(0xF1FF), "IdBC", mfloat },
-{"fbglel", one(0xF0D7), one(0xF1FF), "IdBC", mfloat },
-{"fbgtl", one(0xF0D2), one(0xF1FF), "IdBC", mfloat },
-{"fblel", one(0xF0D5), one(0xF1FF), "IdBC", mfloat },
-{"fbltl", one(0xF0D4), one(0xF1FF), "IdBC", mfloat },
-{"fbnel", one(0xF0CE), one(0xF1FF), "IdBC", mfloat },
-{"fbngel", one(0xF0DC), one(0xF1FF), "IdBC", mfloat },
-{"fbngll", one(0xF0D9), one(0xF1FF), "IdBC", mfloat },
-{"fbnglel", one(0xF0D8), one(0xF1FF), "IdBC", mfloat },
-{"fbngtl", one(0xF0DD), one(0xF1FF), "IdBC", mfloat },
-{"fbnlel", one(0xF0DA), one(0xF1FF), "IdBC", mfloat },
-{"fbnltl", one(0xF0DB), one(0xF1FF), "IdBC", mfloat },
-{"fbogel", one(0xF0C3), one(0xF1FF), "IdBC", mfloat },
-{"fbogll", one(0xF0C6), one(0xF1FF), "IdBC", mfloat },
-{"fbogtl", one(0xF0C2), one(0xF1FF), "IdBC", mfloat },
-{"fbolel", one(0xF0C5), one(0xF1FF), "IdBC", mfloat },
-{"fboltl", one(0xF0C4), one(0xF1FF), "IdBC", mfloat },
-{"fborl", one(0xF0C7), one(0xF1FF), "IdBC", mfloat },
-{"fbseql", one(0xF0D1), one(0xF1FF), "IdBC", mfloat },
-{"fbsfl", one(0xF0D0), one(0xF1FF), "IdBC", mfloat },
-{"fbsnel", one(0xF0DE), one(0xF1FF), "IdBC", mfloat },
-{"fbstl", one(0xF0DF), one(0xF1FF), "IdBC", mfloat },
-{"fbtl", one(0xF0CF), one(0xF1FF), "IdBC", mfloat },
-{"fbueql", one(0xF0C9), one(0xF1FF), "IdBC", mfloat },
-{"fbugel", one(0xF0CB), one(0xF1FF), "IdBC", mfloat },
-{"fbugtl", one(0xF0CA), one(0xF1FF), "IdBC", mfloat },
-{"fbulel", one(0xF0CD), one(0xF1FF), "IdBC", mfloat },
-{"fbultl", one(0xF0CC), one(0xF1FF), "IdBC", mfloat },
-{"fbunl", one(0xF0C8), one(0xF1FF), "IdBC", mfloat },
-
-{"fjeq", one(0xF081), one(0xF1BF), "IdBc", mfloat },
-{"fjf", one(0xF080), one(0xF1BF), "IdBc", mfloat },
-{"fjge", one(0xF093), one(0xF1BF), "IdBc", mfloat },
-{"fjgl", one(0xF096), one(0xF1BF), "IdBc", mfloat },
-{"fjgle", one(0xF097), one(0xF1BF), "IdBc", mfloat },
-{"fjgt", one(0xF092), one(0xF1BF), "IdBc", mfloat },
-{"fjle", one(0xF095), one(0xF1BF), "IdBc", mfloat },
-{"fjlt", one(0xF094), one(0xF1BF), "IdBc", mfloat },
-{"fjne", one(0xF08E), one(0xF1BF), "IdBc", mfloat },
-{"fjnge", one(0xF09C), one(0xF1BF), "IdBc", mfloat },
-{"fjngl", one(0xF099), one(0xF1BF), "IdBc", mfloat },
-{"fjngle", one(0xF098), one(0xF1BF), "IdBc", mfloat },
-{"fjngt", one(0xF09D), one(0xF1BF), "IdBc", mfloat },
-{"fjnle", one(0xF09A), one(0xF1BF), "IdBc", mfloat },
-{"fjnlt", one(0xF09B), one(0xF1BF), "IdBc", mfloat },
-{"fjoge", one(0xF083), one(0xF1BF), "IdBc", mfloat },
-{"fjogl", one(0xF086), one(0xF1BF), "IdBc", mfloat },
-{"fjogt", one(0xF082), one(0xF1BF), "IdBc", mfloat },
-{"fjole", one(0xF085), one(0xF1BF), "IdBc", mfloat },
-{"fjolt", one(0xF084), one(0xF1BF), "IdBc", mfloat },
-{"fjor", one(0xF087), one(0xF1BF), "IdBc", mfloat },
-{"fjseq", one(0xF091), one(0xF1BF), "IdBc", mfloat },
-{"fjsf", one(0xF090), one(0xF1BF), "IdBc", mfloat },
-{"fjsne", one(0xF09E), one(0xF1BF), "IdBc", mfloat },
-{"fjst", one(0xF09F), one(0xF1BF), "IdBc", mfloat },
-{"fjt", one(0xF08F), one(0xF1BF), "IdBc", mfloat },
-{"fjueq", one(0xF089), one(0xF1BF), "IdBc", mfloat },
-{"fjuge", one(0xF08B), one(0xF1BF), "IdBc", mfloat },
-{"fjugt", one(0xF08A), one(0xF1BF), "IdBc", mfloat },
-{"fjule", one(0xF08D), one(0xF1BF), "IdBc", mfloat },
-{"fjult", one(0xF08C), one(0xF1BF), "IdBc", mfloat },
-{"fjun", one(0xF088), one(0xF1BF), "IdBc", 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 },
@@ -618,29 +669,47 @@ const struct m68k_opcode m68k_opcodes[] =
{"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 },
@@ -685,21 +754,35 @@ const struct m68k_opcode m68k_opcodes[] =
{"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 },
@@ -753,47 +836,88 @@ const struct m68k_opcode m68k_opcodes[] =
{"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 },
/* 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 },
@@ -814,6 +938,11 @@ const struct m68k_opcode m68k_opcodes[] =
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 },
@@ -832,63 +961,102 @@ const struct m68k_opcode m68k_opcodes[] =
{"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 },
+{"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 },
@@ -900,8 +1068,10 @@ const struct m68k_opcode m68k_opcodes[] =
{"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 },
@@ -998,60 +1168,98 @@ const struct m68k_opcode m68k_opcodes[] =
{"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 },
@@ -1119,7 +1327,7 @@ const struct m68k_opcode m68k_opcodes[] =
{"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 },
@@ -1187,11 +1395,17 @@ const struct m68k_opcode m68k_opcodes[] =
{"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 },
@@ -1207,7 +1421,8 @@ const struct m68k_opcode m68k_opcodes[] =
{"halt", one(0045310), one(0177777), "", m68060 | mcf },
-{"illegal", one(0045374), one(0177777), "", m68000up },
+{"illegal", one(0045374), one(0177777), "", m68000up | mcf },
+{"intouch", one(0xf428), one(0xfff8), "As", mcfv4eup },
{"jmp", one(0047300), one(0177700), "!s", m68000up | mcf },
@@ -1245,57 +1460,57 @@ const struct m68k_opcode m68k_opcodes[] =
{"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", mcf5307up | mcf5206e },
-{"macw", two(0120000, 0001000), two(0170660, 0005400), "uMumMh",mcf5307up | mcf5206e },
-{"macw", two(0120220, 0000000), two(0170670, 0005460), "uNuoasRn", mcf5307up | mcf5206e },
-{"macw", two(0120230, 0000000), two(0170670, 0005460), "uNuo+sRn", mcf5307up | mcf5206e },
-{"macw", two(0120240, 0000000), two(0170670, 0005460), "uNuo-sRn", mcf5307up | mcf5206e },
-{"macw", two(0120250, 0000000), two(0170670, 0005460), "uNuodsRn", mcf5307up | mcf5206e },
-{"macw", two(0120220, 0001000), two(0170670, 0005460), "uNuoMhasRn", mcf5307up | mcf5206e },
-{"macw", two(0120230, 0001000), two(0170670, 0005460), "uNuoMh+sRn", mcf5307up | mcf5206e },
-{"macw", two(0120240, 0001000), two(0170670, 0005460), "uNuoMh-sRn", mcf5307up | mcf5206e },
-{"macw", two(0120250, 0001000), two(0170670, 0005460), "uNuoMhdsRn", mcf5307up | mcf5206e },
-{"macmw", two(0120220, 0000040), two(0170670, 0005460), "uNuoasRn", mcf5307up | mcf5206e },
-{"macmw", two(0120230, 0000040), two(0170670, 0005460), "uNuo+sRn", mcf5307up | mcf5206e },
-{"macmw", two(0120240, 0000040), two(0170670, 0005460), "uNuo-sRn", mcf5307up | mcf5206e },
-{"macmw", two(0120250, 0000040), two(0170670, 0005460), "uNuodsRn", mcf5307up | mcf5206e },
-{"macmw", two(0120220, 0001040), two(0170670, 0005460), "uNuoMhasRn", mcf5307up | mcf5206e },
-{"macmw", two(0120230, 0001040), two(0170670, 0005460), "uNuoMh+sRn", mcf5307up | mcf5206e },
-{"macmw", two(0120240, 0001040), two(0170670, 0005460), "uNuoMh-sRn", mcf5307up | mcf5206e },
-{"macmw", two(0120250, 0001040), two(0170670, 0005460), "uNuoMhdsRn", mcf5307up | mcf5206e },
-
-{"macl", two(0120000, 0004000), two(0170660, 0005400), "RsRm", mcf5307up | mcf5206e },
-{"macl", two(0120000, 0005000), two(0170660, 0005400), "RsRmMh", mcf5307up | mcf5206e },
-{"macl", two(0120220, 0004000), two(0170670, 0005460), "R3R1asRn", mcf5307up | mcf5206e },
-{"macl", two(0120230, 0004000), two(0170670, 0005460), "R3R1+sRn", mcf5307up | mcf5206e },
-{"macl", two(0120240, 0004000), two(0170670, 0005460), "R3R1-sRn", mcf5307up | mcf5206e },
-{"macl", two(0120250, 0004000), two(0170670, 0005460), "R3R1dsRn", mcf5307up | mcf5206e },
-{"macl", two(0120220, 0005000), two(0170670, 0005460), "R3R1MhasRn", mcf5307up | mcf5206e },
-{"macl", two(0120230, 0005000), two(0170670, 0005460), "R3R1Mh+sRn", mcf5307up | mcf5206e },
-{"macl", two(0120240, 0005000), two(0170670, 0005460), "R3R1Mh-sRn", mcf5307up | mcf5206e },
-{"macl", two(0120250, 0005000), two(0170670, 0005460), "R3R1MhdsRn", mcf5307up | mcf5206e },
-{"macml", two(0120220, 0004040), two(0170670, 0005460), "R3R1asRn", mcf5307up | mcf5206e },
-{"macml", two(0120230, 0004040), two(0170670, 0005460), "R3R1+sRn", mcf5307up | mcf5206e },
-{"macml", two(0120240, 0004040), two(0170670, 0005460), "R3R1-sRn", mcf5307up | mcf5206e },
-{"macml", two(0120250, 0004040), two(0170670, 0005460), "R3R1dsRn", mcf5307up | mcf5206e },
-{"macml", two(0120220, 0005040), two(0170670, 0005460), "R3R1MhasRn", mcf5307up | mcf5206e },
-{"macml", two(0120230, 0005040), two(0170670, 0005460), "R3R1Mh+sRn", mcf5307up | mcf5206e },
-{"macml", two(0120240, 0005040), two(0170670, 0005460), "R3R1Mh-sRn", mcf5307up | mcf5206e },
-{"macml", two(0120250, 0005040), two(0170670, 0005460), "R3R1MhdsRn", mcf5307up | mcf5206e },
-
-/* NOTE: The mcf5200 family programmer's reference manual does not
+{"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 },
+
+/* NOTE: The mcf5200 family programmer's reference manual does not
indicate the byte form of the movea instruction is invalid (as it
is on 68000 family cpus). However, experiments on the 5202 yeild
unexpected results. The value is copied, but it is not sign extended
- (as is done with movea.w) and the top three bytes in the address
+ (as is done with movea.w) and the top three bytes in the address
register are not disturbed. I don't know if this is the intended
behavior --- it could be a hole in instruction decoding (Motorola
decided not to trap all invalid instructions for performance reasons)
- --- but I suspect that it is not.
+ --- but I suspect that it is not.
- I reported this to Motorola ISD Technical Communications Support,
- which replied that other coldfire assemblers reject movea.b. For
- this reason I've decided to not allow moveab.
+ I reported this to Motorola ISD Technical Communications Support,
+ 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
*/
@@ -1347,13 +1562,13 @@ const struct m68k_opcode m68k_opcodes[] =
{"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", mcf5407 },
+{"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", mcf5407 },
+{"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 },
@@ -1370,25 +1585,25 @@ const struct m68k_opcode m68k_opcodes[] =
{"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", mcf5407 },
-{"movel", one(0047140), one(0177770), "AsUd", m68000up },
-{"movel", one(0047150), one(0177770), "UdAs", m68000up },
-{"movel", one(0120600), one(0177760), "EsRs", mcf5307up | mcf5206e },
-{"movel", one(0120400), one(0177760), "RsEs", mcf5307up | mcf5206e },
-{"movel", one(0120474), one(0177777), "#lEs", mcf5307up | mcf5206e },
-{"movel", one(0124600), one(0177760), "GsRs", mcf5307up | mcf5206e },
-{"movel", one(0124400), one(0177760), "RsGs", mcf5307up | mcf5206e },
-{"movel", one(0124474), one(0177777), "#lGs", mcf5307up | mcf5206e },
-{"movel", one(0126600), one(0177760), "HsRs", mcf5307up | mcf5206e },
-{"movel", one(0126400), one(0177760), "RsHs", mcf5307up | mcf5206e },
-{"movel", one(0126474), one(0177777), "#lHs", mcf5307up | mcf5206e },
-{"movel", one(0124700), one(0177777), "GsCs", mcf5307up | mcf5206e },
+{"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", mcf5407 },
+{"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 },
@@ -1403,11 +1618,11 @@ const struct m68k_opcode m68k_opcodes[] =
{"move", one(0047140), one(0177770), "AsUd", m68000up },
{"move", one(0047150), one(0177770), "UdAs", m68000up },
-{"mov3ql", one(0120500), one(0170700), "Qd%s", mcf5407 },
-{"mvsb", one(0070400), one(0170700), "*bDd", mcf5407 },
-{"mvsw", one(0070500), one(0170700), "*wDd", mcf5407 },
-{"mvzb", one(0070600), one(0170700), "*bDd", mcf5407 },
-{"mvzw", one(0070700), one(0170700), "*wDd", mcf5407 },
+{"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 },
@@ -1423,43 +1638,43 @@ const struct m68k_opcode m68k_opcodes[] =
{"move16", one(0xf618), one(0xfff8), "_Las", m68040up },
/* FIXME: add MAM mode (`&' after <ea> operand) / remove MSACM */
-{"msacw", two(0120000, 0000400), two(0170660, 0005400), "uMum", mcf5307up | mcf5206e },
-{"msacw", two(0120000, 0001400), two(0170660, 0005400), "uMumMh", mcf5307up | mcf5206e },
-{"msacw", two(0120220, 0000400), two(0170670, 0005460), "uNuoasRn", mcf5307up | mcf5206e },
-{"msacw", two(0120230, 0000400), two(0170670, 0005460), "uNuo+sRn", mcf5307up | mcf5206e },
-{"msacw", two(0120240, 0000400), two(0170670, 0005460), "uNuo-sRn", mcf5307up | mcf5206e },
-{"msacw", two(0120250, 0000400), two(0170670, 0005460), "uNuodsRn", mcf5307up | mcf5206e },
-{"msacw", two(0120220, 0001400), two(0170670, 0005460), "uNuoMhasRn", mcf5307up | mcf5206e },
-{"msacw", two(0120230, 0001400), two(0170670, 0005460), "uNuoMh+sRn", mcf5307up | mcf5206e },
-{"msacw", two(0120240, 0001400), two(0170670, 0005460), "uNuoMh-sRn", mcf5307up | mcf5206e },
-{"msacw", two(0120250, 0001400), two(0170670, 0005460), "uNuoMhdsRn", mcf5307up | mcf5206e },
-{"msacmw", two(0120220, 0000440), two(0170670, 0005460), "uNuoasRn", mcf5307up | mcf5206e },
-{"msacmw", two(0120230, 0000440), two(0170670, 0005460), "uNuo+sRn", mcf5307up | mcf5206e },
-{"msacmw", two(0120240, 0000440), two(0170670, 0005460), "uNuo-sRn", mcf5307up | mcf5206e },
-{"msacmw", two(0120250, 0000440), two(0170670, 0005460), "uNuodsRn", mcf5307up | mcf5206e },
-{"msacmw", two(0120220, 0001440), two(0170670, 0005460), "uNuoMhasRn", mcf5307up | mcf5206e },
-{"msacmw", two(0120230, 0001440), two(0170670, 0005460), "uNuoMh+sRn", mcf5307up | mcf5206e },
-{"msacmw", two(0120240, 0001440), two(0170670, 0005460), "uNuoMh-sRn", mcf5307up | mcf5206e },
-{"msacmw", two(0120250, 0001440), two(0170670, 0005460), "uNuoMhdsRn", mcf5307up | mcf5206e },
-
-{"msacl", two(0120000, 0004400), two(0170660, 0005400), "RsRm", mcf5307up | mcf5206e },
-{"msacl", two(0120000, 0005400), two(0170660, 0005400), "RsRmMh", mcf5307up | mcf5206e },
-{"msacl", two(0120220, 0004400), two(0170670, 0005460), "R3R1asRn", mcf5307up | mcf5206e },
-{"msacl", two(0120230, 0004400), two(0170670, 0005460), "R3R1+sRn", mcf5307up | mcf5206e },
-{"msacl", two(0120240, 0004400), two(0170670, 0005460), "R3R1-sRn", mcf5307up | mcf5206e },
-{"msacl", two(0120250, 0004400), two(0170670, 0005460), "R3R1dsRn", mcf5307up | mcf5206e },
-{"msacl", two(0120220, 0005400), two(0170670, 0005460), "R3R1MhasRn", mcf5307up | mcf5206e },
-{"msacl", two(0120230, 0005400), two(0170670, 0005460), "R3R1Mh+sRn", mcf5307up | mcf5206e },
-{"msacl", two(0120240, 0005400), two(0170670, 0005460), "R3R1Mh-sRn", mcf5307up | mcf5206e },
-{"msacl", two(0120250, 0005400), two(0170670, 0005460), "R3R1MhdsRn", mcf5307up | mcf5206e },
-{"msacml", two(0120220, 0004440), two(0170670, 0005460), "R3R1asRn", mcf5307up | mcf5206e },
-{"msacml", two(0120230, 0004440), two(0170670, 0005460), "R3R1+sRn", mcf5307up | mcf5206e },
-{"msacml", two(0120240, 0004440), two(0170670, 0005460), "R3R1-sRn", mcf5307up | mcf5206e },
-{"msacml", two(0120250, 0004440), two(0170670, 0005460), "R3R1dsRn", mcf5307up | mcf5206e },
-{"msacml", two(0120220, 0005440), two(0170670, 0005460), "R3R1MhasRn", mcf5307up | mcf5206e },
-{"msacml", two(0120230, 0005440), two(0170670, 0005460), "R3R1Mh+sRn", mcf5307up | mcf5206e },
-{"msacml", two(0120240, 0005440), two(0170670, 0005460), "R3R1Mh-sRn", mcf5307up | mcf5206e },
-{"msacml", two(0120250, 0005440), two(0170670, 0005460), "R3R1MhdsRn", mcf5307up | mcf5206e },
+{"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 },
@@ -1736,8 +1951,8 @@ const struct m68k_opcode m68k_opcodes[] =
{"pvalid", two(0xf000, 0x2c00), two(0xffc0, 0xfff8), "A3&s", m68851 },
/* FIXME: don't allow Dw==Dx. */
-{"remsl", two(0x4c40, 0x0800), two(0xffc0, 0x8ff8), "qsD3D1", mcf5307up | mcf5206e },
-{"remul", two(0x4c40, 0x0000), two(0xffc0, 0x8ff8), "qsD3D1", mcf5307up | mcf5206e },
+{"remsl", two(0x4c40, 0x0800), two(0xffc0, 0x8ff8), "qsD3D1", mcf5206eup },
+{"remul", two(0x4c40, 0x0000), two(0xffc0, 0x8ff8), "qsD3D1", mcf5206eup },
{"reset", one(0047160), one(0177777), "", m68000up },
@@ -1783,7 +1998,7 @@ const struct m68k_opcode m68k_opcodes[] =
{"rts", one(0047165), one(0177777), "", m68000up | mcf },
-{"satsl", one(0046200), one(0177770), "Ds", mcf5407 },
+{"satsl", one(0046200), one(0177770), "Ds", mcfv4up },
{"sbcd", one(0100400), one(0170770), "DsDd", m68000up },
{"sbcd", one(0100410), one(0170770), "-s-d", m68000up },
@@ -1823,6 +2038,8 @@ const struct m68k_opcode m68k_opcodes[] =
{"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 },
@@ -1870,7 +2087,7 @@ const struct m68k_opcode m68k_opcodes[] =
{"swbeg", one(0045374), one(0177777), "#w", m68000up | mcf },
{"swbegl", one(0045375), one(0177777), "#l", m68000up | mcf },
-{"tas", one(0045300), one(0177700), "$s", m68000up | mcf5407},
+{"tas", one(0045300), one(0177700), "$s", m68000up | mcfv4up},
#define TBL1(name,signed,round,size) \
{name, two(0174000, (signed<<11)|(!round<<10)|(size<<6)|0000400), \
@@ -2205,6 +2422,11 @@ const struct m68k_opcode_alias m68k_opcode_aliases[] =
{ "ftests", "ftsts", },
{ "ftestw", "ftstw", },
{ "ftestx", "ftstx", },
+
+ { "bitrevl", "bitrev", }, /* for mcf528x only */
+ { "byterevl", "byterev", },
+ { "ff1l", "ff1", },
+
};
const int m68k_numaliases =
diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
index af6c445..43fcb3c 100644
--- a/opcodes/mips-dis.c
+++ b/opcodes/mips-dis.c
@@ -384,6 +384,12 @@ const struct mips_arch_choice mips_arch_choices[] = {
mips_cp0sel_names_mips3264, ARRAY_SIZE (mips_cp0sel_names_mips3264),
mips_hwr_names_numeric },
+ { "mips64r2", 1, bfd_mach_mipsisa64r2, CPU_MIPS64R2,
+ ISA_MIPS64R2 | INSN_MIPS16 | INSN_MIPS3D | INSN_MDMX,
+ mips_cp0_names_mips3264r2,
+ mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2),
+ mips_hwr_names_mips3264r2 },
+
{ "sb1", 1, bfd_mach_mips_sb1, CPU_SB1,
ISA_MIPS64 | INSN_MIPS3D | INSN_SB1,
mips_cp0_names_sb1,
@@ -714,6 +720,7 @@ print_insn_args (d, l, pc, info)
break;
case 'C':
+ case 'H':
msbd = (l >> OP_SH_EXTMSBD) & OP_MASK_EXTMSBD;
(*info->fprintf_func) (info->stream, "0x%x", msbd + 1);
break;
@@ -740,6 +747,21 @@ print_insn_args (d, l, pc, info)
break;
}
+ case 'E':
+ lsb = ((l >> OP_SH_SHAMT) & OP_MASK_SHAMT) + 32;
+ (*info->fprintf_func) (info->stream, "0x%x", lsb);
+ break;
+
+ case 'F':
+ msb = ((l >> OP_SH_INSMSB) & OP_MASK_INSMSB) + 32;
+ (*info->fprintf_func) (info->stream, "0x%x", msb - lsb + 1);
+ break;
+
+ case 'G':
+ msbd = ((l >> OP_SH_EXTMSBD) & OP_MASK_EXTMSBD) + 32;
+ (*info->fprintf_func) (info->stream, "0x%x", msbd + 1);
+ break;
+
default:
/* xgettext:c-format */
(*info->fprintf_func) (info->stream,
diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
index 228357a..340a084 100644
--- a/opcodes/mips-opc.c
+++ b/opcodes/mips-opc.c
@@ -87,6 +87,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
#define I32 INSN_ISA32
#define I64 INSN_ISA64
#define I33 INSN_ISA32R2
+#define I65 INSN_ISA64R2
/* MIPS64 MIPS-3D ASE support. */
#define I16 INSN_MIPS16
@@ -481,6 +482,10 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"dctr", "o(b)", 0xbc050000, 0xfc1f0000, RD_b, I3 },
{"dctw", "o(b)", 0xbc090000, 0xfc1f0000, RD_b, I3 },
{"deret", "", 0x4200001f, 0xffffffff, 0, I32|G2 },
+{"dext", "t,r,I,+I", 0, (int) M_DEXT, INSN_MACRO, I65 },
+{"dext", "t,r,+A,+C", 0x7c000003, 0xfc00003f, WR_t|RD_s, I65 },
+{"dextm", "t,r,+A,+G", 0x7c000001, 0xfc00003f, WR_t|RD_s, I65 },
+{"dextu", "t,r,+E,+H", 0x7c000002, 0xfc00003f, WR_t|RD_s, I65 },
/* For ddiv, see the comments about div. */
{"ddiv", "z,s,t", 0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HILO, I3 },
{"ddiv", "d,v,t", 0, (int) M_DDIV_3, INSN_MACRO, I3 },
@@ -491,6 +496,10 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"ddivu", "d,v,I", 0, (int) M_DDIVU_3I, INSN_MACRO, I3 },
{"di", "", 0x41606000, 0xffffffff, WR_t|WR_C0, I33 },
{"di", "t", 0x41606000, 0xffe0ffff, WR_t|WR_C0, I33 },
+{"dins", "t,r,I,+I", 0, (int) M_DINS, INSN_MACRO, I65 },
+{"dins", "t,r,+A,+B", 0x7c000007, 0xfc00003f, WR_t|RD_s, I65 },
+{"dinsm", "t,r,+A,+F", 0x7c000005, 0xfc00003f, WR_t|RD_s, I65 },
+{"dinsu", "t,r,+E,+F", 0x7c000006, 0xfc00003f, WR_t|RD_s, I65 },
/* The MIPS assembler treats the div opcode with two operands as
though the first operand appeared twice (the first operand is both
a source and a destination). To get the div machine instruction,
@@ -559,9 +568,17 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"drol", "d,v,I", 0, (int) M_DROL_I, INSN_MACRO, I3 },
{"dror", "d,v,t", 0, (int) M_DROR, INSN_MACRO, I3 },
{"dror", "d,v,I", 0, (int) M_DROR_I, INSN_MACRO, I3 },
-{"dror", "d,w,<", 0x0020003a, 0xffe0003f, WR_d|RD_t, N5 },
-{"drorv", "d,t,s", 0x00000056, 0xfc0007ff, RD_t|RD_s|WR_d, N5 },
-{"dror32", "d,w,<", 0x0020003e, 0xffe0003f, WR_d|RD_t, N5 },
+{"dror", "d,w,<", 0x0020003a, 0xffe0003f, WR_d|RD_t, N5|I65 },
+{"drorv", "d,t,s", 0x00000056, 0xfc0007ff, RD_t|RD_s|WR_d, N5|I65 },
+{"dror32", "d,w,<", 0x0020003e, 0xffe0003f, WR_d|RD_t, N5|I65 },
+{"drotl", "d,v,t", 0, (int) M_DROL, INSN_MACRO, I65 },
+{"drotl", "d,v,I", 0, (int) M_DROL_I, INSN_MACRO, I65 },
+{"drotr", "d,v,t", 0, (int) M_DROR, INSN_MACRO, I65 },
+{"drotr", "d,v,I", 0, (int) M_DROR_I, INSN_MACRO, I65 },
+{"drotrv", "d,t,s", 0x00000056, 0xfc0007ff, RD_t|RD_s|WR_d, I65 },
+{"drotr32", "d,w,<", 0x0020003e, 0xffe0003f, WR_d|RD_t, I65 },
+{"dsbh", "d,w", 0x7c0000a4, 0xffe007ff, WR_d|RD_t, I65 },
+{"dshd", "d,w", 0x7c000164, 0xffe007ff, WR_d|RD_t, I65 },
{"dsllv", "d,t,s", 0x00000014, 0xfc0007ff, WR_d|RD_t|RD_s, I3 },
{"dsll32", "d,w,<", 0x0000003c, 0xffe0003f, WR_d|RD_t, I3 },
{"dsll", "d,w,s", 0x00000014, 0xfc0007ff, WR_d|RD_t|RD_s, I3 }, /* dsllv */
diff --git a/opcodes/xtensa-dis.c b/opcodes/xtensa-dis.c
index bf5f5bf..8c31085 100644
--- a/opcodes/xtensa-dis.c
+++ b/opcodes/xtensa-dis.c
@@ -337,7 +337,7 @@ static char* state_names[256] =
int show_raw_fields;
static int fetch_data
- PARAMS ((struct disassemble_info *info, bfd_vma memaddr, int numBytes));
+ PARAMS ((struct disassemble_info *info, bfd_vma memaddr));
static void print_xtensa_operand
PARAMS ((bfd_vma, struct disassemble_info *, xtensa_operand,
unsigned operand_val, int print_sr_name));
@@ -348,15 +348,13 @@ struct dis_private {
};
static int
-fetch_data (info, memaddr, numBytes)
+fetch_data (info, memaddr)
struct disassemble_info *info;
bfd_vma memaddr;
- int numBytes;
{
int length, status = 0;
struct dis_private *priv = (struct dis_private *) info->private_data;
- int insn_size = (numBytes != 0 ? numBytes :
- xtensa_insn_maxlength (xtensa_default_isa));
+ int insn_size = xtensa_insn_maxlength (xtensa_default_isa);
/* Read the maximum instruction size, padding with zeros if we go past
the end of the text section. This code will automatically adjust
@@ -475,7 +473,7 @@ print_insn_xtensa (memaddr, info)
isa = xtensa_default_isa;
/* Fetch the maximum size instruction. */
- bytes_fetched = fetch_data (info, memaddr, 0);
+ bytes_fetched = fetch_data (info, memaddr);
/* Copy the bytes into the decode buffer. */
memset (insn_buffer, 0, (xtensa_insnbuf_size (isa) *
diff --git a/sim/ChangeLog b/sim/ChangeLog
index f850276..2183398 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,20 @@
+2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
+ * h8300/compile.c : Addition of extern variable h8300_normal_mode
+ (SP) : Handle normal mode
+ (bitfrom) : Use normal mode flag to return suitable value
+ (lvalue) : Use normal mode flag to return command line location
+ (decode) : Decode instruction correctly for normal mode
+ (init_pointers) : Initialise memory correctly for normal mode
+ (sim_resume) : Handle cases for normal mode using h8300_normal_mode flag
+ (sim_store_register) : Handle 2 byte PC for normal mode
+ (sim_fetch_register) : Handle 2 byte PC for normal mode
+ (set_h8300h) : Set normal mode flag as per architechture
+ (sim_load) : Allocate 64K for normal mode instead of bigger memory
+
+2003-10-08 Dave Brolley <brolley@redhat.com>
+
+ * configure.in: Move frv handling to alphabetically correct placement.
+
2003-09-03 Andreas Schwab <schwab@suse.de>
* Makefile.in (FLAGS_TO_PASS): Pass down $(bindir) and $(mandir).
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index ca6d384..c7ff605 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,21 @@
+2003-10-30 Andrew Cagney <cagney@redhat.com>
+
+ * sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry"
+ with "struct bfd_symbol".
+
+2003-10-21 Andrew Cagney <cagney@redhat.com>
+
+ * callback.c (os_truncate): Call "truncate", and not "stat".
+
+2003-10-20 Andrew Cagney <cagney@redhat.com>
+
+ * sim-base.h: Replace "struct sec" with "struct bfd_section".
+
+2003-10-15 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * callback.c (os_ftruncate, os_truncate): New functions.
+ (default_callback): Initialize ftruncate and truncate members.
+
2003-09-08 Dave Brolley <brolley@redhat.com>
On behalf of Doug Evans <dje@sebabeach.org>
diff --git a/sim/common/callback.c b/sim/common/callback.c
index db0fff6..aa2cf07 100644
--- a/sim/common/callback.c
+++ b/sim/common/callback.c
@@ -399,6 +399,30 @@ os_fstat (p, fd, buf)
return wrap (p, fstat (fdmap (p, fd), buf));
}
+static int
+os_ftruncate (p, fd, len)
+ host_callback *p;
+ int fd;
+ long len;
+{
+ int result;
+
+ result = fdbad (p, fd);
+ if (result)
+ return result;
+ result = wrap (p, ftruncate (fdmap (p, fd), len));
+ return result;
+}
+
+static int
+os_truncate (p, file, len)
+ host_callback *p;
+ const char *file;
+ long len;
+{
+ return wrap (p, truncate (file, len));
+}
+
static int
os_shutdown (p)
host_callback *p;
@@ -538,6 +562,9 @@ host_callback default_callback =
os_stat,
os_fstat,
+ os_ftruncate,
+ os_truncate,
+
os_poll_quit,
os_shutdown,
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index 3f702f6..fde9847 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -175,11 +175,11 @@ typedef struct {
#define STATE_PROG_BFD(sd) ((sd)->base.prog_bfd)
/* Symbol table for prog_bfd */
- struct symbol_cache_entry **prog_syms;
+ struct bfd_symbol **prog_syms;
#define STATE_PROG_SYMS(sd) ((sd)->base.prog_syms)
/* The program's text section. */
- struct sec *text_section;
+ struct bfd_section *text_section;
/* Starting and ending text section addresses from the bfd. */
SIM_ADDR text_start, text_end;
#define STATE_TEXT_SECTION(sd) ((sd)->base.text_section)
diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c
index bbdff62..ccae100 100644
--- a/sim/common/sim-trace.c
+++ b/sim/common/sim-trace.c
@@ -1263,7 +1263,7 @@ trace_one_insn (SIM_DESC sd, sim_cpu *cpu, address_word pc,
if (bfd_find_nearest_line (STATE_PROG_BFD (CPU_STATE (cpu)),
STATE_TEXT_SECTION (CPU_STATE (cpu)),
- (struct symbol_cache_entry **) 0,
+ (struct bfd_symbol **) 0,
pc - STATE_TEXT_START (CPU_STATE (cpu)),
&pc_filename, &pc_function, &pc_linenum))
{
diff --git a/sim/configure.in b/sim/configure.in
index f9ec687..d992470 100644
--- a/sim/configure.in
+++ b/sim/configure.in
@@ -65,11 +65,11 @@ case "${target}" in
# OBSOLETE extra_subdirs="${extra_subdirs} igen"
# OBSOLETE ;;
# OBSOLETE fr30-*-*) sim_target=fr30 ;;
- h8300*-*-*)
- sim_target=h8300
+ frv-*-*) sim_target=frv
extra_subdirs="${extra_subdirs} testsuite"
;;
- frv-*-*) sim_target=frv
+ h8300*-*-*)
+ sim_target=h8300
extra_subdirs="${extra_subdirs} testsuite"
;;
h8500-*-*) sim_target=h8500 ;;
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index f8e70a5..e5aff56 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,8 @@
+2003-10-30 Andrew Cagney <cagney@redhat.com>
+
+ * simops.c: Replace "struct symbol_cache_entry" with "struct
+ bfd_symbol".
+
2003-06-22 Andrew Cagney <cagney@redhat.com>
* interp.c (xfer_mem): Simplify. Only do a single partial
diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c
index fbffa4d..0b58505 100644
--- a/sim/d10v/simops.c
+++ b/sim/d10v/simops.c
@@ -206,7 +206,7 @@ trace_input_func (name, in1, in2, in3)
filename = (const char *)0;
functionname = (const char *)0;
linenumber = 0;
- if (bfd_find_nearest_line (prog_bfd, text, (struct symbol_cache_entry **)0, byte_pc - text_start,
+ if (bfd_find_nearest_line (prog_bfd, text, (struct bfd_symbol **)0, byte_pc - text_start,
&filename, &functionname, &linenumber))
{
p = buf;
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index a799d2b..f123878 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -53,7 +53,7 @@ static void set_simcache_size (SIM_DESC, int);
#define X(op, size) (op * 4 + size)
-#define SP (h8300hmode ? SL : SW)
+#define SP (h8300hmode && !h8300_normal_mode ? SL : SW)
#define h8_opcodes ops
#define DEFINE_TABLE
@@ -510,6 +510,7 @@ enum { POLL_QUIT_INTERVAL = 0x80000 };
int h8300hmode = 0;
int h8300smode = 0;
+int h8300_normal_mode = 0;
int h8300sxmode = 0;
static int memory_size;
@@ -539,7 +540,7 @@ bitfrom (int x)
case L_32:
return SL;
case L_P:
- return h8300hmode ? SL : SW;
+ return (h8300hmode && !h8300_normal_mode)? SL : SW;
}
return 0;
}
@@ -575,9 +576,9 @@ lvalue (SIM_DESC sd, int x, int rn, unsigned int *val)
static int
cmdline_location()
{
- if (h8300smode)
+ if (h8300smode && !h8300_normal_mode)
return 0xffff00L;
- else if (h8300hmode)
+ else if (h8300hmode && !h8300_normal_mode)
return 0x2ff00L;
else
return 0xff00L;
@@ -837,8 +838,10 @@ decode (SIM_DESC sd, int addr, unsigned char *data, decoded_inst *dst)
}
else if ((looking_for & MODE) == VECIND)
{
- /* FIXME: Multiplier should be 2 for "normal" mode. */
- cst[opnum] = ((data[1] & 0x7f) + 0x80) * 4;
+ if(h8300_normal_mode)
+ cst[opnum] = ((data[1] & 0x7f) + 0x80) * 2;
+ else
+ cst[opnum] = ((data[1] & 0x7f) + 0x80) * 4;
cst[opnum] += h8_get_vbr (sd); /* Add vector base reg. */
}
else if ((looking_for & SIZE) == L_32)
@@ -1774,9 +1777,9 @@ init_pointers (SIM_DESC sd)
littleendian.i = 1;
- if (h8300smode)
+ if (h8300smode && !h8300_normal_mode)
memory_size = H8300S_MSIZE;
- else if (h8300hmode)
+ else if (h8300hmode && !h8300_normal_mode)
memory_size = H8300H_MSIZE;
else
memory_size = H8300_MSIZE;
@@ -1950,7 +1953,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
}
oldmask = h8_get_mask (sd);
- if (!h8300hmode)
+ if (!h8300hmode || h8300_normal_mode)
h8_set_mask (sd, 0xffff);
do
{
@@ -2790,7 +2793,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
/* Setting char_ptr_size to the sizeof (char *) on the different
architectures. */
- if (h8300hmode || h8300smode)
+ if ((h8300hmode || h8300smode) && !h8300_normal_mode)
{
char_ptr_size = 4;
}
@@ -2859,7 +2862,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
for (i = 0; i < no_of_args; i++)
{
/* Saving the argv pointer. */
- if (h8300hmode || h8300smode)
+ if ((h8300hmode || h8300smode) && !h8300_normal_mode)
{
SET_MEMORY_L (argv_ptrs_location, argv_ptrs[i]);
}
@@ -2875,7 +2878,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
/* Required by POSIX, Setting 0x0 at the end of the list of argv
pointers. */
- if (h8300hmode || h8300smode)
+ if ((h8300hmode || h8300smode) && !h8300_normal_mode)
{
SET_MEMORY_L (old_sp, 0x0);
}
@@ -2914,7 +2917,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
/* Setting filename_ptr to first argument of open, */
/* and trying to get mode. */
- if (h8300sxmode || h8300hmode || h8300smode)
+ if ((h8300sxmode || h8300hmode || h8300smode) && !h8300_normal_mode)
{
filename_ptr = GET_L_REG (0);
mode = GET_MEMORY_L (h8_get_reg (sd, SP_REGNUM) + 4);
@@ -2965,8 +2968,8 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int read_return = 0; /* Return value from callback to
read. */
- fd = h8300hmode ? GET_L_REG (0) : GET_W_REG (0);
- buf_size = h8300hmode ? GET_L_REG (2) : GET_W_REG (2);
+ fd = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (0) : GET_W_REG (0);
+ buf_size = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (2) : GET_W_REG (2);
char_ptr = (char *) malloc (sizeof (char) * buf_size);
@@ -3000,9 +3003,9 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int write_return; /* Return value from callback to write. */
int i = 0; /* Loop counter */
- fd = h8300hmode ? GET_L_REG (0) : GET_W_REG (0);
- char_ptr = h8300hmode ? GET_L_REG (1) : GET_W_REG (1);
- len = h8300hmode ? GET_L_REG (2) : GET_W_REG (2);
+ fd = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (0) : GET_W_REG (0);
+ char_ptr = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (1) : GET_W_REG (1);
+ len = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (2) : GET_W_REG (2);
/* Allocating space for the characters to be written. */
ptr = (char *) malloc (sizeof (char) * len);
@@ -3032,9 +3035,9 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int origin; /* Origin */
int lseek_return; /* Return value from callback to lseek. */
- fd = h8300hmode ? GET_L_REG (0) : GET_W_REG (0);
- offset = h8300hmode ? GET_L_REG (1) : GET_W_REG (1);
- origin = h8300hmode ? GET_L_REG (2) : GET_W_REG (2);
+ fd = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (0) : GET_W_REG (0);
+ offset = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (1) : GET_W_REG (1);
+ origin = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (2) : GET_W_REG (2);
/* Callback lseek and return offset. */
lseek_return =
@@ -3050,7 +3053,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int fd; /* File descriptor */
int close_return; /* Return value from callback to close. */
- fd = h8300hmode ? GET_L_REG (0) : GET_W_REG (0);
+ fd = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (0) : GET_W_REG (0);
/* Callback close and return. */
close_return = sim_callback->close (sim_callback, fd);
@@ -3068,10 +3071,10 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int stat_ptr; /* Pointer to stat record. */
char *temp_stat_ptr; /* Temporary stat_rec pointer. */
- fd = h8300hmode ? GET_L_REG (0) : GET_W_REG (0);
+ fd = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (0) : GET_W_REG (0);
/* Setting stat_ptr to second argument of stat. */
- stat_ptr = h8300hmode ? GET_L_REG (1) : GET_W_REG (1);
+ stat_ptr = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (1) : GET_W_REG (1);
/* Callback stat and return. */
fstat_return = sim_callback->fstat (sim_callback, fd, &stat_rec);
@@ -3120,7 +3123,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
int i = 0; /* Loop Counter */
/* Setting filename_ptr to first argument of open. */
- filename_ptr = h8300hmode ? GET_L_REG (0) : GET_W_REG (0);
+ filename_ptr = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (0) : GET_W_REG (0);
/* Trying to find the length of the filename. */
temp_char = GET_MEMORY_B (h8_get_reg (sd, 0));
@@ -3144,7 +3147,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
/* Setting stat_ptr to second argument of stat. */
/* stat_ptr = h8_get_reg (sd, 1); */
- stat_ptr = h8300hmode ? GET_L_REG (1) : GET_W_REG (1);
+ stat_ptr = (h8300hmode && !h8300_normal_mode) ? GET_L_REG (1) : GET_W_REG (1);
/* Callback stat and return. */
stat_return =
@@ -3552,7 +3555,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
call:
tmp = h8_get_reg (sd, SP_REGNUM);
- if (h8300hmode)
+ if (h8300hmode && !h8300_normal_mode)
{
tmp -= 4;
SET_MEMORY_L (tmp, code->next_pc);
@@ -3584,7 +3587,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
h8_set_exr (sd, GET_MEMORY_L (tmp));
tmp += 4;
}
- if (h8300hmode)
+ if (h8300hmode && !h8300_normal_mode)
{
h8_set_ccr (sd, GET_MEMORY_L (tmp));
tmp += 4;
@@ -3607,7 +3610,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
rts:
tmp = h8_get_reg (sd, SP_REGNUM);
- if (h8300hmode)
+ if (h8300hmode && !h8300_normal_mode)
{
pc = GET_MEMORY_L (tmp);
tmp += 4;
@@ -3655,16 +3658,26 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
case O (O_TRAPA, SB): /* trapa */
if (fetch (sd, &code->src, &res))
- goto end; /* res is vector number. */
-
- tmp = h8_get_reg (sd, SP_REGNUM);
- tmp -= 4;
- SET_MEMORY_L (tmp, code->next_pc);
- tmp -= 4;
- SET_MEMORY_L (tmp, h8_get_ccr (sd));
- intMaskBit = 1;
- BUILDSR (sd);
-
+ goto end; /* res is vector number. */
+
+ tmp = h8_get_reg (sd, SP_REGNUM);
+ if(h8300_normal_mode)
+ {
+ tmp -= 2;
+ SET_MEMORY_W (tmp, code->next_pc);
+ tmp -= 2;
+ SET_MEMORY_W (tmp, h8_get_ccr (sd));
+ }
+ else
+ {
+ tmp -= 4;
+ SET_MEMORY_L (tmp, code->next_pc);
+ tmp -= 4;
+ SET_MEMORY_L (tmp, h8_get_ccr (sd));
+ }
+ intMaskBit = 1;
+ BUILDSR (sd);
+
if (h8300smode)
{
tmp -= 4;
@@ -3673,8 +3686,10 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
h8_set_reg (sd, SP_REGNUM, tmp);
- /* FIXME: "normal" mode should use 2-byte ptrs. */
- pc = GET_MEMORY_L (0x20 + res * 4);
+ if(h8300_normal_mode)
+ pc = GET_MEMORY_L (0x10 + res * 2); /* Vector addresses are 0x10,0x12,0x14 and 0x16 */
+ else
+ pc = GET_MEMORY_L (0x20 + res * 4);
goto end;
case O (O_BPT, SN):
@@ -4703,7 +4718,10 @@ sim_store_register (SIM_DESC sd, int rn, unsigned char *value, int length)
switch (rn)
{
case PC_REGNUM:
- h8_set_pc (sd, intval);
+ if(h8300_normal_mode)
+ h8_set_pc (sd, shortval); /* PC for Normal mode is 2 bytes */
+ else
+ h8_set_pc (sd, intval);
break;
default:
(*sim_callback->printf_filtered) (sim_callback,
@@ -4814,7 +4832,8 @@ sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
longreg = 1;
break;
}
- if (h8300hmode || longreg)
+ /* In Normal mode PC is 2 byte, but other registers are 4 byte */
+ if ((h8300hmode || longreg) && !(rn == PC_REGNUM && h8300_normal_mode))
{
buf[0] = v >> 24;
buf[1] = v >> 16;
@@ -4919,6 +4938,9 @@ set_h8300h (unsigned long machine)
if (machine == bfd_mach_h8300h || machine == bfd_mach_h8300hn || h8300smode)
h8300hmode = 1;
+
+ if(machine == bfd_mach_h8300hn || machine == bfd_mach_h8300sn || machine == bfd_mach_h8300sxn)
+ h8300_normal_mode = 1;
}
/* Cover function of sim_state_free to free the cpu buffers as well. */
@@ -5054,9 +5076,9 @@ sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
switching between H8/300 and H8/300H programs without exiting
gdb. */
- if (h8300smode)
+ if (h8300smode && !h8300_normal_mode)
memory_size = H8300S_MSIZE;
- else if (h8300hmode)
+ else if (h8300hmode && !h8300_normal_mode)
memory_size = H8300H_MSIZE;
else
memory_size = H8300_MSIZE;
diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
index be79bec..d36c923d 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -1,3 +1,8 @@
+2003-10-11 Alan Modra <amodra@bigpond.net.au>
+
+ * interp.c (sim_load): Don't refer directly to _cooked_size and vma;
+ Use bfd_section_size and bfd_get_section_vma.
+
2003-02-27 Andrew Cagney <cagney@redhat.com>
* interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c
index bf04ed9..f1f7534 100644
--- a/sim/mcore/interp.c
+++ b/sim/mcore/interp.c
@@ -1,5 +1,5 @@
/* Simulator for Motorola's MCore processor
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
Contributed by Cygnus Solutions.
This file is part of GDB, the GNU debugger.
@@ -1981,9 +1981,11 @@ sim_load (sd, prog, abfd, from_tty)
/* figure the end of the bss section */
#if 0
printf ("bss section at 0x%08x for 0x%08x bytes\n",
- (unsigned long) s_bss->vma , (unsigned long) s_bss->_cooked_size);
+ (unsigned long) bfd_get_section_vma (handle, s_bss),
+ (unsigned long) bfd_section_size (handle, s_bss));
#endif
- heap_ptr = (unsigned long) s_bss->vma + (unsigned long) s_bss->_cooked_size;
+ heap_ptr = ((unsigned long) bfd_get_section_vma (handle, s_bss)
+ + (unsigned long) bfd_section_size (handle, s_bss));
/* Clean up after ourselves. */
bfd_close (handle);
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 391cfec..dac646a 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,11 @@
+2003-10-16 Michael Snyder <msnyder@redhat.com>
+
+ * emul_netbsd.c: Only a comment may follow an #endif.
+
+2003-10-15 Michael Snyder <msnyder@redhat.com>
+
+ * Makefile.in (sim_calls.o): No longer depends on gdb/tm.h.
+
2003-06-22 Andrew Cagney <cagney@redhat.com>
Written by matthew green <mrg@redhat.com>, with fixes from Aldy
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 015fad0..335a8b4 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -379,7 +379,7 @@ model.o: model.c $(CPU_H)
events.o: events.c events.h $(BASICS_H)
-sim_calls.o: sim_calls.c $(PSIM_H) itable.h ../../gdb/tm.h options.h
+sim_calls.o: sim_calls.c $(PSIM_H) itable.h options.h
spreg.o: spreg.c spreg.h spreg.c $(BASICS_H)
diff --git a/sim/ppc/emul_netbsd.c b/sim/ppc/emul_netbsd.c
index 13897fa..3ea03f6 100644
--- a/sim/ppc/emul_netbsd.c
+++ b/sim/ppc/emul_netbsd.c
@@ -1466,4 +1466,4 @@ const os_emul emul_netbsd = {
0 /*data*/
};
-#endif _EMUL_NETBSD_C_
+#endif /* _EMUL_NETBSD_C_ */
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 7ab1394..faa6ebc 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -1,3 +1,14 @@
+2003-11-03 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * interp.c (fsca_s, fsrra_s): New functions.
+ * gencode.c (tab): Add entries for fsca and fsrra.
+ (expand_opcode): Allow variable length n / m fields.
+
+2003-10-15 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * syscall.h (SYS_truncate, SYS_ftruncate): Define.
+ * interp.c (trap): Add support for SYS_ftruncate and SYS_truncate.
+
2003-08-11 Shrinivas Atre <shrinivasa@KPITCummins.com>
* sim/sh/gencode.c ( tab[] ): Addition of MAC.L handler and
correction for MAC.W handler
diff --git a/sim/sh/gencode.c b/sim/sh/gencode.c
index a4a1c2d..07d62a9 100644
--- a/sim/sh/gencode.c
+++ b/sim/sh/gencode.c
@@ -449,6 +449,17 @@ op tab[] =
},
/* sh4 */
+ { "", "", "fsca", "1111nnn011111101",
+ "if (FPSCR_PR)",
+ " RAISE_EXCEPTION (SIGILL);",
+ "else",
+ " {",
+ " SET_FR (n, fsca_s (FPUL, &sin));",
+ " SET_FR (n+1, fsca_s (FPUL, &cos));",
+ " }",
+ },
+
+ /* sh4 */
{ "", "", "fschg", "1111001111111101",
"SET_FPSCR (GET_FPSCR() ^ FPSCR_MASK_SZ);",
},
@@ -458,6 +469,14 @@ op tab[] =
"FP_UNARY(n, sqrt);",
},
+ /* sh4 */
+ { "", "", "fsrra", "1111nnnn01111101",
+ "if (FPSCR_PR)",
+ " RAISE_EXCEPTION (SIGILL);",
+ "else",
+ " SET_FR (n, fsrra_s (FR (n)));",
+ },
+
/* sh2e */
{ "", "", "fsub <FREG_M>,<FREG_N>", "1111nnnnmmmm0001",
"FP_OP(n, -, m);",
@@ -1979,6 +1998,8 @@ expand_opcode (shift, val, i, s)
{
int m, mv;
+ if (s[1] - '0' > 1U || !s[2] || ! s[3])
+ expand_opcode (shift - 1, val + s[0] - '0', i, s + 1);
val |= bton (s) << shift;
if (s[2] == '0' || s[2] == '1')
expand_opcode (shift - 4, val, i, s + 4);
@@ -2003,12 +2024,17 @@ expand_opcode (shift, val, i, s)
}
case 'n':
case 'm':
- for (j = 0; j < 16; j++)
- {
- expand_opcode (shift - 4, val | (j << shift), i, s + 4);
-
- }
- break;
+ {
+ int digits = 1;
+ while (s[digits] == s[0])
+ digits++;
+ for (j = 0; j < (1 << digits); j++)
+ {
+ expand_opcode (shift - digits, val | (j << shift), i,
+ s + digits);
+ }
+ break;
+ }
case 'M':
/* A1, A0,X0,X1,Y0,Y1,M0,A1G,M1,M1G */
for (j = 5; j < 16; j++)
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 91899f4..5ca8e61 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -1153,6 +1153,17 @@ trap (i, regs, insn_ptr, memory, maskl, maskw, endianw)
case SYS_time:
regs[0] = get_now ();
break;
+ case SYS_ftruncate:
+ regs[0] = callback->ftruncate (callback, regs[5], regs[6]);
+ break;
+ case SYS_truncate:
+ {
+ int len = strswaplen (regs[5]);
+ strnswap (regs[5], len);
+ regs[0] = callback->truncate (callback, ptr (regs[5]), regs[6]);
+ strnswap (regs[5], len);
+ break;
+ }
default:
regs[0] = -1;
break;
@@ -1400,6 +1411,55 @@ macl (regs, memory, n, m)
MACH = mach;
}
+float
+fsca_s (int in, double (*f) (double))
+{
+ double rad = ldexp ((in & 0xffff), -15) * 3.141592653589793238462643383;
+ double result = (*f) (rad);
+ double error, upper, lower, frac;
+ int exp;
+
+ /* Search the value with the maximum error that is still within the
+ architectural spec. */
+ error = ldexp (1., -21);
+ /* compensate for calculation inaccuracy by reducing error. */
+ error = error - ldexp (1., -50);
+ upper = result + error;
+ frac = frexp (upper, &exp);
+ upper = ldexp (floor (ldexp (frac, 24)), exp - 24);
+ lower = result - error;
+ frac = frexp (lower, &exp);
+ lower = ldexp (ceil (ldexp (frac, 24)), exp - 24);
+ return abs (upper - result) >= abs (lower - result) ? upper : lower;
+}
+
+float
+fsrra_s (float in)
+{
+ double result = 1. / sqrt (in);
+ int exp;
+ double frac, upper, lower, error, eps;
+
+ /* refine result */
+ result = result - (result * result * in - 1) * 0.5 * result;
+ /* Search the value with the maximum error that is still within the
+ architectural spec. */
+ frac = frexp (result, &exp);
+ frac = ldexp (frac, 24);
+ error = 4.; /* 1 << 24-1-21 */
+ /* use eps to compensate for possible 1 ulp error in our 'exact' result. */
+ eps = ldexp (1., -29);
+ upper = floor (frac + error - eps);
+ if (upper > 16777216.)
+ upper = floor ((frac + error - eps) * 0.5) * 2.;
+ lower = ceil ((frac - error + eps) * 2) * .5;
+ if (lower > 8388608.)
+ lower = ceil (frac - error + eps);
+ upper = ldexp (upper, exp - 24);
+ lower = ldexp (lower, exp - 24);
+ return upper - result >= result - lower ? upper : lower;
+}
+
static struct loop_bounds
get_loop_bounds (rs, re, memory, mem_end, maskw, endianw)
int rs, re;
diff --git a/sim/sh/syscall.h b/sim/sh/syscall.h
index 9b818f9..aebce2c 100644
--- a/sim/sh/syscall.h
+++ b/sim/sh/syscall.h
@@ -27,6 +27,8 @@
#define SYS_stat 38
#define SYS_pipe 42
#define SYS_execve 59
+#define SYS_truncate 129
+#define SYS_ftruncate 130
#define SYS_argc 172
#define SYS_argnlen 173
#define SYS_argn 174
diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index ec6b7e3..cbd36e3 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -1,3 +1,30 @@
+2003-10-10 Dave Brolley <brolley@redhat.com>
+
+ * sim/frv/testutils.inc (or_gr_immed): New macro.
+ * sim/frv/fp_exception-fr550.cgs: Write insns using
+ unaligned registers into the program in order to
+ cause the required exceptions.
+ * sim/frv/fp_exception.cgs: Ditto.
+ * sim/frv/regalign.cgs: Ditto.
+
+2003-10-06 Dave Brolley <brolley@redhat.com>
+
+ * sim/frv/fr550: New subdirectory.
+ * sim/frv/fr400/*.cgs: Add fr550 as appropriate.
+ * sim/frv/fr500/*.cgs: Add fr550 as appropriate.
+ * sim/frv/interrupts/*.cgs: Add fr550 as appropriate.
+ * sim/frv/interrupts/*-fr550.cgs: New test cases for fr550.
+
+2003-09-19 Michael Snyder <msnyder@redhat.com>
+
+ * sim/frv/nldqi.cgs: Remove. This insn was never implemented
+ by Fujitsu.
+
+2003-09-19 Dave Brolley <brolley@redhat.com>
+
+ * sim/frv/rstqf.cgs: Use nldq instead of nldqi.
+ * sim/frv/rstq.cgs: Use nldq instead of nldqi.
+
2003-09-11 Michael Snyder <msnyder@redhat.com>
* sim/testsuite/sim/frv/movgs.cgs: Change lcr to spr[273],